[Mjpeg-users] Fast Forward with mpeg2enc encoded dvds

2005-12-07 Thread Clemens Krammer

Hello,

My standalone DVD Player (Grundig GDV 130) has problems with mpeg2enc
encoded dvds. To be more precisely, the fast forward scan does not work.

When doing a 2x FF, the player continues with normal speed but without
sound.

When doing a 4x FF, it does basically the same as at 2x

With 8x, 16x, 32x 62x I get some fast forward, because the player begins
to skip larger sequences.

When playing a standard dvd, the 2x FF brings real 2x speed video,
without skipping (looks smooth).

I fiddled around with mpeg2enc options, espacially with
--sequence-header-every-gop and --closed-gop, but it did not help.

One example:

transcode -i *$i*avi -x mplayer,mplayer -y mpeg2enc,mp2enc -F 8,-b
9000  --interlace-mode 0 --sequence-header-every-gop --closed-gop
--keep-hf --force-b-b-p --custom-quant-matrices tmpgenc --multi-thread 2
-2 1 -4 1 -q$QUAL   -Z 480x416 --post_clip -80,0 -M 1 -b 160 -n 0x55
--export_asr 2 -o colt.$i

Any Hints?


Thanks in advance!
Clemens




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users


[Mjpeg-users] B ... [WAS: y4mscaler: Upsampling to widescreen]

2005-12-07 Thread Stefan M. Fendt
Michael Hanke schrieb:

Ok. Now that you have said A I would ask that you should also say B: Would 
it be possible to get a copy of your filter for experimenting, ideally with 
adescription of the theory behind it since you said it's non-standard.

OK, here we go...

This is a much simplified and a lot faster variant of that scaler. It
took me some minutes to make it useful and understandable... (I hope)...

void
upscale (uint8_t * dst, uint8_t * src, int w, int h)
{
  // triangulation scaler
  // this scaler works by analysing the correlations between neighboring
pixels
  // it is a rather simple super-resolution-approach but as TV is
lowpassfiltered
  // in front of transmission we can't recover resolution with a
multi-image approach
  // so if upscaling is needed at all, we try to do it visually correct...
  //
  // the results are quite similar to what modern plasma-screens do with
SD-signals

  int x, y;
  int dx, dy;
  int m;
  int a, b, c, d;
  int ae, be, ce, de, me;

  for (y = 0; y = h; y++)
for (x = 0; x = w; x++)
  {
*(dst + (x * 2) + (y * 2) * (w * 2)) = *(src + x + y * w);
  }

  w *= 2;
  h *= 2;

  for (y = 1; y = h; y += 2)
for (x = 1; x = w; x += 2)
  {
// fill in the four neighbor-pixels
a = *(dst + (x - 1) + (y - 1) * w);
b = *(dst + (x + 1) + (y - 1) * w);
c = *(dst + (x - 1) + (y + 1) * w);
d = *(dst + (x + 1) + (y + 1) * w);

// calculate the mean of the neighbors
m = (a + b + c + d) / 4;

// calculate the error for every neighbor-pixel
ae = (m - a) * (m - a);
be = (m - b) * (m - b);
ce = (m - c) * (m - c);
de = (m - d) * (m - d);

// find the maximum error-value
me = ae;
me = (me  be) ? be : me;
me = (me  ce) ? ce : me;
me = (me  de) ? de : me;


// generate mixing coefficients
ae = me - ae;
be = me - be;
ce = me - ce;
de = me - de;
me = ae + be + ce + de;

if (me != 0)
  m = (a * ae + b * be + c * ce + d * de) / me;

*(dst + x + y * w) = m;
  }

  for (y = 0; y = h; y += 2)
for (x = 1; x = w; x += 2)
  {
// fill in the four neighbor-pixels
a = *(dst + (x - 1) + y * w);
b = *(dst + (x + 1) + y * w);
c = *(dst + x + (y - 1) * w);
d = *(dst + x + (y + 1) * w);

// calculate the mean of the neighbors
m = (a + b + c + d) / 4;

// calculate the error for every neighbor-pixel
ae = (m - a) * (m - a);
be = (m - b) * (m - b);
ce = (m - c) * (m - c);
de = (m - d) * (m - d);

// find the maximum error-value
me = ae;
me = (me  be) ? be : me;
me = (me  ce) ? ce : me;
me = (me  de) ? de : me;


// generate mixing coefficients
ae = me - ae;
be = me - be;
ce = me - ce;
de = me - de;
me = ae + be + ce + de;

if (me != 0)
  m = (a * ae + b * be + c * ce + d * de) / me;

*(dst + x + y * w) = m;
  }

  for (y = 1; y = h; y += 2)
for (x = 0; x = w; x += 2)
  {
// fill in the four neighbor-pixels
a = *(dst + (x - 1) + y * w);
b = *(dst + (x + 1) + y * w);
c = *(dst + x + (y - 1) * w);
d = *(dst + x + (y + 1) * w);

// calculate the mean of the neighbors
m = (a + b + c + d) / 4;

// calculate the error for every neighbor-pixel
ae = (m - a) * (m - a);
be = (m - b) * (m - b);
ce = (m - c) * (m - c);
de = (m - d) * (m - d);

// find the maximum error-value
me = ae;
me = (me  be) ? be : me;
me = (me  ce) ? ce : me;
me = (me  de) ? de : me;


// generate mixing coefficients
ae = me - ae;
be = me - be;
ce = me - ce;
de = me - de;
me = ae + be + ce + de;

if (me != 0)
  m = (a * ae + b * be + c * ce + d * de) / me;

*(dst + x + y * w) = m;
  }

  // only very little lowpass-filtering (sometimes looks better
sometimes not...)...
#if 0
  for (y = 0; y = h; y++)
for (x = 0; x = w; x++)
  {
a = *(dst + (x - 1) + (y - 1) * w);
b = *(dst + (x + 1) + (y - 1) * w);
c = *(dst + (x - 1) + (y + 1) * w);
d = *(dst + (x + 1) + (y + 1) * w);

m = (a + b + c + d) / 4;
m += *(dst + x + y * w) * 3;
m /= 4;

*(dst + x + y * w) = m;
  }
#endif
}

-- 
Gnomemeeting/Netmeeting: callto:ils.seconix.com/[EMAIL PROTECTED]
ICQ: 131490319



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Mjpeg-users mailing list
Mjpeg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mjpeg-users