Mercurial > libavcodec.hg
changeset 1682:7b810155650f libavcodec
fixed top_field_first support when encoding
author | bellard |
---|---|
date | Fri, 12 Dec 2003 16:56:38 +0000 |
parents | 27a272442d6b |
children | 043b6d933fc6 |
files | mpeg12.c mpegvideo.c |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg12.c Fri Dec 12 16:55:12 2003 +0000 +++ b/mpeg12.c Fri Dec 12 16:56:38 2003 +0000 @@ -448,7 +448,11 @@ } put_bits(&s->pb, 2, s->intra_dc_precision); put_bits(&s->pb, 2, s->picture_structure= PICT_FRAME); - put_bits(&s->pb, 1, s->top_field_first); + if (s->progressive_sequence) { + put_bits(&s->pb, 1, 0); /* no repeat */ + } else { + put_bits(&s->pb, 1, s->current_picture_ptr->top_field_first); + } /* XXX: optimize the generation of this flag with entropy measures */ s->frame_pred_frame_dct = s->progressive_sequence;
--- a/mpegvideo.c Fri Dec 12 16:55:12 2003 +0000 +++ b/mpegvideo.c Fri Dec 12 16:56:38 2003 +0000 @@ -1560,7 +1560,9 @@ pic->quality= pic_arg->quality; pic->pict_type= pic_arg->pict_type; pic->pts = pic_arg->pts; - + pic->interlaced_frame = pic_arg->interlaced_frame; + pic->top_field_first = pic_arg->top_field_first; + if(s->input_picture[encoding_delay]) pic->display_picture_number= s->input_picture[encoding_delay]->display_picture_number + 1;