[FFmpeg-cvslog] avfilter/vf_colorspace: strip color volume metadata
Niklas Haas
git at videolan.org
Mon Dec 23 15:23:34 EET 2024
ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Fri Apr 26 13:07:43 2024 +0200| [eecdc25d4b7c6be368be38279880ed38fc3e1bd2] | committer: Niklas Haas
avfilter/vf_colorspace: strip color volume metadata
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=eecdc25d4b7c6be368be38279880ed38fc3e1bd2
---
libavfilter/vf_colorspace.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index 62055aa1bf..84c6767302 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -25,6 +25,7 @@
#include "libavutil/avassert.h"
#include "libavutil/csp.h"
+#include "libavutil/frame.h"
#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "libavutil/opt.h"
@@ -750,6 +751,12 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
} else {
out->color_trc = s->user_trc;
}
+
+ if (out->color_primaries != in->color_primaries || out->color_trc != in->color_trc) {
+ av_frame_side_data_remove_by_props(&out->side_data, &out->nb_side_data,
+ AV_SIDE_DATA_PROP_COLOR_DEPENDENT);
+ }
+
if (rgb_sz != s->rgb_sz) {
const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(out->format);
int uvw = in->width >> desc->log2_chroma_w;
More information about the ffmpeg-cvslog
mailing list