Revision e0a3d744

View differences:

libavcodec/avcodec.h
5 5

  
6 6
#define LIBAVCODEC_VERSION_INT 0x000406
7 7
#define LIBAVCODEC_VERSION     "0.4.6"
8
#define LIBAVCODEC_BUILD       4608
9
#define LIBAVCODEC_BUILD_STR   "4608"
8
#define LIBAVCODEC_BUILD       4609
9
#define LIBAVCODEC_BUILD_STR   "4609"
10 10

  
11 11
enum CodecID {
12 12
    CODEC_ID_NONE, 
......
130 130
#define FF_ASPECT_16_9_525 5
131 131
    int gop_size; /* 0 = intra only */
132 132
    enum PixelFormat pix_fmt;  /* pixel format, see PIX_FMT_xxx */
133
    int repeat_pict; /* set this to 1 if you want the decoder
134
                        to repeat frames for 3:2 pulldown (MPEG-2) */
133
    int repeat_pict; /* when decoding, this signal how much the picture */
134
                     /* must be delayed.                                */
135
                     /* extra_delay = (repeat_pict / 2) * (1/fps)       */
135 136
    /* if non NULL, 'draw_horiz_band' is called by the libavcodec
136 137
       decoder to draw an horizontal band. It improve cache usage. Not
137 138
       all codecs can do that. You must check the codec capabilities
libavcodec/mpeg12.c
1338 1338
    /* composite display not parsed */
1339 1339
    dprintf("intra_dc_precision=%d\n", s->intra_dc_precision);
1340 1340
    dprintf("picture_structure=%d\n", s->picture_structure);
1341
    dprintf("top field first=%d\n", s->top_field_first);
1342
    dprintf("repeat first field=%d\n", s->repeat_first_field);
1341 1343
    dprintf("conceal=%d\n", s->concealment_motion_vectors);
1342 1344
    dprintf("intra_vlc_format=%d\n", s->intra_vlc_format);
1343 1345
    dprintf("alternate_scan=%d\n", s->alternate_scan);
......
1587 1589

  
1588 1590
    buf_ptr = buf;
1589 1591
    buf_end = buf + buf_size;
1590
    
1591
    if (s->repeat_field % 2 == 1 && avctx->repeat_pict) {
1592

  
1593
#if 0    
1594
    if (s->repeat_field % 2 == 1) { 
1592 1595
        s->repeat_field++;
1593 1596
        //fprintf(stderr,"\nRepeating last frame: %d -> %d! pict: %d %d", avctx->frame_number-1, avctx->frame_number,
1594
        //                                                         s2->picture_number, s->repeat_field);
1595
        *data_size = sizeof(AVPicture);
1596
        goto the_end;
1597
        //        s2->picture_number, s->repeat_field);
1598
        if (avctx->flags & CODEC_FLAG_REPEAT_FIELD) {
1599
            *data_size = sizeof(AVPicture);
1600
            goto the_end;
1601
        }
1597 1602
    }
1598

  
1603
#endif
1599 1604
    while (buf_ptr < buf_end) {
1600 1605
        buf_start = buf_ptr;
1601 1606
        /* find start next code */
......
1645 1650
                        if (ret == 1) {
1646 1651
                            /* got a picture: exit */
1647 1652
                            /* first check if we must repeat the frame */
1653
                            avctx->repeat_pict = 0;
1654
#if 0
1648 1655
                            if (s2->progressive_frame && s2->repeat_first_field) {
1649 1656
                                //fprintf(stderr,"\nRepeat this frame: %d! pict: %d",avctx->frame_number,s2->picture_number);
1650
                                s2->repeat_first_field = 0;
1651
                                s2->progressive_frame = 0;
1657
                                //s2->repeat_first_field = 0;
1658
                                //s2->progressive_frame = 0;
1652 1659
                                if (++s->repeat_field > 2)
1653 1660
                                    s->repeat_field = 0;
1661
                                avctx->repeat_pict = 1;
1654 1662
                            }
1663
#endif                      
1664
                            if (s2->repeat_first_field) {
1665
                                if (s2->progressive_sequence) {
1666
                                    if (s2->top_field_first)
1667
                                        avctx->repeat_pict = 4;
1668
                                    else
1669
                                        avctx->repeat_pict = 2;
1670
                                } else if (s2->progressive_frame) {
1671
                                    avctx->repeat_pict = 1;
1672
                                }
1673
                            }         
1655 1674
                            *data_size = sizeof(AVPicture);
1656 1675
                            goto the_end;
1657 1676
                        }

Also available in: Unified diff