Revision bb71e317

View differences:

libavcodec/h263dec.c
199 199
#endif
200 200
            //fprintf(stderr,"\nFrame: %d\tMB: %d",avctx->frame_number, (s->mb_y * s->mb_width) + s->mb_x);
201 201
            /* DCT & quantize */
202
            if (s->h263_msmpeg4) {
203
                msmpeg4_dc_scale(s);
204
            } else if (s->h263_pred) {
202
            if (s->h263_pred && s->msmpeg4_version!=2) {
205 203
                h263_dc_scale(s);
206 204
            } else {
207 205
                /* default quantization values */
libavcodec/mpegvideo.c
1439 1439
            }
1440 1440
#endif
1441 1441
    /* DCT & quantize */
1442
    if (s->h263_msmpeg4) {
1443
        msmpeg4_dc_scale(s);
1444
    } else if (s->h263_pred) {
1442
    if (s->h263_pred && s->msmpeg4_version!=2) {
1445 1443
        h263_dc_scale(s);
1446 1444
    } else {
1447 1445
        /* default quantization values */
libavcodec/mpegvideo.h
490 490
void msmpeg4_encode_mb(MpegEncContext * s, 
491 491
                       DCTELEM block[6][64],
492 492
                       int motion_x, int motion_y);
493
void msmpeg4_dc_scale(MpegEncContext * s);
494 493
int msmpeg4_decode_picture_header(MpegEncContext * s);
495 494
int msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size);
496 495
int msmpeg4_decode_mb(MpegEncContext *s, 
libavcodec/msmpeg4.c
411 411
}
412 412

  
413 413

  
414
/* strongly inspirated from MPEG4, but not exactly the same ! */
414
#if 0
415
/* identical to mpeg4 for msmpeg4v3 but not msmpeg4v2 */
415 416
void msmpeg4_dc_scale(MpegEncContext * s)
416 417
{
417 418
    if (s->qscale < 5 || s->msmpeg4_version==2){
......
420 421
    }else if (s->qscale < 9){
421 422
        s->y_dc_scale = 2 * s->qscale;
422 423
        s->c_dc_scale = (s->qscale + 13)>>1;
423
    }else{
424
    }else if(s->qscale < 25){
424 425
        s->y_dc_scale = s->qscale + 8;
425 426
        s->c_dc_scale = (s->qscale + 13)>>1;
427
    }else{
428
        s->y_dc_scale = 2 * s->qscale - 16;
429
        s->c_dc_scale = s->qscale - 6;
426 430
    }
427 431
}
432
#endif
428 433

  
429 434
/* dir = 0: left, dir = 1: top prediction */
430 435
static int msmpeg4_pred_dc(MpegEncContext * s, int n, 

Also available in: Unified diff