On Tue, Aug 11, 2020 at 05:24:06PM +0200, Paul B Mahol wrote: > NAK > > On 8/11/20, lance.lmw...@gmail.com <lance.lmw...@gmail.com> wrote: > > From: Limin Wang <lance.lmw...@gmail.com> > > > > max is initialized to ((1 << depth) - 1) * 256 * 128 before. > > > > Signed-off-by: Limin Wang <lance.lmw...@gmail.com> > > --- > > libavfilter/vf_w3fdif.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavfilter/vf_w3fdif.c b/libavfilter/vf_w3fdif.c > > index 5d64dbd..0f9efbf 100644 > > --- a/libavfilter/vf_w3fdif.c > > +++ b/libavfilter/vf_w3fdif.c > > @@ -163,7 +163,7 @@ static void filter_scale(uint8_t *out_pixel, const > > int32_t *work_pixel, int line > > int j; > > > > for (j = 0; j < linesize; j++, out_pixel++, work_pixel++) > > - *out_pixel = av_clip(*work_pixel, 0, 255 * 256 * 128) >> 15; > > + *out_pixel = av_clip(*work_pixel, 0, max) >> 15; > > } > > > > static void filter16_simple_low(int32_t *work_line, > > -- > > 1.8.3.1 > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > > > Change is pointless and give no real benefits.
1. max is input as parameter and calculated already, why use it is pointless? 2. keep 8 bit and 16bit with same code so that we can remove the duplicate code later. -- Thanks, Limin Wang _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".