Message ID | 20210524034232.5656-1-val.zapod.vz@gmail.com |
---|---|
State | Accepted |
Commit | ff0d70c8a9c2d9266da20039cb1a98ed20b6df12 |
Headers | show |
Series | [FFmpeg-devel] avfilter/vf_hqdn3d: fix left shift of negative numbers | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
пн, 24 мая 2021 г., 6:42 Valerii Zapodovnikov <val.zapod.vz@gmail.com>: > --- > libavfilter/vf_hqdn3d.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c > index 8d71ae316d..bd3eb2d01c 100644 > --- a/libavfilter/vf_hqdn3d.c > +++ b/libavfilter/vf_hqdn3d.c > @@ -179,7 +179,7 @@ static void precalc_coefs(double dist25, int depth, > int16_t *ct) > > gamma = log(0.25) / log(1.0 - FFMIN(dist25,252.0)/255.0 - 0.00001); > > - for (i = -256<<LUT_BITS; i < 256<<LUT_BITS; i++) { > + for (i = -(256<<LUT_BITS); i < 256<<LUT_BITS; i++) { > double f = ((i<<(9-LUT_BITS)) + (1<<(8-LUT_BITS)) - 1) / 512.0; > // midpoint of the bin > simil = FFMAX(0, 1.0 - fabs(f) / 255.0); > C = pow(simil, gamma) * 256.0 * f; > -- > 2.30.2 > Ping. >
On Mon, May 24, 2021 at 06:42:32AM +0300, Valerii Zapodovnikov wrote: > --- > libavfilter/vf_hqdn3d.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply [...]
diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 8d71ae316d..bd3eb2d01c 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -179,7 +179,7 @@ static void precalc_coefs(double dist25, int depth, int16_t *ct) gamma = log(0.25) / log(1.0 - FFMIN(dist25,252.0)/255.0 - 0.00001); - for (i = -256<<LUT_BITS; i < 256<<LUT_BITS; i++) { + for (i = -(256<<LUT_BITS); i < 256<<LUT_BITS; i++) { double f = ((i<<(9-LUT_BITS)) + (1<<(8-LUT_BITS)) - 1) / 512.0; // midpoint of the bin simil = FFMAX(0, 1.0 - fabs(f) / 255.0); C = pow(simil, gamma) * 256.0 * f;