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

2019-07-15 Thread Derek Buitenhuis
On 15/07/2019 15:53, James Almer wrote: >>> 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 an

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

2019-07-15 Thread James Almer
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

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

2019-07-15 Thread Derek Buitenhuis
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. >> +

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

2019-07-13 Thread Nicolas George
James Almer (12019-07-13): > > +uint8_t *tmp = av_fast_realloc(ctx->pass_data, &ctx->pass_size, > > + ctx->pass_pos + buf_size); > Just use av_reallocp(). Each call will make the buffer bigger, so you're > not really making use the no-op benefits from av

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

2019-07-13 Thread James Almer
On 7/9/2019 3:34 PM, Derek Buitenhuis wrote: > Port to the new send/receive API by: James Almer . > > Signed-off-by: Derek Buitenhuis > --- > Lots of stuff happened since v3! > > * The C API / library is now in rav1e's main repo, and officially supported. > * rav1e will bump the soname and pkg-c

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

2019-07-10 Thread Derek Buitenhuis
On 10/07/2019 13:56, James Almer wrote: >> Heavily disagree. rav1e has its own 'tiles' option that determines the right >> cols/rows to use for a reason, and I will not be emulating libaomenc's algo >> instead of using the one provided by rav1e. It's confusing at best (since >> it goes against the

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

2019-07-10 Thread James Almer
On 7/10/2019 9:22 AM, Derek Buitenhuis wrote: > On 09/07/2019 22:06, James Almer wrote: >>> @@ -3174,6 +3176,7 @@ libopenmpt_demuxer_deps="libopenmpt" >>> libopus_decoder_deps="libopus" >>> libopus_encoder_deps="libopus" >>> libopus_encoder_select="audio_frame_queue" >>> +librav1e_encoder_deps="

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

2019-07-10 Thread Derek Buitenhuis
On 09/07/2019 21:23, Moritz Barsnick wrote: >> +Sets the minimum quantizer (ceiling) to use when in bitrate mdoe. > > Typo -> "mode" Fixed locally. > >> +av_log(avctx, AV_LOG_ERROR, "Unknown return code from >> rav1e_send_frame.\n"); >> +return AVERROR_UNKNOWN; > > Feel free t

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

2019-07-10 Thread Derek Buitenhuis
On 09/07/2019 22:06, James Almer wrote: >> @@ -3174,6 +3176,7 @@ libopenmpt_demuxer_deps="libopenmpt" >> libopus_decoder_deps="libopus" >> libopus_encoder_deps="libopus" >> libopus_encoder_select="audio_frame_queue" >> +librav1e_encoder_deps="librav1e" > > Needs to enable extract_extradata_bsf

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

2019-07-09 Thread James Almer
On 7/9/2019 3:34 PM, Derek Buitenhuis wrote: > Port to the new send/receive API by: James Almer . > > Signed-off-by: Derek Buitenhuis > --- > Lots of stuff happened since v3! > > * The C API / library is now in rav1e's main repo, and officially supported. > * rav1e will bump the soname and pkg-c

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

2019-07-09 Thread Moritz Barsnick
Hi, On Tue, Jul 09, 2019 at 19:34:33 +0100, Derek Buitenhuis wrote: > Port to the new send/receive API by: James Almer . Two nits: > +Sets the minimum quantizer (ceiling) to use when in bitrate mdoe. Typo -> "mode" > +av_log(avctx, AV_LOG_ERROR, "Unknown return code from > rav1e_send_

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

2019-07-09 Thread Derek Buitenhuis
On 09/07/2019 19:34, Derek Buitenhuis wrote: > * Added two pass support. As a side note, I really dislike the stats_out/stats_in API, since it requires the whole stats be held in memory. This my become problematic when rav1e adds temporal RDO (think mbtree) and the stats files grow a lot. - Derek

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

2019-07-09 Thread Derek Buitenhuis
On 09/07/2019 19:34, Derek Buitenhuis wrote: > +Go to @url{https://github.com/lu-zero/crav1e/} and follow the instructions > to build > +the C library. To enable using rav1e in FFmpeg, pass @code{--enable-librav1e} > +to @file{./configure}. Eugh. This is supposed to point to https://github.com/xi

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

2019-07-09 Thread Derek Buitenhuis
Port to the new send/receive API by: James Almer . Signed-off-by: Derek Buitenhuis --- Lots of stuff happened since v3! * The C API / library is now in rav1e's main repo, and officially supported. * rav1e will bump the soname and pkg-config version on any breaking changes. * C API is now as fast