[FFmpeg-devel] [PATCH] Mobotix .mxg demixer and MxPEG decoder basic implementation
Anatoly Nenashev
nenashev_as
Mon Aug 16 23:53:27 CEST 2010
On 16.08.2010 18:54, Michael Niedermayer wrote:
> On Wed, Aug 11, 2010 at 09:22:48PM +0400, Anatoly Nenashev wrote:
>
>> On 11.08.2010 20:13, Michael Niedermayer wrote:
>>
> [...]
>
>>
>>>> diff -r 02ffe42e2ae2 libavcodec/mjpegdec.c
>>>> --- a/libavcodec/mjpegdec.c Sun Aug 01 14:52:28 2010 +0400
>>>> +++ b/libavcodec/mjpegdec.c Tue Aug 10 23:42:47 2010 +0400
>>>> @@ -331,18 +331,28 @@
>>>> s->avctx->pix_fmt = PIX_FMT_GRAY16;
>>>> }
>>>>
>>>> - if(s->picture.data[0])
>>>> - s->avctx->release_buffer(s->avctx,&s->picture);
>>>> + if (CODEC_ID_MXPEG == s->avctx->codec_id) {
>>>> + if (s->avctx->reget_buffer(s->avctx,&s->picture)< 0) {
>>>>
>>>>
>>> this makes double buffering with direct rendering impossible
>>>
>>>
>>>
>>>
>> Well, I'm not agree or there is something I don't understand. By my opinion
>> reget_buffer do 3 things:
>> 1) create new buffer
>> 2) copy data from old buffer to new buffer
>>
> and then 0-100% of that is overwritten
> if you copy explicitly just what needs copying then it should be faster
>
>
May be faster or may be not. In most cases there will be a small
difference between two sequential frames. Also conditional copy may
cause a problem with branch prediction. Can I move this issue to further
optimizations ?
More information about the ffmpeg-devel
mailing list