Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-08-15 20:33:28 +0300
committerPaul B Mahol <onemda@gmail.com>2021-08-15 21:16:49 +0300
commitefcee3fe0fc8b55984a80fa353049288ad4c9bb3 (patch)
tree6fdd6d34c676e45c6fa0aecfd29c71b7d1e0e5a6 /libavfilter/vf_colorcorrect.c
parent33756c539b652fc6c2d10f92ab1ca71559619fa6 (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.c5
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);
}