diff --git a/videoprocess/process_3dlut.cfg.template b/videoprocess/process_3dlut.cfg.template index 166fb0ef..c3e25b3e 100755 --- a/videoprocess/process_3dlut.cfg.template +++ b/videoprocess/process_3dlut.cfg.template @@ -11,6 +11,7 @@ SRC_FRAME_WIDTH: 1920 SRC_FRAME_HEIGHT: 1080 SRC_FRAME_FORMAT: P010 SRC_FILE_FORMAT: P010 +SRC_FULL_RANGE: 0 #2.Destination YUV(RGB) file information DST_FILE_NAME: ./out_1920x1080.p010 diff --git a/videoprocess/vpp3dlut.cpp b/videoprocess/vpp3dlut.cpp index a3045154..7d7efe1f 100755 --- a/videoprocess/vpp3dlut.cpp +++ b/videoprocess/vpp3dlut.cpp @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009-2021, Intel Corporation +* Copyright (c) 2009-2022, Intel Corporation * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -90,6 +90,8 @@ static uint16_t g_3dlut_seg_size = 65; static uint16_t g_3dlut_mul_size = 128; static uint32_t g_3dlut_channel_mapping = 1; +static uint32_t g_input_full_range = 0; + #if VA_CHECK_VERSION(1, 12, 0) static int8_t @@ -1143,6 +1145,8 @@ video_frame_process_3dlut(VASurfaceID in_surface_id, pipeline_param.surface_color_standard = VAProcColorStandardBT2020; pipeline_param.output_color_standard = VAProcColorStandardBT709; + pipeline_param.input_color_properties.color_range = (g_input_full_range) ? VA_SOURCE_RANGE_FULL : VA_SOURCE_RANGE_REDUCED; + va_status = vaCreateBuffer(va_dpy, context_id, VAProcPipelineParameterBufferType, @@ -1423,6 +1427,10 @@ parse_basic_parameters() read_value_string(g_config_file_fd, "SRC_FRAME_FORMAT", str); parse_fourcc_and_format(str, &g_in_fourcc, &g_in_format); + if (read_value_uint32(g_config_file_fd, "SRC_FULL_RANGE", &g_input_full_range)) { + printf("Read source full range failed, exit."); + } + /* Read dst frame file information */ read_value_string(g_config_file_fd, "DST_FILE_NAME", g_dst_file_name); read_value_uint32(g_config_file_fd, "DST_FRAME_WIDTH", &g_out_pic_width); @@ -1554,4 +1562,11 @@ int32_t main(int32_t argc, char *argv[]) return 0; } +#else + +int32_t main(int32_t argc, char *argv[]) +{ + return 0; +} + #endif