[vlc-devel] [PATCH 1/4] scaletempo: move the loop out of transform_buffer()

Romain Vimont rom1v at videolabs.io
Tue Feb 19 15:56:53 CET 2019


On Tue, Feb 19, 2019 at 09:52:34AM -0500, Thomas Guillem wrote:
> 
> 
> On Tue, Feb 19, 2019, at 15:51, Romain Vimont wrote:
> > On Tue, Feb 19, 2019 at 03:46:58PM +0100, Thomas Guillem wrote:
> > > No functional changes.
> > > ---
> > >  modules/audio_filter/scaletempo.c | 34 ++++++++++++++++---------------
> > >  1 file changed, 18 insertions(+), 16 deletions(-)
> > > 
> > > diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
> > > index 6a7afe4190..f8d1adbc2d 100644
> > > --- a/modules/audio_filter/scaletempo.c
> > > +++ b/modules/audio_filter/scaletempo.c
> > > @@ -237,18 +237,13 @@ static size_t fill_queue( filter_t      *p_filter,
> > >  /*****************************************************************************
> > >   * transform_buffer: main filter loop
> > >   *****************************************************************************/
> > > -static size_t transform_buffer( filter_t        *p_filter,
> > > -                                uint8_t         *p_buffer,
> > > -                                size_t           i_buffer,
> > > -                                uint8_t         *pout )
> > > +static size_t transform_buffer( filter_t *p_filter,
> > > +                                uint8_t *pout )
> > >  {
> > >      filter_sys_t *p = p_filter->p_sys;
> > > +    unsigned bytes_out, bytes_off = 0;
> > 
> > bytes_out is not initialized anymore.
> 
> Yes, this is intended.

Cool, then :)

> 
> > 
> > >  
> > > -    size_t offset_in = fill_queue( p_filter, p_buffer, i_buffer, 0 );
> > > -    unsigned bytes_out = 0;
> > > -    while( p->bytes_queued >= p->bytes_queue_max ) {
> > > -        unsigned bytes_off = 0;
> > > -
> > > +    {
> > >          // output stride
> > >          if( p->output_overlap ) {
> > >              if( p->best_overlap_offset ) {
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list