[FFmpeg-devel] [PATCHv4] avcodec: Add librav1e encoder

James Almer jamrial at gmail.com
Mon Jul 15 17:53:12 EEST 2019


On 7/15/2019 11:23 AM, Derek Buitenhuis wrote:
> On 13/07/2019 19:37, James Almer wrote:
>> Just use av_reallocp(). Each call will make the buffer bigger, so you're
>> not really making use the no-op benefits from av_fast_realloc(), which
>> only trigger if newsize <= size.
> 
> I'll wait for your reply to Nicholas and do whichevr people agree on.

Leave it as av_fast_realloc(). My suggestion was only a NIT.

> 
>>> +        ctx->pass_size = (strlen(avctx->stats_in) * 3) / 4;
>>
>> AV_BASE64_DECODE_SIZE(strlen(avctx->stats_in));
> 
> I copied this directly from libtheoraenc.c which has had this for more than 10
> years... is it wrong? Should it be changed too?

It's not wrong, that helper macro was added three years ago and it
expands to the same code, except promoting the intermediary result to
int64_t to prevent overflow.
And i think it should ideally be changed in libtheora/libvpx as well, yes.

> 
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list