Mercurial > libavcodec.hg
comparison mpegvideo.c @ 12392:ea3d12d95325 libavcodec
Fixed mpeg12 top field first flag value with field picture encoding.
The relevent extract of the iso 13818-2 about the value of the syntaxical
element top_field_first of the Picture Coding Extension is:
"top_field_first -- The meaning of this element depends upon picture_structure,
progressive_sequence and repeat_first_field.
[...]
In a field picture top_field_first shall have the value '0', and the only field
output by the decoding process is the decoded field picture."
author | fenrir |
---|---|
date | Fri, 20 Aug 2010 18:28:42 +0000 |
parents | 914f484bb476 |
children | ffb3668ff7af |
comparison
equal
deleted
inserted
replaced
12391:4be72e19ab0e | 12392:ea3d12d95325 |
---|---|
961 | 961 |
962 if(ff_alloc_picture(s, pic, 0) < 0) | 962 if(ff_alloc_picture(s, pic, 0) < 0) |
963 return -1; | 963 return -1; |
964 | 964 |
965 s->current_picture_ptr= pic; | 965 s->current_picture_ptr= pic; |
966 s->current_picture_ptr->top_field_first= s->top_field_first; //FIXME use only the vars from current_pic | 966 //FIXME use only the vars from current_pic |
967 if(s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO) { | |
968 if(s->picture_structure == PICT_FRAME) | |
969 s->current_picture_ptr->top_field_first= s->top_field_first; | |
970 else | |
971 s->current_picture_ptr->top_field_first= (s->picture_structure == PICT_TOP_FIELD) == s->first_field; | |
972 } else | |
973 s->current_picture_ptr->top_field_first= s->top_field_first; | |
967 s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; | 974 s->current_picture_ptr->interlaced_frame= !s->progressive_frame && !s->progressive_sequence; |
968 } | 975 } |
969 | 976 |
970 s->current_picture_ptr->pict_type= s->pict_type; | 977 s->current_picture_ptr->pict_type= s->pict_type; |
971 // if(s->flags && CODEC_FLAG_QSCALE) | 978 // if(s->flags && CODEC_FLAG_QSCALE) |