[FFmpeg-devel] [PATCH][VAAPI][3/6] Add MPEG-2 bitstream decoding (take 5)
Gwenole Beauchesne
gbeauchesne
Sun Mar 22 10:30:37 CET 2009
Le 22 mars 09 ? 04:05, Michael Niedermayer a ?crit :
>> +/** Is the current field the first field for field picture? */
>> +static inline int mpeg2_get_is_first_field(MpegEncContext *s)
>> +{
>> + return s->first_field || s->picture_structure == PICT_FRAME;
>> +}
>
> picture_structure == PICT_FRAME are not field pics
Actually, VA API first_field means !second_field and this is the same
condition as mpeg_field_start()'s. Hmm, I will have to visually check
for this one.
>> + switch (s->pict_type) {
>> + case FF_I_TYPE:
>> + break; // no prediction from other frames
>> + case FF_B_TYPE:
>> + pic_param->backward_reference_picture =
>> ff_vaapi_get_surface(&s->next_picture);
>> + // fall-through
>> + case FF_P_TYPE:
>> + pic_param->forward_reference_picture =
>> ff_vaapi_get_surface(&s->last_picture);
>> + break;
>
>> + default:
>> + assert(0);
>> + return -1;
>
> this is ugly and wrong
> pict_type can at least be that dc only mpeg1 thing too IIRC
I am sorry but I don't understand what you wrote. Could you please
elaborate? Do you mean keep only P and B types and nuke I and default
cases away?
More information about the ffmpeg-devel
mailing list