[FFmpeg-devel] [PATCH 1/7] lavf/rawdec: set avg_frame_rate

Anton Khirnov anton at khirnov.net
Sun Apr 9 16:27:40 EEST 2023


Timestamps in two FATE H.264 conformance tests now start at 1 instead
of 0, which also happens in some other H.264 tests before this commit
and so is not a big issue.
Conversely, timestamps in some HEVC conformance tests start from a
smaller value now.
Ideally this should be addressed later in a more general way.

h264-conformance-frext-frext2_panasonic_b no longer requires -vsync
passthrough.
---
 libavformat/rawdec.c                          |  1 +
 tests/fate/h264.mak                           |  2 +-
 .../h264-conformance-frext-frext2_panasonic_b | 30 +++++++++----------
 .../h264-conformance-frext-frext4_panasonic_a | 20 ++++++-------
 .../fate/hevc-conformance-CIP_A_Panasonic_3   |  4 +--
 .../fate/hevc-conformance-CIP_C_Panasonic_2   |  4 +--
 .../ref/fate/hevc-conformance-SDH_A_Orange_3  |  4 +--
 tests/ref/fate/hevc-small422chroma            |  2 +-
 8 files changed, 34 insertions(+), 33 deletions(-)

diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index de804366ed1..9126a9e53b0 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -86,6 +86,7 @@ int ff_raw_video_read_header(AVFormatContext *s)
     st->codecpar->codec_id = s->iformat->raw_codec_id;
     sti->need_parsing = AVSTREAM_PARSE_FULL_RAW;
 
+    st->avg_frame_rate = s1->framerate;
     sti->avctx->framerate = s1->framerate;
     avpriv_set_pts_info(st, 64, 1, 1200000);
 
