Skip to content

Commit 11bc130

Browse files
FurongZhangXinfengZhang
authored andcommitted
Added HDR10 Tone Mapping sample code including H2H and H2S config files.
Signed-off-by: Furong Zhang <[email protected]>
1 parent e222df7 commit 11bc130

File tree

4 files changed

+978
-2
lines changed

4 files changed

+978
-2
lines changed

videoprocess/Makefile.am

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2021 Intel Corporation. All Rights Reserved.
1+
# Copyright (c) 2022 Intel Corporation. All Rights Reserved.
22
#
33
# Permission is hereby granted, free of charge, to any person obtaining a
44
# copy of this software and associated documentation files (the
@@ -20,7 +20,7 @@
2020
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2121
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2222

23-
bin_PROGRAMS = vavpp vppscaling_csc vppdenoise vppsharpness vppchromasitting vppblending vppscaling_n_out_usrptr vacopy vpp3dlut
23+
bin_PROGRAMS = vavpp vppscaling_csc vppdenoise vppsharpness vppchromasitting vppblending vppscaling_n_out_usrptr vacopy vpp3dlut vpphdr_tm
2424

2525
AM_CPPFLAGS = \
2626
-Wall \
@@ -64,6 +64,9 @@ vacopy_LDADD = $(TEST_LIBS)
6464
vpp3dlut_SOURCES = vpp3dlut.cpp
6565
vpp3dlut_LDADD = $(TEST_LIBS)
6666

67+
vpphdr_tm_SOURCES = vpphdr_tm.cpp
68+
vpphdr_tm_LDADD = $(TEST_LIBS)
69+
6770
valgrind:(bin_PROGRAMS)
6871
for a in(bin_PROGRAMS); do \
6972
valgrind --leak-check=full --show-reachable=yes .libs/$$a; \
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration information for video process test case.
2+
# This application will firstly load yuv frames to one type of surface(NV12/YV12/I420/P010)
3+
# you require. After video processing, the processed content (ARGB10 surface)
4+
# will be stored to frames(ARGB10 format in file).
5+
# Supported features include: HDR Tone Mapping, implicit format conversion(P010->A2RGB10). Each
6+
# time only one kind of processing will be executed in test application. Although libva supports
7+
# multiple filters execution in one time. you can modify this configuration file to set the
8+
# filter and the corresponding parameters.
9+
10+
#To simplify this test app, we use the default gamut for both source and destination.
11+
#Please set correct gamut according to the real value.
12+
#BT2020 Gammut Multiplier Output
13+
#G 0.17 0.797 50000 8500 39850
14+
#R 0.708 0.292 50000 35400 14600
15+
#B 0.131 0.046 50000 6550 2300
16+
#w 0.3127 0.329 50000 15635 16450
17+
#BT709 Gammut Multiplier Output
18+
#G 0.3 0.6 50000 15000 30000
19+
#R 0.64 0.33 50000 32000 16500
20+
#B 0.15 0.06 50000 7500 3000
21+
#w 0.3127 0.329 50000 15635 16450
22+
23+
#0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S
24+
TM_TYPE: 0
25+
26+
#1.Source YUV(RGB) file information
27+
SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010
28+
SRC_FRAME_WIDTH: 1920
29+
SRC_FRAME_HEIGHT: 1080
30+
SRC_FRAME_FORMAT: P010
31+
SRC_FRAME_COLOUR_PRIMARIES: 9
32+
SRC_FRAME_TRANSFER_CHARACTERISTICS: 16
33+
SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
34+
SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100
35+
SRC_MAX_CONTENT_LIGHT_LEVEL: 4000
36+
SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100
37+
38+
#2.Destination YUV(RGB) file information
39+
DST_FILE_NAME: ShowGirl2Teaser_1920x1080_1000nits_writer.a2rgb10
40+
DST_FRAME_WIDTH: 1920
41+
DST_FRAME_HEIGHT: 1080
42+
DST_FRAME_FORMAT: A2RGB10
43+
DST_FRAME_COLOUR_PRIMARIES: 9
44+
DST_FRAME_TRANSFER_CHARACTERISTICS: 16
45+
DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
46+
DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100
47+
DST_MAX_CONTENT_LIGHT_LEVEL: 1000
48+
DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100
49+
50+
#3.How many frames to be processed
51+
FRAME_SUM: 1
52+
53+
#4.VPP filter specific parameters. If they are not specified here,
54+
#default value will be applied then.
55+
FILTER_TYPE: VAProcFilterHighDynamicRangeToneMapping
56+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Configuration information for video process test case.
2+
# This application will firstly load yuv frames to one type of surface(NV12/YV12/I420/P010)
3+
# you require. After video processing, the processed content (ARGB10 surface)
4+
# will be stored to frames(ARGB10 format in file).
5+
# Supported features include: HDR Tone Mapping, implicit format conversion(P010->A2RGB10). Each
6+
# time only one kind of processing will be executed in test application. Although libva supports
7+
# multiple filters execution in one time. you can modify this configuration file to set the
8+
# filter and the corresponding parameters.
9+
10+
#To simplify this test app, we use the default gamut for both source and destination.
11+
#Please set correct gamut according to the real value.
12+
#BT2020 Gammut Multiplier Output
13+
#G 0.17 0.797 50000 8500 39850
14+
#R 0.708 0.292 50000 35400 14600
15+
#B 0.131 0.046 50000 6550 2300
16+
#w 0.3127 0.329 50000 15635 16450
17+
#BT709 Gammut Multiplier Output
18+
#G 0.3 0.6 50000 15000 30000
19+
#R 0.64 0.33 50000 32000 16500
20+
#B 0.15 0.06 50000 7500 3000
21+
#w 0.3127 0.329 50000 15635 16450
22+
23+
#0. Tone Map Type: 0-H2H, 1-H2E, 2-H2S
24+
TM_TYPE: 2
25+
26+
#1.Source YUV(RGB) file information
27+
SRC_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits.p010
28+
SRC_FRAME_WIDTH: 1920
29+
SRC_FRAME_HEIGHT: 1080
30+
SRC_FRAME_FORMAT: P010
31+
SRC_FRAME_COLOUR_PRIMARIES: 9
32+
SRC_FRAME_TRANSFER_CHARACTERISTICS: 16
33+
SRC_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
34+
SRC_MIN_DISPLAY_MASTERING_LUMINANCE: 100
35+
SRC_MAX_CONTENT_LIGHT_LEVEL: 4000
36+
SRC_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100
37+
38+
#2.Destination YUV(RGB) file information
39+
DST_FILE_NAME: ShowGirl2Teaser_1920x1080_4000nits_writer.argb
40+
DST_FRAME_WIDTH: 1920
41+
DST_FRAME_HEIGHT: 1080
42+
DST_FRAME_FORMAT: RGBA
43+
DST_FRAME_COLOUR_PRIMARIES: 9
44+
DST_FRAME_TRANSFER_CHARACTERISTICS: 1
45+
DST_MAX_DISPLAY_MASTERING_LUMINANCE: 1000
46+
DST_MIN_DISPLAY_MASTERING_LUMINANCE: 100
47+
DST_MAX_CONTENT_LIGHT_LEVEL: 1000
48+
DST_MAX_PICTURE_AVERAGE_LIGHT_LEVEL: 100
49+
50+
#3.How many frames to be processed
51+
FRAME_SUM: 1
52+
53+
#4.VPP filter specific parameters. If they are not specified here,
54+
#default value will be applied then.
55+
FILTER_TYPE: VAProcFilterHighDynamicRangeToneMapping
56+

0 commit comments

Comments
 (0)