[FFmpeg-cvslog] Add CPiA video decoder

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Sep 2 10:34:40 CEST 2012


On 1 Sep 2012, at 00:11, Stephan Hilb <stephan at ecshi.net> wrote:
>> On Fri, Aug 31, 2012 at 06:22:27PM +0200, Reimar Döffinger wrote:
>>>> +    // Get buffer filled with previous frame
>>>> +    if ((ret = avctx->reget_buffer(avctx, frame)) < 0) {
>>>> +        av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed!\n");
>>>> +        return ret;
>>>> +    }
>>> [...]
>>>> +    if (header[28] == NOT_COMPRESSED) {
>>>> +        frame->pict_type = AV_PICTURE_TYPE_I;
>>>> +        frame->key_frame = 1;
>>>> +    } else {
>>>> +        frame->pict_type = AV_PICTURE_TYPE_P;
>>>> +        frame->key_frame = 0;
>>>> +    }
>>> 
>>> Shouldn't this be set before reget_buffer?
> 
> The builtin reget_buffer doesn't seem to use that information so it
> shouldn't matter.
> I could be wrong though.

What the builtin one does is irrelevant, the codec has the DR1 capability, so an application-provided one might be used.
Which can potentially profit a lot from the key-frame/non-keyframe information (it can ignore the reget and provide a completely new buffer for keyframes, potentially saving a memcpy).


More information about the ffmpeg-cvslog mailing list