[FFmpeg-cvslog] avfilter/vf_colorcorrect: remove code touching Y component
Paul B Mahol
git at videolan.org
Sun Aug 15 21:18:12 EEST 2021
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Aug 15 19:33:28 2021 +0200| [efcee3fe0fc8b55984a80fa353049288ad4c9bb3] | committer: Paul B Mahol
avfilter/vf_colorcorrect: remove code touching Y component
It is not needed operation.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=efcee3fe0fc8b55984a80fa353049288ad4c9bb3
---
libavfilter/vf_colorcorrect.c | 5 +----
1 file changed, 1 insertion(+), 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);
}
More information about the ffmpeg-cvslog
mailing list