From ba67e5506bd93eef064d72883ff94dbadee14082 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 5 Aug 2017 00:03:44 +0200 Subject: Add support for skipping conversion to CIEXYZ (not complete) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Some tools are colour space agnostic or even encoding agnostic, by skipping conversion to CIEXYZ when these tools are used, the rendering time can be significantly reduced. The video can also be split horizontally and vertically, and latted merged back, so it is not necessary to convert the entire video if only parts of it actually need it. Because some tools are less agnostic than other tools, partial conversion to CIEXYZ is also added. blind-convert must be updated, and all tools most be test Signed-off-by: Mattias Andrée --- src/blind-stack.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src/blind-stack.c') diff --git a/src/blind-stack.c b/src/blind-stack.c index 29e20b0..c922015 100644 --- a/src/blind-stack.c +++ b/src/blind-stack.c @@ -33,10 +33,10 @@ USAGE("[-bs] bottom-stream ... top-stream") }\ } while (0) -static void process_xyza (struct stream *streams, size_t n_streams, size_t n) { PROCESS(double, 0); } -static void process_xyza_b (struct stream *streams, size_t n_streams, size_t n) { PROCESS(double, 1); } -static void process_xyzaf (struct stream *streams, size_t n_streams, size_t n) { PROCESS(float, 0); } -static void process_xyzaf_b(struct stream *streams, size_t n_streams, size_t n) { PROCESS(float, 1); } +static void process_lf (struct stream *streams, size_t n_streams, size_t n) { PROCESS(double, 0); } +static void process_lf_b(struct stream *streams, size_t n_streams, size_t n) { PROCESS(double, 1); } +static void process_f (struct stream *streams, size_t n_streams, size_t n) { PROCESS(float, 0); } +static void process_f_b (struct stream *streams, size_t n_streams, size_t n) { PROCESS(float, 1); } int main(int argc, char *argv[]) @@ -72,12 +72,14 @@ main(int argc, char *argv[]) frames = streams[i].frames; } - if (!strcmp(streams->pixfmt, "xyza")) - process = blend ? process_xyza_b : process_xyza; - else if (!strcmp(streams->pixfmt, "xyza f")) - process = blend ? process_xyzaf_b : process_xyzaf; + if (streams->encoding == DOUBLE) + process = blend ? process_lf_b :process_lf; + else if (streams->encoding == FLOAT) + process = blend ? process_f_b : process_f; else eprintf("pixel format %s is not supported, try xyza\n", streams->pixfmt); + CHECK_ALPHA_CHAN(streams); + CHECK_N_CHAN(streams, 4, 4); tmp = streams->frames, streams->frames = frames; fprint_stream_head(stdout, streams); -- cgit v1.2.3-70-g09d2