diff mbox

[FFmpeg-devel,v3,1/2] avfilter/vf_colorbalance:: Fix for framecrc bitexact for 32bit and 64bit system

Message ID 20191115151249.19775-1-lance.lmwang@gmail.com
State Accepted
Commit 5ed20a74b7c068da658142e6c700f4fc02f4a085
Headers show

Commit Message

Lance Wang Nov. 15, 2019, 3:12 p.m. UTC
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 libavfilter/vf_colorbalance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lance Wang May 11, 2020, 3:42 p.m. UTC | #1
On Fri, Nov 15, 2019 at 11:12:48PM +0800, lance.lmwang@gmail.com wrote:
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>  libavfilter/vf_colorbalance.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
> index cc90dc08c7..56f9d5c49c 100644
> --- a/libavfilter/vf_colorbalance.c
> +++ b/libavfilter/vf_colorbalance.c
> @@ -111,7 +111,7 @@ static float get_component(float v, float l,
>      v += m;
>      v += h;
>  
> -    return av_clipf(v, 0, 1);
> +    return av_clipf(v + 0.5f, 0, 1);
>  }

ping the old patchset, plan to push it if no comments after 3-4 day.

>  
>  static float hfun(float n, float h, float s, float l)
> -- 
> 2.21.0
>
diff mbox

Patch

diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
index cc90dc08c7..56f9d5c49c 100644
--- a/libavfilter/vf_colorbalance.c
+++ b/libavfilter/vf_colorbalance.c
@@ -111,7 +111,7 @@  static float get_component(float v, float l,
     v += m;
     v += h;
 
-    return av_clipf(v, 0, 1);
+    return av_clipf(v + 0.5f, 0, 1);
 }
 
 static float hfun(float n, float h, float s, float l)