diff options
| author | Mattias Andrée <maandree@kth.se> | 2017-08-05 00:03:44 +0200 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2017-08-05 00:03:44 +0200 |
| commit | ba67e5506bd93eef064d72883ff94dbadee14082 (patch) | |
| tree | 2c3c77cc1d9e951d8f59f778e1c3f9226ed03f56 /src/blind-stack.c | |
| parent | fix typo and alphabetical order of commands (diff) | |
| download | blind-ba67e5506bd93eef064d72883ff94dbadee14082.tar.gz blind-ba67e5506bd93eef064d72883ff94dbadee14082.tar.bz2 blind-ba67e5506bd93eef064d72883ff94dbadee14082.tar.xz | |
Add support for skipping conversion to CIEXYZ (not complete)
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 <maandree@kth.se>
Diffstat (limited to 'src/blind-stack.c')
| -rw-r--r-- | src/blind-stack.c | 18 |
1 files changed, 10 insertions, 8 deletions
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); |
