Skip to content

Commit

Permalink
Added HDR10 Tone Mapping sample code including H2H and H2S config files.
Browse files Browse the repository at this point in the history
Signed-off-by: Furong Zhang <furong.zhang@intel.com>
  • Loading branch information
FurongZhang authored and XinfengZhang committed Apr 27, 2022
1 parent e222df7 commit 11bc130
Show file tree
Hide file tree
Showing 4 changed files with 978 additions and 2 deletions.
7 changes: 5 additions & 2 deletions videoprocess/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2021 Intel Corporation. All Rights Reserved.
# Copyright (c) 2022 Intel Corporation. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
Expand All @@ -20,7 +20,7 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

bin_PROGRAMS = vavpp vppscaling_csc vppdenoise vppsharpness vppchromasitting vppblending vppscaling_n_out_usrptr vacopy vpp3dlut
bin_PROGRAMS = vavpp vppscaling_csc vppdenoise vppsharpness vppchromasitting vppblending vppscaling_n_out_usrptr vacopy vpp3dlut vpphdr_tm

AM_CPPFLAGS = \
-Wall \
Expand Down Expand Up @@ -64,6 +64,9 @@ vacopy_LDADD = $(TEST_LIBS)
vpp3dlut_SOURCES = vpp3dlut.cpp
vpp3dlut_LDADD = $(TEST_LIBS)

vpphdr_tm_SOURCES = vpphdr_tm.cpp
vpphdr_tm_LDADD = $(TEST_LIBS)

valgrind:(bin_PROGRAMS)
for a in(bin_PROGRAMS); do \
valgrind --leak-check=full --show-reachable=yes .libs/$$a; \
Expand Down
56 changes: 56 additions & 0 deletions videoprocess/process_hdr_tm_h2h.cfg.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Configuration information for video process test case.
# This application will firstly load yuv frames to one type of surface(NV12/YV12/I420/P010)
# you require. After video processing, the processed content (ARGB10 surface)
# will be stored to frames(ARGB10 format in file).
# Supported features include: HDR Tone Mapping, implicit format conversion(P010->A2RGB10). Each
# time only one kind of processing will be executed in test application. Although libva supports
# multiple filters execution in one time. you can modify this configuration file to set the
# filter and the corresponding parameters.

#To simplify this test app, we use the default gamut for both source and destination.
#Please set correct gamut according to the real value.
#BT2020 Gammut Multiplier Output
#G 0.17 0.797 50000 8500 39850
#R 0.708 0.292 50000 35400 14600
#B 0.131 0.046 50000 6550 2300
#w 0.3127 0.329 50000 15635 16450
#BT709 Gammut Multiplier Output
#G 0.3 0.6 50000 15000 30000
#R 0.64 0.33 50000 32000 16500
#B 0.15 0.06 50000 7500 3000
#w 0.3127 0.329 50000 15635 16450

#0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S
TM_TYPE: 0

#1.Source YUV(RGB) file information
SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010
SRC_FRAME_WIDTH: 1920
SRC_FRAME_HEIGHT: 1080
SRC_FRAME_FORMAT: P010
SRC_FRAME_COLOUR_PRIMARIES: 9
SRC_FRAME_TRANSFER_CHARACTERISTICS: 16
SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100
SRC_MAX_CONTENT_LIGHT_LEVEL: 4000
SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100

#2.Destination YUV(RGB) file information
DST_FILE_NAME: ShowGirl2Teaser_1920x1080_1000nits_writer.a2rgb10
DST_FRAME_WIDTH: 1920
DST_FRAME_HEIGHT: 1080
DST_FRAME_FORMAT: A2RGB10
DST_FRAME_COLOUR_PRIMARIES: 9
DST_FRAME_TRANSFER_CHARACTERISTICS: 16
DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100
DST_MAX_CONTENT_LIGHT_LEVEL: 1000
DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100

#3.How many frames to be processed
FRAME_SUM: 1

#4.VPP filter specific parameters. If they are not specified here,
#default value will be applied then.
FILTER_TYPE: VAProcFilterHighDynamicRangeToneMapping

56 changes: 56 additions & 0 deletions videoprocess/process_hdr_tm_h2s.cfg.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Configuration information for video process test case.
# This application will firstly load yuv frames to one type of surface(NV12/YV12/I420/P010)
# you require. After video processing, the processed content (ARGB10 surface)
# will be stored to frames(ARGB10 format in file).
# Supported features include: HDR Tone Mapping, implicit format conversion(P010->A2RGB10). Each
# time only one kind of processing will be executed in test application. Although libva supports
# multiple filters execution in one time. you can modify this configuration file to set the
# filter and the corresponding parameters.

#To simplify this test app, we use the default gamut for both source and destination.
#Please set correct gamut according to the real value.
#BT2020 Gammut Multiplier Output
#G 0.17 0.797 50000 8500 39850
#R 0.708 0.292 50000 35400 14600
#B 0.131 0.046 50000 6550 2300
#w 0.3127 0.329 50000 15635 16450
#BT709 Gammut Multiplier Output
#G 0.3 0.6 50000 15000 30000
#R 0.64 0.33 50000 32000 16500
#B 0.15 0.06 50000 7500 3000
#w 0.3127 0.329 50000 15635 16450

#0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S
TM_TYPE: 2

#1.Source YUV(RGB) file information
SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010
SRC_FRAME_WIDTH: 1920
SRC_FRAME_HEIGHT: 1080
SRC_FRAME_FORMAT: P010
SRC_FRAME_COLOUR_PRIMARIES: 9
SRC_FRAME_TRANSFER_CHARACTERISTICS: 16
SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100
SRC_MAX_CONTENT_LIGHT_LEVEL: 4000
SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100

#2.Destination YUV(RGB) file information
DST_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits_writer.argb
DST_FRAME_WIDTH: 1920
DST_FRAME_HEIGHT: 1080
DST_FRAME_FORMAT: RGBA
DST_FRAME_COLOUR_PRIMARIES: 9
DST_FRAME_TRANSFER_CHARACTERISTICS: 1
DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100
DST_MAX_CONTENT_LIGHT_LEVEL: 1000
DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100

#3.How many frames to be processed
FRAME_SUM: 1

#4.VPP filter specific parameters. If they are not specified here,
#default value will be applied then.
FILTER_TYPE: VAProcFilterHighDynamicRangeToneMapping

Loading

0 comments on commit 11bc130

Please sign in to comment.