Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vorbisenc: Apply dynamic frame lengths

2017-07-25 Thread Tyler Jones
On Wed, Jul 26, 2017 at 01:01:00AM +0100, Rostislav Pehlivanov wrote: > On 12 July 2017 at 23:18, Tyler Jones wrote: > > > > > diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c > > index 399020e..8befab8 100644 > > --- a/libavcodec/vorbis.c > > +++ b/libavcodec/vorbis.c > > @@ -59,7 +59,7 @@

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vorbisenc: Apply dynamic frame lengths

2017-07-25 Thread Rostislav Pehlivanov
On 12 July 2017 at 23:18, Tyler Jones wrote: > Additional codebooks are added for shorter 128-sample frames. Changes in > codeword generation are made to handle valid values of 0 that prepend some > codebooks, otherwise books are classified incorrectly and cause unreadable > streams. > > A second

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vorbisenc: Apply dynamic frame lengths

2017-07-13 Thread Tyler Jones
On Thu, Jul 13, 2017 at 03:50:13PM +0200, Moritz Barsnick wrote: > On Wed, Jul 12, 2017 at 16:18:20 -0600, Tyler Jones wrote: > > -int window_len = 1 << (venc->log2_blocksize[1] - 1); > > -float n = (float)(1 << venc->log2_blocksize[1]) / 4.0; > > +int prev_size, curr_size, next_size, b

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/vorbisenc: Apply dynamic frame lengths

2017-07-13 Thread Moritz Barsnick
On Wed, Jul 12, 2017 at 16:18:20 -0600, Tyler Jones wrote: > -int window_len = 1 << (venc->log2_blocksize[1] - 1); > -float n = (float)(1 << venc->log2_blocksize[1]) / 4.0; > +int prev_size, curr_size, next_size, bound; > +float scale = 1. / (float) (1 << venc->log2_blocksize[blockf

[FFmpeg-devel] [PATCH 2/2] avcodec/vorbisenc: Apply dynamic frame lengths

2017-07-12 Thread Tyler Jones
Additional codebooks are added for shorter 128-sample frames. Changes in codeword generation are made to handle valid values of 0 that prepend some codebooks, otherwise books are classified incorrectly and cause unreadable streams. A second residue, floor, and mapping is created for short window l