Skip to content

Commit 57d6aeb

Browse files
kpchoikpchoi
andauthored
Add regression tests for DC coefficient differences beyond 16 bits (#270)
Signed-off-by: kpchoi <kp5.choi@ax.samsung.com> Co-authored-by: kpchoi <kp5.choi@ax.samsung.com>
1 parent 061f4d4 commit 57d6aeb

3 files changed

Lines changed: 31 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,27 @@ set_tests_properties(decode_unconst PROPERTIES
326326
RUN_SERIAL TRUE
327327
)
328328

329+
# Test - encode with an all-ones quantization matrix, which saturates the quantizer
330+
# and makes the DC difference between neighboring blocks exceed 16 bits
331+
add_test(NAME encode_qmatrix COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/oapv_app_enc -i ${CMAKE_CURRENT_SOURCE_DIR}/test/sequence/pattern1_yuv422p10le_320x240_25fps.y4m --max-au 2 -q 0 --q-matrix-c0 "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" --q-matrix-c1 "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" --q-matrix-c2 "1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1" --hash -r rec_qmatrix.yuv -o out_qmatrix.oapv)
332+
set_tests_properties(encode_qmatrix PROPERTIES
333+
TIMEOUT 20
334+
FAIL_REGULAR_EXPRESSION "Encoded frame count = 0"
335+
PASS_REGULAR_EXPRESSION "Encoded frame count = 2"
336+
RUN_SERIAL TRUE
337+
)
338+
339+
# Test - decode the all-ones quantization matrix bitstream
340+
add_test(NAME decode_qmatrix COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/oapv_app_dec -i out_qmatrix.oapv -v 3 --hash)
341+
set_tests_properties(decode_qmatrix PROPERTIES
342+
TIMEOUT 20
343+
DEPENDS encode_qmatrix
344+
FAIL_REGULAR_EXPRESSION "Decoded frame count = 0"
345+
PASS_REGULAR_EXPRESSION "Decoded frame count = 2"
346+
PASS_REGULAR_EXPRESSION ".*hash:match.*"
347+
RUN_SERIAL TRUE
348+
)
349+
329350
# Test - decode qp_A.apv
330351
add_test(NAME decode_qp_A COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/oapv_app_dec -i ${CMAKE_CURRENT_SOURCE_DIR}/test/bitstream/qp_A.apv -v 3 --hash)
331352
set_tests_properties(decode_qp_A PROPERTIES
@@ -371,6 +392,15 @@ set_tests_properties(decode_qp_E PROPERTIES
371392
PASS_REGULAR_EXPRESSION ".*hash:match.*"
372393
)
373394

395+
# Test - decode qp_F.apv
396+
add_test(NAME decode_qp_F COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/oapv_app_dec -i ${CMAKE_CURRENT_SOURCE_DIR}/test/bitstream/qp_F.apv -v 3 --hash)
397+
set_tests_properties(decode_qp_F PROPERTIES
398+
TIMEOUT 20
399+
FAIL_REGULAR_EXPRESSION "Decoded frame count = 0"
400+
PASS_REGULAR_EXPRESSION "Decoded frame count = 2"
401+
PASS_REGULAR_EXPRESSION ".*hash:match.*"
402+
)
403+
374404
# Test - decode syn_A.apv
375405
add_test(NAME decode_syn_A COMMAND ${CMAKE_CURRENT_BINARY_DIR}/bin/oapv_app_dec -i ${CMAKE_CURRENT_SOURCE_DIR}/test/bitstream/syn_A.apv -v 3 --hash)
376406
set_tests_properties(decode_syn_A PROPERTIES

test/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
| 10 | qp_E | Set different QP between luma and chroma | 422-10 | 4.1 | 2 | 60 fps | 3840x2160 | 3 | 7d626cea95f8d7a4b3f1f6e3d10e923c |
1818
| 11 | syn_A | Exercise a synthetic image with QP = 0 and QP = 51 | 422-10 | 4.1 | 2 | 60 fps | 1920x1080 | 2 | 7b0cc8fdffdfca860dcee9b69b051053 |
1919
| 12 | syn_B | Exercise a synthetic image with Tile QP variation in Frame | 422-10 | 4.1 | 2 | 60 fps | 1920x1080 | 2 | b87a59443b009e9241393e6e1a927d61 |
20+
| 13 | qp_F | DC coefficient difference exceeding 16 bits at min. QP (=0) | 422-12 | 1 | 2 | 25 fps | 320x240 | 2 | 36eb37bc3c9ac0e7daf00d59b70214e2 |
2021

2122
## Test sequence
2223
"sequence" folder has the uncompressed video sequence for encoder testing.

test/bitstream/qp_F.apv

19.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)