diff options
author | Paul B Mahol <onemda@gmail.com> | 2021-08-15 19:33:28 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2021-08-15 20:16:49 +0200 |
commit | efcee3fe0fc8b55984a80fa353049288ad4c9bb3 (patch) | |
tree | 6fdd6d34c676e45c6fa0aecfd29c71b7d1e0e5a6 /libavfilter/vf_colorcorrect.c | |
parent | 33756c539b652fc6c2d10f92ab1ca71559619fa6 (diff) |
avfilter/vf_colorcorrect: remove code touching Y component
It is not needed operation.
Diffstat (limited to 'libavfilter/vf_colorcorrect.c')
-rw-r--r-- | libavfilter/vf_colorcorrect.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/libavfilter/vf_colorcorrect.c b/libavfilter/vf_colorcorrect.c index d4567d2a30..65eb4b7eb6 100644 --- a/libavfilter/vf_colorcorrect.c +++ b/libavfilter/vf_colorcorrect.c @@ -44,9 +44,8 @@ typedef struct ColorCorrectContext { float y = yptr[x] * imax; \ float u = uptr[x] * imax - .5f; \ float v = vptr[x] * imax - .5f; \ - float ny, nu, nv; \ + float nu, nv; \ \ - ny = y; \ nu = saturation * (u + y * bd + bl); \ nv = saturation * (v + y * rd + rl); @@ -77,7 +76,6 @@ static int colorcorrect_slice8(AVFilterContext *ctx, void *arg, int jobnr, int n for (int x = 0; x < width; x++) { PROCESS() - yptr[x] = av_clip_uint8( ny * max); uptr[x] = av_clip_uint8((nu + 0.5f) * max); vptr[x] = av_clip_uint8((nv + 0.5f) * max); } @@ -117,7 +115,6 @@ static int colorcorrect_slice16(AVFilterContext *ctx, void *arg, int jobnr, int for (int x = 0; x < width; x++) { PROCESS() - yptr[x] = av_clip_uintp2_c( ny * max, depth); uptr[x] = av_clip_uintp2_c((nu + 0.5f) * max, depth); vptr[x] = av_clip_uintp2_c((nv + 0.5f) * max, depth); } |