Revision 5e5c247a libavcodec/mpegvideo.c

View differences:

libavcodec/mpegvideo.c
267 267
    ff_init_scantable(s->dsp.idct_permutation, &s->intra_h_scantable, ff_alternate_horizontal_scan);
268 268
    ff_init_scantable(s->dsp.idct_permutation, &s->intra_v_scantable, ff_alternate_vertical_scan);
269 269

  
270
    s->picture_structure= PICT_FRAME;
271
    
272 270
    return 0;
273 271
}
274 272

  
......
424 422
            CHECKED_ALLOCZ(s->dct_error_sum, 2 * 64 * sizeof(int))
425 423
        }
426 424
    }   
427
    CHECKED_ALLOCZ(s->blocks, 64*6*2 * sizeof(DCTELEM))
425
    CHECKED_ALLOCZ(s->blocks, 64*12*2 * sizeof(DCTELEM))
428 426
    s->block= s->blocks[0];
429 427

  
430 428
    for(i=0;i<12;i++){
......
539 537
    s->y_dc_scale_table=
540 538
    s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
541 539
    s->chroma_qscale_table= ff_default_chroma_qscale_table;
542
    if (!s->encoding)
543
        s->progressive_sequence= 1;
544
    s->progressive_frame= 1;
540
    if( s->codec_id != CODEC_ID_MPEG1VIDEO && 
541
        s->codec_id != CODEC_ID_MPEG2VIDEO) 
542
    {
543
        /* default structure is frame */
544
        s->progressive_frame= 1;
545
        s->picture_structure= PICT_FRAME;
546

  
547
        s->y_dc_scale_table=
548
        s->c_dc_scale_table= ff_mpeg1_dc_scale_table;
549
        if (!s->encoding)
550
            s->progressive_sequence= 1;
551
    }
545 552
    s->coded_picture_number = 0;
546 553

  
547 554
    y_size = (2 * s->mb_width + 2) * (2 * s->mb_height + 2);

Also available in: Unified diff