Skip to content

Commit

Permalink
Add AVC separate fields regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
philipnbbc committed Sep 4, 2024
1 parent 75a3a9d commit 3ce05f2
Show file tree
Hide file tree
Showing 6 changed files with 83 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ if(NOT BMX_BUILD_LIB_ONLY AND BMX_BUILD_APPS)
add_subdirectory(as02)
add_subdirectory(as10)
add_subdirectory(as11)
add_subdirectory(avc_separate_fields)
add_subdirectory(avid_mxf)
if(LIBMXF_BUILD_ARCHIVE OR LIBMXF_BUILD_EXAMPLES)
add_subdirectory(bbcarchive)
Expand Down
9 changes: 9 additions & 0 deletions test/avc_separate_fields/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
include("${CMAKE_CURRENT_SOURCE_DIR}/../testing.cmake")

setup_test_dir("avc_separate_fields")

set(args
"${common_args}"
-P "${CMAKE_CURRENT_SOURCE_DIR}/test_avc_separate_fields.cmake"
)
setup_test("avc_separate_fields" "bmx_avc_separate_fields" "${args}")
Binary file added test/avc_separate_fields/separate_fields_gop.h264
Binary file not shown.
71 changes: 71 additions & 0 deletions test/avc_separate_fields/test_avc_separate_fields.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Test creating and transwrapping separate field encoded AVC

include("${TEST_SOURCE_DIR}/../testing.cmake")


if(TEST_MODE STREQUAL "check")
set(output_file_1 test_1.mxf)
elseif(TEST_MODE STREQUAL "samples")
file(MAKE_DIRECTORY ${BMX_TEST_SAMPLES_DIR})

set(output_file_1 ${BMX_TEST_SAMPLES_DIR}/test_avc_separate_fields_1.mxf)
else()
set(output_file_1 test_1.mxf)
endif()

set(create_command ${RAW2BMX}
--regtest-real
-t op1a
-o ${output_file_1}
--clip test
--avc "${TEST_SOURCE_DIR}/separate_fields_gop.h264"
)

run_test_a(
"${TEST_MODE}"
"${BMX_TEST_WITH_VALGRIND}"
""
""
""
"${create_command}"
""
""
""
"${output_file_1}"
"test_avc_separate_fields_1.md5"
""
""
)


if(TEST_MODE STREQUAL "check")
set(output_file_2 test.mxf)
elseif(TEST_MODE STREQUAL "samples")
set(output_file_2 ${BMX_TEST_SAMPLES_DIR}/test_avc_separate_fields_2.mxf)
else()
set(output_file_2 test.mxf)
endif()

set(create_command ${BMXTRANSWRAP}
--regtest
-t op1a
-o ${output_file_2}
--clip test
${output_file_1}
)

run_test_a(
"${TEST_MODE}"
"${BMX_TEST_WITH_VALGRIND}"
""
""
""
"${create_command}"
""
""
""
"${output_file_2}"
"test_avc_separate_fields_2.md5"
""
""
)
1 change: 1 addition & 0 deletions test/avc_separate_fields/test_avc_separate_fields_1.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7b429699a7423ea3c4e41c0b92a85c07
1 change: 1 addition & 0 deletions test/avc_separate_fields/test_avc_separate_fields_2.md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2062122891d2ff6c33956fbe98b85942

0 comments on commit 3ce05f2

Please sign in to comment.