diff --git a/tests/fate/h264.mak b/tests/fate/h264.mak
index b883f3a3ffa..c8ed23955ac 100644
--- a/tests/fate/h264.mak
+++ b/tests/fate/h264.mak
@@ -346,7 +346,7 @@ fate-h264-conformance-frext-freh7_b:              CMD = framecrc -i $(TARGET_SAM
 fate-h264-conformance-frext-frext01_jvc_d:        CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FREXT01_JVC_D.264
 fate-h264-conformance-frext-frext02_jvc_c:        CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FREXT02_JVC_C.264
 fate-h264-conformance-frext-frext1_panasonic_c:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt1_Panasonic.avc
-fate-h264-conformance-frext-frext2_panasonic_b:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt2_Panasonic.avc -vsync passthrough
+fate-h264-conformance-frext-frext2_panasonic_b:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt2_Panasonic.avc
 fate-h264-conformance-frext-frext3_panasonic_d:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt3_Panasonic.avc
 fate-h264-conformance-frext-frext4_panasonic_a:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt4_Panasonic.avc
 fate-h264-conformance-frext-frext_mmco4_sony_b:   CMD = framecrc -i $(TARGET_SAMPLES)/h264-conformance/FRext/FRExt_MMCO4_Sony_B.264
diff --git a/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b b/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
index 76e4d26cf8f..d4435700828 100644
--- a/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
+++ b/tests/ref/fate/h264-conformance-frext-frext2_panasonic_b
@@ -3,18 +3,18 @@
 #codec_id 0: rawvideo
 #dimensions 0: 352x288
 #sar 0: 0/1
-0,          0,          0,        1,   152064, 0x0147a2a9
-0,          1,          1,        1,   152064, 0xe2365351
-0,          2,          2,        1,   152064, 0xb5f9daee
-0,          3,          3,        1,   152064, 0xd60818b2
-0,          4,          4,        1,   152064, 0x21b528e5
-0,          5,          5,        1,   152064, 0x9c9dda18
-0,          6,          6,        1,   152064, 0x387fe7de
-0,          7,          7,        1,   152064, 0x8f0c5a1e
-0,          8,          8,        1,   152064, 0x02409694
-0,          9,          9,        1,   152064, 0x2b36a7a7
-0,         10,         10,        1,   152064, 0x3c6d3863
-0,         11,         11,        1,   152064, 0xaa7835e1
-0,         12,         12,        1,   152064, 0x6d105fe7
-0,         13,         13,        1,   152064, 0x9a348732
-0,         14,         14,        1,   152064, 0x96a3af13
+0,          1,          1,        1,   152064, 0x0147a2a9
+0,          2,          2,        1,   152064, 0xe2365351
+0,          3,          3,        1,   152064, 0xb5f9daee
+0,          4,          4,        1,   152064, 0xd60818b2
+0,          5,          5,        1,   152064, 0x21b528e5
+0,          6,          6,        1,   152064, 0x9c9dda18
+0,          7,          7,        1,   152064, 0x387fe7de
+0,          8,          8,        1,   152064, 0x8f0c5a1e
+0,          9,          9,        1,   152064, 0x02409694
+0,         10,         10,        1,   152064, 0x2b36a7a7
+0,         11,         11,        1,   152064, 0x3c6d3863
+0,         12,         12,        1,   152064, 0xaa7835e1
+0,         13,         13,        1,   152064, 0x6d105fe7
+0,         14,         14,        1,   152064, 0x9a348732
+0,         15,         15,        1,   152064, 0x96a3af13
diff --git a/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a b/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
index 5640228a263..1f678d1122c 100644
--- a/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
+++ b/tests/ref/fate/h264-conformance-frext-frext4_panasonic_a
@@ -3,13 +3,13 @@
 #codec_id 0: rawvideo
 #dimensions 0: 352x288
 #sar 0: 0/1
-0,          0,          0,        1,   152064, 0xd604d440
-0,          1,          1,        1,   152064, 0x08ef262c
-0,          2,          2,        1,   152064, 0x992fca8e
-0,          3,          3,        1,   152064, 0x5a02ee15
-0,          4,          4,        1,   152064, 0xf15d5c66
-0,          5,          5,        1,   152064, 0x360dda12
-0,          6,          6,        1,   152064, 0x18b54985
-0,          7,          7,        1,   152064, 0xf12b6cde
-0,          8,          8,        1,   152064, 0x3b2e63f7
-0,          9,          9,        1,   152064, 0x140abcfd
+0,          1,          1,        1,   152064, 0xd604d440
+0,          2,          2,        1,   152064, 0x08ef262c
+0,          3,          3,        1,   152064, 0x992fca8e
+0,          4,          4,        1,   152064, 0x5a02ee15
+0,          5,          5,        1,   152064, 0xf15d5c66
+0,          6,          6,        1,   152064, 0x360dda12
+0,          7,          7,        1,   152064, 0x18b54985
+0,          8,          8,        1,   152064, 0xf12b6cde
+0,          9,          9,        1,   152064, 0x3b2e63f7
+0,         10,         10,        1,   152064, 0x140abcfd
diff --git a/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3 b/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
index ebe0f676d27..3adef2f366e 100644
--- a/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
+++ b/tests/ref/fate/hevc-conformance-CIP_A_Panasonic_3
@@ -3,5 +3,5 @@
 #codec_id 0: rawvideo
 #dimensions 0: 416x240
 #sar 0: 0/1
-0,          2,          2,        1,   149760, 0x6e1f16d0
-0,          3,          3,        1,   149760, 0x5be5bde9
+0,          0,          0,        1,   149760, 0x6e1f16d0
+0,          1,          1,        1,   149760, 0x5be5bde9
diff --git a/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2 b/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
index 74f7f8cd74b..8e6c681cfef 100644
--- a/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
+++ b/tests/ref/fate/hevc-conformance-CIP_C_Panasonic_2
@@ -3,5 +3,5 @@
 #codec_id 0: rawvideo
 #dimensions 0: 416x240
 #sar 0: 0/1
-0,          2,          2,        1,   149760, 0xcd1019b2
-0,          3,          3,        1,   149760, 0xeb39efeb
+0,          0,          0,        1,   149760, 0xcd1019b2
+0,          1,          1,        1,   149760, 0xeb39efeb
diff --git a/tests/ref/fate/hevc-conformance-SDH_A_Orange_3 b/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
index e5bc4f8121b..f3ef192c6a6 100644
--- a/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
+++ b/tests/ref/fate/hevc-conformance-SDH_A_Orange_3
@@ -3,5 +3,5 @@
 #codec_id 0: rawvideo
 #dimensions 0: 1920x1080
 #sar 0: 0/1
-0,          2,          2,        1,  3110400, 0x0117aa5d
-0,          3,          3,        1,  3110400, 0xa737bc56
+0,          0,          0,        1,  3110400, 0x0117aa5d
+0,          1,          1,        1,  3110400, 0xa737bc56
diff --git a/tests/ref/fate/hevc-small422chroma b/tests/ref/fate/hevc-small422chroma
index 954829a0ab6..de0ea46c31a 100644
--- a/tests/ref/fate/hevc-small422chroma
+++ b/tests/ref/fate/hevc-small422chroma
@@ -3,4 +3,4 @@
 #codec_id 0: rawvideo
 #dimensions 0: 3840x2160
 #sar 0: 1/1
-0,         11,         11,        1, 33177600, 0x53015e18
+0,          7,          7,        1, 33177600, 0x53015e18
-- 
2.39.1



More information about the ffmpeg-devel mailing list