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

2017-08-23 Thread Tyler Jones
On Wed, Aug 23, 2017 at 10:31:58AM +0200, Tomas Härdin wrote: > On 2017-08-22 03:23, Tyler Jones wrote: > > +static int create_residues(vorbis_enc_context *venc) > > +{ > > +int res, ret; > > +vorbis_enc_residue *rc; > > + > > +venc->nresidues = 2; > > +venc->residues = av_malloc(s

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

2017-08-23 Thread Tomas Härdin
On 2017-08-22 03:23, Tyler Jones wrote: +static int create_residues(vorbis_enc_context *venc) +{ +int res, ret; +vorbis_enc_residue *rc; + +venc->nresidues = 2; +venc->residues = av_malloc(sizeof(vorbis_enc_residue) * venc->nresidues); av_malloc_array()? Applies to most av_mall

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

2017-08-21 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