summaryrefslogtreecommitdiff
path: root/libavfilter/video.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2023-12-31 13:35:03 -0800
committerNiklas Haas <git@haasn.dev>2023-12-31 13:35:03 -0800
commit8c7934f73ab6c568acaa47c821a6833f9145fdbb (patch)
tree1c7667bcabbe3ca66a65ac59bab34444f30ba5bb /libavfilter/video.c
parente687a8485425e3d03ad8fea35b17ac8827ea1b82 (diff)
avfilter: add negotiation API for color space/range
Motivated by YUVJ removal. This change will allow full negotiation between color ranges and matrices as needed. By default, all ranges and matrices are marked as supported. Because grayscale formats are currently handled very inconsistently (and in particular, assumed as forced full-range by swscale), we exclude them from negotiation altogether for the time being, to get this API merged. After filter negotiation is available, we can relax the grayscale-is-forced-jpeg restriction again, when it will be more feasible to do so without breaking a million test cases. Note that this commit updates one FATE test as a consequence of the sanity fallback for non-YUV formats. In particular, the test case now writes rgb24(pc, gbr/unspecified/unspecified) to the matroska file, instead of rgb24(unspecified/unspecified/unspecified) as before.
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r--libavfilter/video.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c
index 42eeb98c28..243762c8fd 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -96,6 +96,8 @@ AVFrame *ff_default_get_video_buffer2(AVFilterLink *link, int w, int h, int alig
return NULL;
frame->sample_aspect_ratio = link->sample_aspect_ratio;
+ frame->colorspace = link->colorspace;
+ frame->color_range = link->color_range;
return frame;
}