* [FFmpeg-devel] [PATCH] tests/fate/matroska: Add container cropping test
@ 2025-05-16 13:51 Andreas Rheinhardt
2025-05-18 14:08 ` Andreas Rheinhardt
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-05-16 13:51 UTC (permalink / raw)
To: FFmpeg development discussions and patches
[-- Attachment #1: Type: text/plain, Size: 27 bytes --]
Patch attached.
- Andreas
[-- Attachment #2: 0001-tests-fate-matroska-Add-container-cropping-test.patch --]
[-- Type: text/x-patch, Size: 3455 bytes --]
From f930bfd2fcfc97361ad2855491fd577968c38e1d Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Fri, 16 May 2025 15:37:02 +0200
Subject: [PATCH] tests/fate/matroska: Add container cropping test
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
tests/fate/matroska.mak | 12 +++++++
tests/ref/fate/matroska-crop | 70 ++++++++++++++++++++++++++++++++++++
2 files changed, 82 insertions(+)
create mode 100644 tests/ref/fate/matroska-crop
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index 563d756485..b00d19942d 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -100,6 +100,18 @@ fate-matroska-non-rotation-displaymatrix: CMD = transcode mov $(TARGET_SAMPLES)/
"-c copy" \
"-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)
# as well as writing the Cues at the front (by shifting data) if
# the initially reserved amount of space turns out to be insufficient.
diff --git a/tests/ref/fate/matroska-crop b/tests/ref/fate/matroska-crop
new file mode 100644
index 0000000000..12a863942c
--- /dev/null
+++ b/tests/ref/fate/matroska-crop
@@ -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]
--
2.45.2
[-- Attachment #3: Type: text/plain, Size: 251 bytes --]
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [FFmpeg-devel] [PATCH] tests/fate/matroska: Add container cropping test
2025-05-16 13:51 [FFmpeg-devel] [PATCH] tests/fate/matroska: Add container cropping test Andreas Rheinhardt
@ 2025-05-18 14:08 ` Andreas Rheinhardt
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Rheinhardt @ 2025-05-18 14:08 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> Patch attached.
>
> - Andreas
>
Will apply this patch tomorrow unless there are objections.
- Andreas
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-05-18 14:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-16 13:51 [FFmpeg-devel] [PATCH] tests/fate/matroska: Add container cropping test Andreas Rheinhardt
2025-05-18 14:08 ` Andreas Rheinhardt
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git