- Bug fix on RTYPE (rounding type) not being honoured by H.263+ decoder.

Originally committed as revision 312 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Juanjo 23 years ago
parent 2ba1bff059
commit e7774f11ac
  1. 5
      libavcodec/h263.c
  2. 22
      libavcodec/i386/mpegvideo_mmx.c

@ -1447,7 +1447,10 @@ int h263_decode_picture_header(MpegEncContext *s)
if (s->pict_type != I_TYPE && if (s->pict_type != I_TYPE &&
s->pict_type != P_TYPE) s->pict_type != P_TYPE)
return -1; return -1;
skip_bits(&s->gb, 7); skip_bits(&s->gb, 2);
s->no_rounding = get_bits1(&s->gb);
//fprintf(stderr, "\nRTYPE: %d", s->no_rounding);
skip_bits(&s->gb, 4);
/* Get the picture dimensions */ /* Get the picture dimensions */
if (ufep) { if (ufep) {

@ -95,17 +95,17 @@ static void dct_unquantize_h263_mmx(MpegEncContext *s,
else else
block[0] = block[0] * s->c_dc_scale; block[0] = block[0] * s->c_dc_scale;
} }
for(i=1; i<8; i++) { for(i=1; i<8; i++) {
level = block[i]; level = block[i];
if (level) { if (level) {
if (level < 0) { if (level < 0) {
level = level * qmul - qadd; level = level * qmul - qadd;
} else { } else {
level = level * qmul + qadd; level = level * qmul + qadd;
} }
block[i] = level; block[i] = level;
} }
} }
nCoeffs=64; nCoeffs=64;
} else { } else {
i = 0; i = 0;

Loading…
Cancel
Save