1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

tests/fate/matroska: Add container cropping test

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-05-16 15:37:02 +02:00
parent 95c43c6d0e
commit bd2dcfaed4
2 changed files with 82 additions and 0 deletions

View File

@ -100,6 +100,18 @@ fate-matroska-non-rotation-displaymatrix: CMD = transcode mov $(TARGET_SAMPLES)/
"-c copy" \ "-c copy" \
"-show_entries stream_side_data_list" "-show_entries stream_side_data_list"
# This test tests container cropping. The expected output is that
# only the copied streams have cropping (and displaymatrix) side data
# and that stream #1 (for which applying cropping was not disabled)
# and the reencoded stream #2 decode to the same.
FATE_MATROSKA_FFMPEG_FFPROBE-$(call TRANSCODE, UTVIDEO, MATROSKA, MOV_DEMUXER HEVC_DECODER) \
+= fate-matroska-crop
fate-matroska-crop: CMD = transcode mov $(TARGET_SAMPLES)/heif-conformance/MIAF007.heic matroska \
"-map 0:0 -map 0:0 -map 0:0 -c:0 copy -c:1 copy -c:2 utvideo" \
"-map 0" \
"-show_entries stream=index,codec_name,width,height:stream_side_data_list" "" \
"-apply_cropping:0 none"
# This tests DOVI (reading from MP4 and Matroska and writing to Matroska) # This tests DOVI (reading from MP4 and Matroska and writing to Matroska)
# as well as writing the Cues at the front (by shifting data) if # as well as writing the Cues at the front (by shifting data) if
# the initially reserved amount of space turns out to be insufficient. # the initially reserved amount of space turns out to be insufficient.

View File

@ -0,0 +1,70 @@
fc4932f90dfc955b55cfbdbb210fdd16 *tests/data/fate/matroska-crop.matroska
355698 tests/data/fate/matroska-crop.matroska
#tb 0: 1/1
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 720x1280
#sar 0: 0/1
#tb 1: 1/1
#media_type 1: video
#codec_id 1: rawvideo
#dimensions 1: 360x640
#sar 1: 0/1
#tb 2: 1/1
#media_type 2: video
#codec_id 2: rawvideo
#dimensions 2: 360x640
#sar 2: 0/1
0, 0, 0, 1, 1382400, 0xc8267e89
1, 0, 0, 1, 345600, 0x84b4bdaa
2, 0, 0, 1, 345600, 0x84b4bdaa
[STREAM]
index=0
codec_name=hevc
width=1280
height=720
[SIDE_DATA]
side_data_type=Frame Cropping
crop_top=180
crop_bottom=180
crop_left=320
crop_right=320
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Display Matrix
displaymatrix=
00000000: 0 65536 0
00000001: 65536 0 0
00000002: 0 0 1073741824
rotation=-90
[/SIDE_DATA]
[/STREAM]
[STREAM]
index=1
codec_name=hevc
width=1280
height=720
[SIDE_DATA]
side_data_type=Frame Cropping
crop_top=180
crop_bottom=180
crop_left=320
crop_right=320
[/SIDE_DATA]
[SIDE_DATA]
side_data_type=Display Matrix
displaymatrix=
00000000: 0 65536 0
00000001: 65536 0 0
00000002: 0 0 1073741824
rotation=-90
[/SIDE_DATA]
[/STREAM]
[STREAM]
index=2
codec_name=utvideo
width=360
height=640
[/STREAM]