[FFmpeg-devel] [PATCH 1/2] swresample: fix phase_count calculation
Michael Niedermayer
michael at niedermayer.cc
Fri Jun 17 09:23:09 CEST 2016
On Fri, Jun 17, 2016 at 05:48:55AM +0700, Muhammad Faiz wrote:
> On Thu, Jun 16, 2016 at 10:03 PM, Michael Niedermayer
> <michael at niedermayer.cc> wrote:
> > On Thu, Jun 16, 2016 at 12:31:03AM +0700, Muhammad Faiz wrote:
> >> support odd phase_count
> >> stick to low phase_count until set_compensation is called
> >
> > can you split these in 2 seperate patches ?
> >
> >
> > [...]
> >> @@ -382,6 +382,9 @@ static ResampleContext *resample_init(ResampleContext *c, int out_rate, int in_r
> >> c->index= -phase_count*((c->filter_length-1)/2);
> >> c->frac= 0;
> >>
> >> + /*av_log(NULL, AV_LOG_ERROR, "phase_count = %d, dst_incr = %d (%d + %d/%d)\n",
> >> + c->phase_count, c->dst_incr, c->dst_incr_div, c->dst_incr_mod, c->src_incr);*/
> >> +
> >> swri_resample_dsp_init(c);
> >>
> >> return c;
> > [...]
> >> + /*av_log(NULL, AV_LOG_ERROR, "phase_count = %d, dst_incr = %d (%d + %d/%d)\n",
> >> + c->phase_count, c->dst_incr, c->dst_incr_div, c->dst_incr_mod, c->src_incr);*/
> >
> > these disabled debug av_log() should probably not be pushed
> >
>
> OK, patches attached
>
> Thank's
> resample.c | 17 ++++++++---------
> 1 file changed, 8 insertions(+), 9 deletions(-)
> 23ee69b87f2a83e8d8d394eabba6cf727940127b 0001-swresample-resample-add-support-for-odd-phase_count.patch
> From 8cb201c678337dbf7c73545919e183f24ada2269 Mon Sep 17 00:00:00 2001
> From: Muhammad Faiz <mfcc64 at gmail.com>
> Date: Fri, 17 Jun 2016 05:30:37 +0700
> Subject: [PATCH 1/2] swresample/resample: add support for odd phase_count
>
> because exact_rational does not guarantee
> that phase_count is even
>
> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
LGTM
[...]
> diff --git a/libswresample/resample.h b/libswresample/resample.h
> index 53788c4..2c29959 100644
> --- a/libswresample/resample.h
> +++ b/libswresample/resample.h
> @@ -51,6 +51,7 @@ typedef struct ResampleContext {
> enum AVSampleFormat format;
> int felem_size;
> int filter_shift;
> + int phase_count_comp;
comp makes me think of computation before compensation, please
use a different name and document the field
should be ok otherwise
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160617/bd220d8d/attachment.sig>
More information about the ffmpeg-devel
mailing list