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/define-functions.h | 126 ++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 104 insertions(+), 22 deletions(-) (limited to 'src/define-functions.h') diff --git a/src/define-functions.h b/src/define-functions.h index 3a44829..029265e 100644 --- a/src/define-functions.h +++ b/src/define-functions.h @@ -1,25 +1,107 @@ /* See LICENSE file for copyright and license details. */ -#define PROCESS process_lf -#define TYPE double -#define SCAN_TYPE "lf" -#define PRINT_TYPE "lf" -#define PRINT_CAST double -#include FILE -#undef PROCESS -#undef TYPE -#undef SCAN_TYPE -#undef PRINT_TYPE -#undef PRINT_CAST +#ifndef DONT_INCLUDE_FLOAT +# define PROCESS process_lf +# define TYPE double +# define SCAN_TYPE "lf" +# define PRINT_TYPE "lf" +# define PRINT_CAST double +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +#endif -#define PROCESS process_f -#define TYPE float -#define SCAN_TYPE "f" -#define PRINT_TYPE "lf" -#define PRINT_CAST double -#include FILE -#undef PROCESS -#undef TYPE -#undef SCAN_TYPE -#undef PRINT_TYPE -#undef PRINT_CAST +#ifndef DONT_INCLUDE_DOUBLE +# define PROCESS process_f +# define TYPE float +# define SCAN_TYPE "f" +# define PRINT_TYPE "lf" +# define PRINT_CAST double +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +#endif + +#ifdef INCLUDE_DOUBLE_LONG +# define PROCESS process_llf +# define TYPE long double +# define SCAN_TYPE "Lf" +# define PRINT_TYPE "Lf" +# define PRINT_CAST long double +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +#endif + +#ifdef INCLUDE_UINT8 +# define PROCESS process_u8 +# define TYPE uint8_t +# define SCAN_TYPE SCNu8 +# define PRINT_TYPE "u" +# define PRINT_CAST unsigned +# define INTEGER_TYPE +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +# undef INTEGER_TYPE +#endif + +#ifdef INCLUDE_UINT16 +# define PROCESS process_u16 +# define TYPE uint16_t +# define SCAN_TYPE SCNu16 +# define PRINT_TYPE "u" +# define PRINT_CAST unsigned +# define INTEGER_TYPE +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +# undef INTEGER_TYPE +#endif + +#ifdef INCLUDE_UINT32 +# define PROCESS process_u32 +# define TYPE uint32_t +# define SCAN_TYPE SCNu32 +# define PRINT_TYPE PRIu32 +# define PRINT_CAST uint32_t +# define INTEGER_TYPE +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +# undef INTEGER_TYPE +#endif + +#ifdef INCLUDE_UINT64 +# define PROCESS process_u64 +# define TYPE uint64_t +# define SCAN_TYPE SCNu64 +# define PRINT_TYPE PRIu64 +# define PRINT_CAST uint64_t +# define INTEGER_TYPE +# include FILE +# undef PROCESS +# undef TYPE +# undef SCAN_TYPE +# undef PRINT_TYPE +# undef PRINT_CAST +# undef INTEGER_TYPE +#endif -- cgit v1.2.3-70-g09d2