[FFmpeg-devel] [PATCH] mpeg12.c: add HW acceleration hooks (take 2)

Gwenole Beauchesne gbeauchesne
Thu Feb 26 13:22:16 CET 2009


On Thu, 26 Feb 2009, Michael Niedermayer wrote:

>> @@ -2403,6 +2421,13 @@ static int decode_chunks(AVCodecContext *avctx,
>>                      break;
>>                  }
>>
>> +                if (avctx->hwaccel) {
>> +                    ret = mpeg_decode_slice(s, mb_y, &buf_ptr, input_size);
>> +                    if (ret != DECODE_SLICE_OK)
>> +                        return -1;
>> +                    break;
>> +                }
>
> why is the call to mpeg_decode_slice a few lines latr in the else
> not enough?

emms_c() would be superfluous, and ff_er_add_slice() would trigger the 
following: "internal error, slice end before start". And since we removed 
resync_mb_x et al. assignments, I would probably have to add an if 
(avctx->hwaccel) return; in that function. Would that be ok with it?




More information about the ffmpeg-devel mailing list