[FFmpeg-devel] [PATCH] Put remaining pieces of CODEC_FLAG_EMU_EDGE under FF_API_EMU_EDGE.

Andreas Cadhalpun andreas.cadhalpun at googlemail.com
Sat Aug 22 16:02:39 CEST 2015


Hi Ronald,

On 22.08.2015 15:31, Ronald S. Bultje wrote:
> On Sat, Aug 22, 2015 at 8:53 AM, Andreas Cadhalpun <
> andreas.cadhalpun at googlemail.com> wrote:
>> On 17.08.2015 18:25, Ronald S. Bultje wrote:
>>> diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
>>> index 16c7e05..9f74c9e 100644
>>> --- a/libavcodec/snowenc.c
>>> +++ b/libavcodec/snowenc.c
>>> @@ -1602,7 +1602,11 @@ static int encode_frame(AVCodecContext *avctx,
>> AVPacket *pkt,
>>>          s->lambda = 0;
>>>      }//else keep previous frame's qlog until after motion estimation
>>>
>>> -    if (s->current_picture->data[0] &&
>> !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)) {
>>> +    if (s->current_picture->data[0]
>>> +#if FF_API_EMU_EDGE
>>> +        && !(s->avctx->flags&CODEC_FLAG_EMU_EDGE)
>>> +#endif
>>> +        ) {
>>
>> APIchanges mentions that things should behave "as if the
>> CODEC_FLAG_EMU_EDGE flag
>> was always on". So shouldn't the whole if-block be removed with
>> FF_API_EMU_EDGE?
> 
> 
> I will look into this. However, typically encoder buffers are internally
> owned/allocated, and the edge is used for motion search, so that might
> change results and be unnecessary.

Removing the if-block indeed changes the fate results, so you're
proposal is better.

Best regards,
Andreas



More information about the ffmpeg-devel mailing list