The branch, master has been updated
via 3d96d83a0a009a3bf566b208b14a7d264f17263b (commit)
via 69534d4e7e1986c99caed7863de42af9eda90f8f (commit)
from 75b85675916337bc0993f02a70279b96e5903153 (commit)
- Log -----------------------------------------------------------------
commit 3d96d83a0a009a3bf566b208b14a7d264f17263b
Author: Gavin Li <[email protected]>
AuthorDate: Sun Jan 26 22:54:06 2025 -0500
Commit: James Almer <[email protected]>
CommitDate: Thu Nov 27 20:01:54 2025 -0300
avformat/rawdec: set framerate in codec parameters
Commit ba4b73c9779c32580f8a3ba08602a5d94e0bcd7c caused a regression in
the usage of avg_frame_rate to detect the frame rate of raw h264/hevc
bitstreams: after the commit, avg_frame_rate is always the value of the
-framerate option (which is set to 25 by default) instead of the actual
frame rate derived from the bitstream SPS/VPS NALUs.
This commit fixes the regression by setting the framerate codec
parameter to the value of the framerate option instead. After this
change, bitstreams without timing information will derive avg_frame_rate
from the -framerate option, while bitstreams with timing information
will derive avg_frame_rate from the bitstream itself.
The h264-bsf-dts2pts test now returns the correct frame durations for a
bitstream with a mix of single-field and double-field frames.
Signed-off-by: Gavin Li <[email protected]>
Signed-off-by: James Almer <[email protected]>
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index d0c829dc42..5cf2764a0d 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -83,9 +83,9 @@ int ff_raw_video_read_header(AVFormatContext *s)
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
st->codecpar->codec_id = ffifmt(s->iformat)->raw_codec_id;
+ st->codecpar->framerate = s1->framerate;
sti->need_parsing = AVSTREAM_PARSE_FULL_RAW;
- st->avg_frame_rate = s1->framerate;
avpriv_set_pts_info(st, 64, 1, 1200000);
fail:
diff --git a/tests/ref/fate/cavs-demux b/tests/ref/fate/cavs-demux
index c4847293ab..eb16eb1f9d 100644
--- a/tests/ref/fate/cavs-demux
+++ b/tests/ref/fate/cavs-demux
@@ -58,5 +58,5 @@
packet|codec_type=video|stream_index=0|pts=2240000|pts_time=1.866667|dts=2240000
packet|codec_type=video|stream_index=0|pts=2280000|pts_time=1.900000|dts=2280000|dts_time=1.900000|duration=40000|duration_time=0.033333|size=67|pos=172185|flags=___|data_hash=CRC32:42484449
packet|codec_type=video|stream_index=0|pts=2320000|pts_time=1.933333|dts=2320000|dts_time=1.933333|duration=40000|duration_time=0.033333|size=83|pos=172252|flags=___|data_hash=CRC32:a941bdf0
packet|codec_type=video|stream_index=0|pts=2360000|pts_time=1.966667|dts=2360000|dts_time=1.966667|duration=40000|duration_time=0.033333|size=5417|pos=172335|flags=___|data_hash=CRC32:9d0d503b
-stream|index=0|codec_name=cavs|profile=unknown|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=1280|height=720|coded_width=1280|coded_height=720|has_b_frames=0|sample_aspect_ratio=N/A|display_aspect_ratio=N/A|pix_fmt=yuv420p|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=30/1|avg_frame_rate=25/1|time_base=1/1200000|start_pts=N/A|start_time=N/A|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=60|extradata_size=18|extradata_hash=CRC32:1255d52e|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=
0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0
+stream|index=0|codec_name=cavs|profile=unknown|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=1280|height=720|coded_width=1280|coded_height=720|has_b_frames=0|sample_aspect_ratio=N/A|display_aspect_ratio=N/A|pix_fmt=yuv420p|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=30/1|avg_frame_rate=30/1|time_base=1/1200000|start_pts=N/A|start_time=N/A|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=60|extradata_size=18|extradata_hash=CRC32:1255d52e|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=
0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0
format|filename=bunny.mp4|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=cavsvideo|start_time=N/A|duration=N/A|size=177752|bit_rate=N/A|probe_score=51
diff --git a/tests/ref/fate/enhanced-flv-hevc-hdr10
b/tests/ref/fate/enhanced-flv-hevc-hdr10
index 525f056d66..bebcf84fab 100644
--- a/tests/ref/fate/enhanced-flv-hevc-hdr10
+++ b/tests/ref/fate/enhanced-flv-hevc-hdr10
@@ -4,7 +4,7 @@
#codec_id 0: hevc
#dimensions 0: 1280x720
#sar 0: 0/1
-0, 0, 0, 40, 77718, 0xb59c83a5
+0, 0, 0, 0, 77718, 0xb59c83a5
[FRAME]
media_type=video
stream_index=0
@@ -17,7 +17,7 @@ best_effort_timestamp=0
best_effort_timestamp_time=0.000000
duration=N/A
duration_time=N/A
-pkt_pos=459
+pkt_pos=439
pkt_size=77718
width=1280
height=720
diff --git a/tests/ref/fate/h264-bsf-dts2pts b/tests/ref/fate/h264-bsf-dts2pts
index f908bb44f5..46c640eab8 100644
--- a/tests/ref/fate/h264-bsf-dts2pts
+++ b/tests/ref/fate/h264-bsf-dts2pts
@@ -1,5 +1,5 @@
-219edd347ce3151f5b5579d300cd7179 *tests/data/fate/h264-bsf-dts2pts.mov
-243937 tests/data/fate/h264-bsf-dts2pts.mov
+451601038b9091014e45660bc98e09dc *tests/data/fate/h264-bsf-dts2pts.mov
+244033 tests/data/fate/h264-bsf-dts2pts.mov
#extradata 0: 26, 0x75e2093d
#tb 0: 1/1200000
#media_type 0: video
@@ -7,52 +7,52 @@
#dimensions 0: 352x288
#sar 0: 0/1
0, -48000, 0, 48000, 13686, 0x5ee9bd4c
-0, 0, 240000, 48000, 9320, 0x17224db1, F=0x0
-0, 48000, 288000, 48000, 8903, 0xe394918b, F=0x0
-0, 96000, 96000, 48000, 10108, 0x98418e7e, F=0x0
-0, 144000, 144000, 48000, 2937, 0x49dccb76, F=0x0
-0, 192000, 192000, 48000, 2604, 0xfc8013cd, F=0x0
-0, 240000, 480000, 48000, 7420, 0xcb4155cd, F=0x0
-0, 288000, 528000, 48000, 5664, 0x060bc948, F=0x0
-0, 336000, 336000, 48000, 4859, 0x0a5a8368, F=0x0
-0, 384000, 384000, 48000, 2883, 0xb9639a19, F=0x0
-0, 432000, 432000, 48000, 2547, 0xba95e99d, F=0x0
-0, 480000, 672000, 48000, 4659, 0x19203a0d, F=0x0
-0, 528000, 696000, 48000, 9719, 0xb500c328, F=0x0
-0, 576000, 576000, 48000, 5078, 0x5359c6b8, F=0x0
-0, 624000, 624000, 48000, 5041, 0x88dfcdf1, F=0x0
-0, 672000, 864000, 48000, 9494, 0x29297319, F=0x0
-0, 720000, 720000, 48000, 4772, 0x80273a60, F=0x0
-0, 768000, 768000, 48000, 3237, 0xd99e742c, F=0x0
-0, 816000, 816000, 48000, 2650, 0xc7cc378a, F=0x0
-0, 864000, 1152000, 48000, 6519, 0x142aa357, F=0x0
-0, 912000, 1176000, 48000, 5878, 0xe70d7e21, F=0x0
-0, 960000, 960000, 48000, 2648, 0xe58b1c4b, F=0x0
-0, 1008000, 1008000, 48000, 4522, 0x33ad0882, F=0x0
-0, 1056000, 1056000, 48000, 3246, 0xdbfa539f, F=0x0
-0, 1104000, 1104000, 48000, 3027, 0xdb5bf675, F=0x0
-0, 1152000, 1392000, 48000, 9282, 0x07973603, F=0x0
-0, 1200000, 1200000, 48000, 2786, 0x14824d92, F=0x0
-0, 1248000, 1248000, 48000, 2719, 0x00614eef, F=0x0
-0, 1296000, 1296000, 48000, 2627, 0xe8e91216, F=0x0
-0, 1344000, 1344000, 48000, 2720, 0xbe974fcc, F=0x0
-0, 1392000, 1584000, 48000, 7687, 0x0de01895, F=0x0
-0, 1440000, 1440000, 48000, 5464, 0x113f954d, F=0x0
-0, 1488000, 1488000, 48000, 3482, 0x5c90cdae, F=0x0
-0, 1536000, 1536000, 48000, 2791, 0x4acb702a, F=0x0
-0, 1584000, 1872000, 48000, 11362, 0x13363bdb, F=0x0
-0, 1632000, 1920000, 48000, 2975, 0x99b1e813, F=0x0
-0, 1680000, 1680000, 48000, 2342, 0xe9587867, F=0x0
-0, 1728000, 1728000, 48000, 2634, 0x8d9814fc, F=0x0
-0, 1776000, 1776000, 48000, 2419, 0x033cbb5f, F=0x0
-0, 1824000, 1824000, 48000, 2498, 0x7dd9e476, F=0x0
-0, 1872000, 2112000, 48000, 2668, 0x358e2bd8, F=0x0
-0, 1920000, 2136000, 48000, 9068, 0x3a639927, F=0x0
-0, 1968000, 1968000, 48000, 4939, 0xa5309a8c, F=0x0
-0, 2016000, 2016000, 48000, 2650, 0x2ab82b97, F=0x0
-0, 2064000, 2064000, 48000, 2503, 0xfd97cd4c, F=0x0
-0, 2112000, 2352000, 48000, 5121, 0xaf88e5b8, F=0x0
-0, 2160000, 2160000, 48000, 2643, 0xa1791db0, F=0x0
-0, 2208000, 2208000, 48000, 2637, 0xe1a42510, F=0x0
-0, 2256000, 2256000, 48000, 2633, 0x08430f15, F=0x0
-0, 2304000, 2304000, 48000, 2721, 0xe6756990, F=0x0
+0, 0, 144000, 24000, 9320, 0x17224db1, F=0x0
+0, 24000, 168000, 24000, 8903, 0xe394918b, F=0x0
+0, 48000, 48000, 48000, 10108, 0x98418e7e, F=0x0
+0, 96000, 96000, 24000, 2937, 0x49dccb76, F=0x0
+0, 120000, 120000, 24000, 2604, 0xfc8013cd, F=0x0
+0, 144000, 288000, 24000, 7420, 0xcb4155cd, F=0x0
+0, 168000, 312000, 24000, 5664, 0x060bc948, F=0x0
+0, 192000, 192000, 48000, 4859, 0x0a5a8368, F=0x0
+0, 240000, 240000, 24000, 2883, 0xb9639a19, F=0x0
+0, 264000, 264000, 24000, 2547, 0xba95e99d, F=0x0
+0, 288000, 432000, 24000, 4659, 0x19203a0d, F=0x0
+0, 312000, 456000, 24000, 9719, 0xb500c328, F=0x0
+0, 336000, 336000, 48000, 5078, 0x5359c6b8, F=0x0
+0, 384000, 384000, 48000, 5041, 0x88dfcdf1, F=0x0
+0, 432000, 576000, 48000, 9494, 0x29297319, F=0x0
+0, 480000, 480000, 48000, 4772, 0x80273a60, F=0x0
+0, 528000, 528000, 24000, 3237, 0xd99e742c, F=0x0
+0, 552000, 552000, 24000, 2650, 0xc7cc378a, F=0x0
+0, 576000, 720000, 24000, 6519, 0x142aa357, F=0x0
+0, 600000, 744000, 24000, 5878, 0xe70d7e21, F=0x0
+0, 624000, 624000, 24000, 2648, 0xe58b1c4b, F=0x0
+0, 648000, 648000, 24000, 4522, 0x33ad0882, F=0x0
+0, 672000, 672000, 24000, 3246, 0xdbfa539f, F=0x0
+0, 696000, 696000, 24000, 3027, 0xdb5bf675, F=0x0
+0, 720000, 864000, 48000, 9282, 0x07973603, F=0x0
+0, 768000, 768000, 24000, 2786, 0x14824d92, F=0x0
+0, 792000, 792000, 24000, 2719, 0x00614eef, F=0x0
+0, 816000, 816000, 24000, 2627, 0xe8e91216, F=0x0
+0, 840000, 840000, 24000, 2720, 0xbe974fcc, F=0x0
+0, 864000, 1008000, 48000, 7687, 0x0de01895, F=0x0
+0, 912000, 912000, 48000, 5464, 0x113f954d, F=0x0
+0, 960000, 960000, 24000, 3482, 0x5c90cdae, F=0x0
+0, 984000, 984000, 24000, 2791, 0x4acb702a, F=0x0
+0, 1008000, 1152000, 24000, 11362, 0x13363bdb, F=0x0
+0, 1032000, 1176000, 24000, 2975, 0x99b1e813, F=0x0
+0, 1056000, 1056000, 24000, 2342, 0xe9587867, F=0x0
+0, 1080000, 1080000, 24000, 2634, 0x8d9814fc, F=0x0
+0, 1104000, 1104000, 24000, 2419, 0x033cbb5f, F=0x0
+0, 1128000, 1128000, 24000, 2498, 0x7dd9e476, F=0x0
+0, 1152000, 1296000, 24000, 2668, 0x358e2bd8, F=0x0
+0, 1176000, 1320000, 24000, 9068, 0x3a639927, F=0x0
+0, 1200000, 1200000, 48000, 4939, 0xa5309a8c, F=0x0
+0, 1248000, 1248000, 24000, 2650, 0x2ab82b97, F=0x0
+0, 1272000, 1272000, 24000, 2503, 0xfd97cd4c, F=0x0
+0, 1296000, 1440000, 48000, 5121, 0xaf88e5b8, F=0x0
+0, 1344000, 1344000, 24000, 2643, 0xa1791db0, F=0x0
+0, 1368000, 1368000, 24000, 2637, 0xe1a42510, F=0x0
+0, 1392000, 1392000, 24000, 2633, 0x08430f15, F=0x0
+0, 1416000, 1416000, 24000, 2721, 0xe6756990, F=0x0
diff --git a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
b/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
index 0303bc24e6..0a0795df41 100644
--- a/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
+++ b/tests/ref/fate/h264-conformance-cvpcmnl2_sva_c
@@ -1,7 +1,7 @@
-#tb 0: 1/25
+#tb 0: 1/50
#media_type 0: video
#codec_id 0: rawvideo
#dimensions 0: 1280x720
#sar 0: 0/1
-0, 0, 0, 1, 1382400, 0xccbe6bf8
-0, 1, 1, 1, 1382400, 0x49c0cfd7
+0, 0, 0, 2, 1382400, 0xccbe6bf8
+0, 2, 2, 2, 1382400, 0x49c0cfd7
diff --git a/tests/ref/fate/hevc-bsf-dts2pts-cra
b/tests/ref/fate/hevc-bsf-dts2pts-cra
index 4e9e2c5114..e50aad6f70 100644
--- a/tests/ref/fate/hevc-bsf-dts2pts-cra
+++ b/tests/ref/fate/hevc-bsf-dts2pts-cra
@@ -1,5 +1,5 @@
-c3c00fdc637a19fa3d23d37d9974d28d *tests/data/fate/hevc-bsf-dts2pts-cra.mov
-103067 tests/data/fate/hevc-bsf-dts2pts-cra.mov
+f6102684fbf13aa624e6edece38c83f2 *tests/data/fate/hevc-bsf-dts2pts-cra.mov
+102971 tests/data/fate/hevc-bsf-dts2pts-cra.mov
#extradata 0: 118, 0x25f51994
#tb 0: 1/1200000
#media_type 0: video
@@ -54,35 +54,35 @@ c3c00fdc637a19fa3d23d37d9974d28d
*tests/data/fate/hevc-bsf-dts2pts-cra.mov
0, 2016000, 2160000, 48000, 892, 0x0d2ab3bc, F=0x0
0, 2064000, 2112000, 48000, 238, 0x45827561, F=0x0
0, 2112000, 2208000, 48000, 281, 0x2a3a8e61, F=0x0
-0, 2160000, 2256010, 48000, 4629, 0xf2e0fb0f, F=0x0
-0, 2208000, 2256005, 48000, 1453, 0x6ae5dc98, F=0x0
-0, 2256000, 2256002, 1, 869, 0x3982ae69, F=0x0
-0, 2256001, 2256001, 1, 282, 0xd9e28960, F=0x0
-0, 2256002, 2256004, 2, 259, 0x253a809d, F=0x0
-0, 2256004, 2256007, 1, 835, 0x83499f30, F=0x0
-0, 2256005, 2256006, 1, 255, 0xa77b7690, F=0x0
-0, 2256006, 2256008, 1, 242, 0x83977ccf, F=0x0
-0, 2256007, 2256019, 1, 5082, 0xba55ee51, F=0x0
-0, 2256008, 2256014, 2, 1393, 0xc998b442, F=0x0
-0, 2256010, 2256012, 1, 742, 0x91ab75d2, F=0x0
-0, 2256011, 2256011, 1, 229, 0xfa326d98, F=0x0
-0, 2256012, 2256013, 1, 275, 0x49c38226, F=0x0
-0, 2256013, 2256017, 1, 869, 0xdd05acc4, F=0x0
-0, 2256014, 2256016, 2, 293, 0xcc9e904f, F=0x0
-0, 2256016, 2256018, 1, 334, 0x212aa4b1, F=0x0
-0, 2256017, 2256029, 1, 8539, 0xcccc9eb1
-0, 2256018, 2256024, 1, 1593, 0x5a351a68, F=0x0
-0, 2256019, 2256022, 1, 1042, 0xb77d00cc, F=0x0
-0, 2256020, 2256020, 2, 302, 0xbcdb9750, F=0x0
-0, 2256022, 2256023, 1, 336, 0xc7b0a55d, F=0x0
-0, 2256023, 2256026, 1, 875, 0x7e31b046, F=0x0
-0, 2256024, 2256025, 1, 401, 0xb473bca8, F=0x0
-0, 2256025, 2256028, 1, 246, 0x43357263, F=0x0
-0, 2256026, 2256038, 2, 3254, 0x8be44a2d, F=0x0
-0, 2256028, 2256034, 1, 1151, 0x29d52d14, F=0x0
-0, 2256029, 2256031, 1, 733, 0x33606982, F=0x0
-0, 2256030, 2256030, 1, 234, 0xb70a79ff, F=0x0
-0, 2256031, 2256032, 1, 228, 0x86916848, F=0x0
-0, 2256032, 2256036, 2, 689, 0xcca34b40, F=0x0
-0, 2256034, 2256035, 1, 223, 0xa96f6e31, F=0x0
-0, 2256035, 2256037, 1, 241, 0x7ac17531, F=0x0
+0, 2160000, 2640000, 48000, 4629, 0xf2e0fb0f, F=0x0
+0, 2208000, 2448000, 48000, 1453, 0x6ae5dc98, F=0x0
+0, 2256000, 2352000, 48000, 869, 0x3982ae69, F=0x0
+0, 2304000, 2304000, 48000, 282, 0xd9e28960, F=0x0
+0, 2352000, 2400000, 48000, 259, 0x253a809d, F=0x0
+0, 2400000, 2544000, 48000, 835, 0x83499f30, F=0x0
+0, 2448000, 2496000, 48000, 255, 0xa77b7690, F=0x0
+0, 2496000, 2592000, 48000, 242, 0x83977ccf, F=0x0
+0, 2544000, 3024000, 48000, 5082, 0xba55ee51, F=0x0
+0, 2592000, 2832000, 48000, 1393, 0xc998b442, F=0x0
+0, 2640000, 2736000, 48000, 742, 0x91ab75d2, F=0x0
+0, 2688000, 2688000, 48000, 229, 0xfa326d98, F=0x0
+0, 2736000, 2784000, 48000, 275, 0x49c38226, F=0x0
+0, 2784000, 2928000, 48000, 869, 0xdd05acc4, F=0x0
+0, 2832000, 2880000, 48000, 293, 0xcc9e904f, F=0x0
+0, 2880000, 2976000, 48000, 334, 0x212aa4b1, F=0x0
+0, 2928000, 3408000, 48000, 8539, 0xcccc9eb1
+0, 2976000, 3216000, 48000, 1593, 0x5a351a68, F=0x0
+0, 3024000, 3120000, 48000, 1042, 0xb77d00cc, F=0x0
+0, 3072000, 3072000, 48000, 302, 0xbcdb9750, F=0x0
+0, 3120000, 3168000, 48000, 336, 0xc7b0a55d, F=0x0
+0, 3168000, 3312000, 48000, 875, 0x7e31b046, F=0x0
+0, 3216000, 3264000, 48000, 401, 0xb473bca8, F=0x0
+0, 3264000, 3360000, 48000, 246, 0x43357263, F=0x0
+0, 3312000, 3792000, 48000, 3254, 0x8be44a2d, F=0x0
+0, 3360000, 3600000, 48000, 1151, 0x29d52d14, F=0x0
+0, 3408000, 3504000, 48000, 733, 0x33606982, F=0x0
+0, 3456000, 3456000, 48000, 234, 0xb70a79ff, F=0x0
+0, 3504000, 3552000, 48000, 228, 0x86916848, F=0x0
+0, 3552000, 3696000, 48000, 689, 0xcca34b40, F=0x0
+0, 3600000, 3648000, 48000, 223, 0xa96f6e31, F=0x0
+0, 3648000, 3744000, 48000, 241, 0x7ac17531, F=0x0
diff --git a/tests/ref/fate/hevc-bsf-dts2pts-idr
b/tests/ref/fate/hevc-bsf-dts2pts-idr
index 9568a5932c..adfbe75987 100644
--- a/tests/ref/fate/hevc-bsf-dts2pts-idr
+++ b/tests/ref/fate/hevc-bsf-dts2pts-idr
@@ -1,5 +1,5 @@
-368d177821450241820bf3507d74b35a *tests/data/fate/hevc-bsf-dts2pts-idr.mov
-346603 tests/data/fate/hevc-bsf-dts2pts-idr.mov
+8f02d31fece6a067a8488d8ca6ee3329 *tests/data/fate/hevc-bsf-dts2pts-idr.mov
+346579 tests/data/fate/hevc-bsf-dts2pts-idr.mov
#extradata 0: 699, 0x9c810c10
#tb 0: 1/1200000
#media_type 0: video
@@ -47,7 +47,7 @@
0, 1680000, 1824000, 48000, 2208, 0x8e2146e8, F=0x0
0, 1728000, 1776000, 48000, 900, 0x669fb97b, F=0x0
0, 1776000, 1872000, 48000, 817, 0x3eb689e1, F=0x0
-0, 1824000, 2256001, 48000, 17919, 0x4e83b301, F=0x0
+0, 1824000, 2304000, 48000, 17919, 0x4e83b301, F=0x0
0, 1872000, 2112000, 48000, 4911, 0x2fc88e1f, F=0x0
0, 1920000, 2016000, 48000, 2717, 0xcc1f551e, F=0x0
0, 1968000, 1968000, 48000, 908, 0x43e1b421, F=0x0
@@ -55,19 +55,19 @@
0, 2064000, 2208000, 48000, 2857, 0xdeee9614, F=0x0
0, 2112000, 2160000, 48000, 1039, 0x9cf8f494, F=0x0
0, 2160000, 2256000, 48000, 975, 0x0f4ec85b, F=0x0
-0, 2208000, 2256011, 48000, 18345, 0xf9dabd3b, F=0x0
-0, 2256000, 2256006, 1, 5280, 0xc5c33809, F=0x0
-0, 2256001, 2256004, 1, 2755, 0xda955c75, F=0x0
-0, 2256002, 2256002, 2, 1027, 0xf652eff3, F=0x0
-0, 2256004, 2256005, 1, 901, 0xe23cb716, F=0x0
-0, 2256005, 2256008, 1, 3010, 0x783de5cb, F=0x0
-0, 2256006, 2256007, 1, 1005, 0x91fcf92f, F=0x0
-0, 2256007, 2256010, 1, 1131, 0xd88b2920, F=0x0
-0, 2256008, 2256008, 2, 29018, 0xc9b25608
-0, 2256010, 2256016, 1, 7436, 0x18344e77, F=0x0
-0, 2256011, 2256013, 1, 4050, 0x54fcbee0, F=0x0
-0, 2256012, 2256012, 1, 1412, 0xe249bd86, F=0x0
-0, 2256013, 2256014, 1, 977, 0xa749dc21, F=0x0
-0, 2256014, 2256014, 2, 2953, 0xba90c008, F=0x0
-0, 2256016, 2256017, 1, 1004, 0xddebea9a, F=0x0
-0, 2256017, 2256017, 1, 1109, 0x7e081570, F=0x0
+0, 2208000, 2688000, 48000, 18345, 0xf9dabd3b, F=0x0
+0, 2256000, 2496000, 48000, 5280, 0xc5c33809, F=0x0
+0, 2304000, 2400000, 48000, 2755, 0xda955c75, F=0x0
+0, 2352000, 2352000, 48000, 1027, 0xf652eff3, F=0x0
+0, 2400000, 2448000, 48000, 901, 0xe23cb716, F=0x0
+0, 2448000, 2592000, 48000, 3010, 0x783de5cb, F=0x0
+0, 2496000, 2544000, 48000, 1005, 0x91fcf92f, F=0x0
+0, 2544000, 2640000, 48000, 1131, 0xd88b2920, F=0x0
+0, 2592000, 2592000, 48000, 29018, 0xc9b25608
+0, 2640000, 2880000, 48000, 7436, 0x18344e77, F=0x0
+0, 2688000, 2784000, 48000, 4050, 0x54fcbee0, F=0x0
+0, 2736000, 2736000, 48000, 1412, 0xe249bd86, F=0x0
+0, 2784000, 2832000, 1, 977, 0xa749dc21, F=0x0
+0, 2784001, 2784001, 95999, 2953, 0xba90c008, F=0x0
+0, 2880000, 2928000, 1, 1004, 0xddebea9a, F=0x0
+0, 2880001, 2880001, 48000, 1109, 0x7e081570, F=0x0
diff --git a/tests/ref/fate/hevc-bsf-dts2pts-idr-cra
b/tests/ref/fate/hevc-bsf-dts2pts-idr-cra
index 02e9765a26..b12f02581f 100644
--- a/tests/ref/fate/hevc-bsf-dts2pts-idr-cra
+++ b/tests/ref/fate/hevc-bsf-dts2pts-idr-cra
@@ -1,5 +1,5 @@
-07a216d6537502705348fea392d5d73d *tests/data/fate/hevc-bsf-dts2pts-idr-cra.mov
-375266 tests/data/fate/hevc-bsf-dts2pts-idr-cra.mov
+ed8d735b9a2780ce8ada61fd31c68886 *tests/data/fate/hevc-bsf-dts2pts-idr-cra.mov
+375210 tests/data/fate/hevc-bsf-dts2pts-idr-cra.mov
#extradata 0: 648, 0x30a7fa5c
#tb 0: 1/1200000
#media_type 0: video
@@ -47,7 +47,7 @@
0, 1680000, 1824000, 48000, 2674, 0x296fd411, F=0x0
0, 1728000, 1776000, 48000, 1420, 0x304d6168, F=0x0
0, 1776000, 1872000, 48000, 1364, 0x48734084, F=0x0
-0, 1824000, 2256001, 48000, 19349, 0xda0944f0, F=0x0
+0, 1824000, 2304000, 48000, 19349, 0xda0944f0, F=0x0
0, 1872000, 2112000, 48000, 5550, 0x9c346b7b, F=0x0
0, 1920000, 2016000, 48000, 3180, 0x5368f72b, F=0x0
0, 1968000, 1968000, 48000, 1475, 0x369b7aae, F=0x0
@@ -55,19 +55,19 @@
0, 2064000, 2208000, 48000, 3365, 0x81d511a6, F=0x0
0, 2112000, 2160000, 48000, 1575, 0xba81b0a5, F=0x0
0, 2160000, 2256000, 48000, 1538, 0xf1199439, F=0x0
-0, 2208000, 2256011, 48000, 20138, 0x101fb220, F=0x0
-0, 2256000, 2256006, 1, 5806, 0xcc500158, F=0x0
-0, 2256001, 2256004, 1, 3267, 0xf8f0d6cd, F=0x0
-0, 2256002, 2256002, 2, 1557, 0x894faf3e, F=0x0
-0, 2256004, 2256005, 1, 1482, 0x6b1884b7, F=0x0
-0, 2256005, 2256008, 1, 3513, 0x81227a59, F=0x0
-0, 2256006, 2256007, 1, 1576, 0x855eabd8, F=0x0
-0, 2256007, 2256010, 1, 1668, 0x030ade2e, F=0x0
-0, 2256008, 2256008, 2, 32088, 0xfadbf5f6
-0, 2256010, 2256016, 1, 5921, 0x21fb4976, F=0x0
-0, 2256011, 2256013, 1, 3436, 0x92085cd6, F=0x0
-0, 2256012, 2256012, 1, 1613, 0x1e0cb7c6, F=0x0
-0, 2256013, 2256014, 1, 1483, 0x88d18a4e, F=0x0
-0, 2256014, 2256018, 2, 3540, 0xc57c8e7b, F=0x0
-0, 2256016, 2256017, 1, 1561, 0x9740a363, F=0x0
-0, 2256017, 2256019, 1, 1651, 0x18e3d52d, F=0x0
+0, 2208000, 2688000, 48000, 20138, 0x101fb220, F=0x0
+0, 2256000, 2496000, 48000, 5806, 0xcc500158, F=0x0
+0, 2304000, 2400000, 48000, 3267, 0xf8f0d6cd, F=0x0
+0, 2352000, 2352000, 48000, 1557, 0x894faf3e, F=0x0
+0, 2400000, 2448000, 48000, 1482, 0x6b1884b7, F=0x0
+0, 2448000, 2592000, 48000, 3513, 0x81227a59, F=0x0
+0, 2496000, 2544000, 48000, 1576, 0x855eabd8, F=0x0
+0, 2544000, 2640000, 48000, 1668, 0x030ade2e, F=0x0
+0, 2592000, 2592000, 48000, 32088, 0xfadbf5f6
+0, 2640000, 2880000, 48000, 5921, 0x21fb4976, F=0x0
+0, 2688000, 2784000, 48000, 3436, 0x92085cd6, F=0x0
+0, 2736000, 2736000, 48000, 1613, 0x1e0cb7c6, F=0x0
+0, 2784000, 2832000, 48000, 1483, 0x88d18a4e, F=0x0
+0, 2832000, 2976000, 48000, 3540, 0xc57c8e7b, F=0x0
+0, 2880000, 2928000, 48000, 1561, 0x9740a363, F=0x0
+0, 2928000, 3024000, 48000, 1651, 0x18e3d52d, F=0x0
diff --git a/tests/ref/lavf-fate/hevc.mp4 b/tests/ref/lavf-fate/hevc.mp4
index aea5ae8979..39dddd49cb 100644
--- a/tests/ref/lavf-fate/hevc.mp4
+++ b/tests/ref/lavf-fate/hevc.mp4
@@ -1,3 +1,3 @@
-37b3a3e84df2350380b05b2af4dc97f5 *tests/data/lavf-fate/lavf.hevc.mp4
+539b0f6daece6656609de0898a1f3d42 *tests/data/lavf-fate/lavf.hevc.mp4
151340 tests/data/lavf-fate/lavf.hevc.mp4
tests/data/lavf-fate/lavf.hevc.mp4 CRC=0xc0a771de
commit 69534d4e7e1986c99caed7863de42af9eda90f8f
Author: James Almer <[email protected]>
AuthorDate: Tue Nov 25 18:55:35 2025 -0300
Commit: James Almer <[email protected]>
CommitDate: Thu Nov 27 20:01:54 2025 -0300
avcodec/cavs_parser: parse sequence headers for stream parameters
Signed-off-by: James Almer <[email protected]>
diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c
index 13fbd009c8..882840cd7f 100644
--- a/libavcodec/cavs_parser.c
+++ b/libavcodec/cavs_parser.c
@@ -27,7 +27,10 @@
#include "parser.h"
#include "cavs.h"
+#include "get_bits.h"
+#include "mpeg12data.h"
#include "parser_internal.h"
+#include "startcode.h"
/**
@@ -73,6 +76,85 @@ static int cavs_find_frame_end(ParseContext *pc, const
uint8_t *buf,
return END_NOT_FOUND;
}
+static int parse_seq_header(AVCodecParserContext *s, AVCodecContext *avctx,
+ GetBitContext *gb)
+{
+ int frame_rate_code;
+ int width, height;
+ int mb_width, mb_height;
+
+ skip_bits(gb, 8); // profile
+ skip_bits(gb, 8); // level
+ skip_bits1(gb); // progressive sequence
+
+ width = get_bits(gb, 14);
+ height = get_bits(gb, 14);
+ if (width <= 0 || height <= 0) {
+ av_log(avctx, AV_LOG_ERROR, "Dimensions invalid\n");
+ return AVERROR_INVALIDDATA;
+ }
+ mb_width = (width + 15) >> 4;
+ mb_height = (height + 15) >> 4;
+
+ skip_bits(gb, 2); // chroma format
+ skip_bits(gb, 3); // sample_precision
+ skip_bits(gb, 4); // aspect_ratio
+ frame_rate_code = get_bits(gb, 4);
+ if (frame_rate_code == 0 || frame_rate_code > 13) {
+ av_log(avctx, AV_LOG_WARNING,
+ "frame_rate_code %d is invalid\n", frame_rate_code);
+ frame_rate_code = 1;
+ }
+
+ skip_bits(gb, 18); // bit_rate_lower
+ skip_bits1(gb); // marker_bit
+ skip_bits(gb, 12); // bit_rate_upper
+ skip_bits1(gb); // low_delay
+
+ s->width = width;
+ s->height = height;
+ s->coded_width = 16 * mb_width;
+ s->coded_height = 16 * mb_height;
+ avctx->framerate = ff_mpeg12_frame_rate_tab[frame_rate_code];
+
+ return 0;
+}
+
+static int cavs_parse_frame(AVCodecParserContext *s, AVCodecContext *avctx,
+ const uint8_t *buf, int buf_size)
+{
+ GetBitContext gb;
+ const uint8_t *buf_end;
+ const uint8_t *buf_ptr;
+ uint32_t stc = -1;
+
+ s->key_frame = 0;
+ s->pict_type = AV_PICTURE_TYPE_NONE;
+
+ if (buf_size == 0)
+ return 0;
+
+ buf_ptr = buf;
+ buf_end = buf + buf_size;
+ for (;;) {
+ buf_ptr = avpriv_find_start_code(buf_ptr, buf_end, &stc);
+ if ((stc & 0xFFFFFE00) || buf_ptr == buf_end)
+ return 0;
+ switch (stc) {
+ case CAVS_START_CODE:
+ init_get_bits8(&gb, buf_ptr, buf_end - buf_ptr);
+ parse_seq_header(s, avctx, &gb);
+ break;
+ case PIC_I_START_CODE:
+ s->key_frame = 1;
+ s->pict_type = AV_PICTURE_TYPE_I;
+ break;
+ default:
+ break;
+ }
+ }
+}
+
static int cavsvideo_parse(AVCodecParserContext *s,
AVCodecContext *avctx,
const uint8_t **poutbuf, int *poutbuf_size,
@@ -92,6 +174,9 @@ static int cavsvideo_parse(AVCodecParserContext *s,
return buf_size;
}
}
+
+ cavs_parse_frame(s, avctx, buf, buf_size);
+
*poutbuf = buf;
*poutbuf_size = buf_size;
return next;
diff --git a/tests/ref/fate/cavs-demux b/tests/ref/fate/cavs-demux
index b1e2c2fd25..c4847293ab 100644
--- a/tests/ref/fate/cavs-demux
+++ b/tests/ref/fate/cavs-demux
@@ -1,62 +1,62 @@
-packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=48000|duration_time=0.040000|size=14447|pos=0|flags=K__|data_hash=CRC32:83f257c0
-packet|codec_type=video|stream_index=0|pts=48000|pts_time=0.040000|dts=48000|dts_time=0.040000|duration=48000|duration_time=0.040000|size=483|pos=14447|flags=K__|data_hash=CRC32:5abb82f8
-packet|codec_type=video|stream_index=0|pts=96000|pts_time=0.080000|dts=96000|dts_time=0.080000|duration=48000|duration_time=0.040000|size=18|pos=14930|flags=K__|data_hash=CRC32:b8b123d8
-packet|codec_type=video|stream_index=0|pts=144000|pts_time=0.120000|dts=144000|dts_time=0.120000|duration=48000|duration_time=0.040000|size=18|pos=14948|flags=K__|data_hash=CRC32:19180fa8
-packet|codec_type=video|stream_index=0|pts=192000|pts_time=0.160000|dts=192000|dts_time=0.160000|duration=48000|duration_time=0.040000|size=18|pos=14966|flags=K__|data_hash=CRC32:cf501647
-packet|codec_type=video|stream_index=0|pts=240000|pts_time=0.200000|dts=240000|dts_time=0.200000|duration=40000|duration_time=0.033333|size=1807|pos=14984|flags=K__|data_hash=CRC32:4267e1d5
-packet|codec_type=video|stream_index=0|pts=280000|pts_time=0.233333|dts=280000|dts_time=0.233333|duration=40000|duration_time=0.033333|size=28|pos=16791|flags=K__|data_hash=CRC32:c223285a
-packet|codec_type=video|stream_index=0|pts=320000|pts_time=0.266667|dts=320000|dts_time=0.266667|duration=40000|duration_time=0.033333|size=25|pos=16819|flags=K__|data_hash=CRC32:2565cc9e
-packet|codec_type=video|stream_index=0|pts=360000|pts_time=0.300000|dts=360000|dts_time=0.300000|duration=40000|duration_time=0.033333|size=22|pos=16844|flags=K__|data_hash=CRC32:7fbf36ac
-packet|codec_type=video|stream_index=0|pts=400000|pts_time=0.333333|dts=400000|dts_time=0.333333|duration=40000|duration_time=0.033333|size=23884|pos=16866|flags=K__|data_hash=CRC32:d61430fd
-packet|codec_type=video|stream_index=0|pts=440000|pts_time=0.366667|dts=440000|dts_time=0.366667|duration=40000|duration_time=0.033333|size=265|pos=40750|flags=K__|data_hash=CRC32:d64145a0
-packet|codec_type=video|stream_index=0|pts=480000|pts_time=0.400000|dts=480000|dts_time=0.400000|duration=40000|duration_time=0.033333|size=393|pos=41015|flags=K__|data_hash=CRC32:32c020e2
-packet|codec_type=video|stream_index=0|pts=520000|pts_time=0.433333|dts=520000|dts_time=0.433333|duration=40000|duration_time=0.033333|size=656|pos=41408|flags=K__|data_hash=CRC32:965c7846
-packet|codec_type=video|stream_index=0|pts=560000|pts_time=0.466667|dts=560000|dts_time=0.466667|duration=40000|duration_time=0.033333|size=3500|pos=42064|flags=K__|data_hash=CRC32:ddf731de
-packet|codec_type=video|stream_index=0|pts=600000|pts_time=0.500000|dts=600000|dts_time=0.500000|duration=40000|duration_time=0.033333|size=68|pos=45564|flags=K__|data_hash=CRC32:f8c8ba07
-packet|codec_type=video|stream_index=0|pts=640000|pts_time=0.533333|dts=640000|dts_time=0.533333|duration=40000|duration_time=0.033333|size=58|pos=45632|flags=K__|data_hash=CRC32:22adbb83
-packet|codec_type=video|stream_index=0|pts=680000|pts_time=0.566667|dts=680000|dts_time=0.566667|duration=40000|duration_time=0.033333|size=43|pos=45690|flags=K__|data_hash=CRC32:53fb136c
-packet|codec_type=video|stream_index=0|pts=720000|pts_time=0.600000|dts=720000|dts_time=0.600000|duration=40000|duration_time=0.033333|size=11757|pos=45733|flags=K__|data_hash=CRC32:551e491b
-packet|codec_type=video|stream_index=0|pts=760000|pts_time=0.633333|dts=760000|dts_time=0.633333|duration=40000|duration_time=0.033333|size=98|pos=57490|flags=K__|data_hash=CRC32:4e718dd4
-packet|codec_type=video|stream_index=0|pts=800000|pts_time=0.666667|dts=800000|dts_time=0.666667|duration=40000|duration_time=0.033333|size=79|pos=57588|flags=K__|data_hash=CRC32:4c5a32f5
-packet|codec_type=video|stream_index=0|pts=840000|pts_time=0.700000|dts=840000|dts_time=0.700000|duration=40000|duration_time=0.033333|size=128|pos=57667|flags=K__|data_hash=CRC32:95b8cad1
-packet|codec_type=video|stream_index=0|pts=880000|pts_time=0.733333|dts=880000|dts_time=0.733333|duration=40000|duration_time=0.033333|size=10487|pos=57795|flags=K__|data_hash=CRC32:8646f8f2
-packet|codec_type=video|stream_index=0|pts=920000|pts_time=0.766667|dts=920000|dts_time=0.766667|duration=40000|duration_time=0.033333|size=65|pos=68282|flags=K__|data_hash=CRC32:73687d19
-packet|codec_type=video|stream_index=0|pts=960000|pts_time=0.800000|dts=960000|dts_time=0.800000|duration=40000|duration_time=0.033333|size=46|pos=68347|flags=K__|data_hash=CRC32:ad381ca5
-packet|codec_type=video|stream_index=0|pts=1000000|pts_time=0.833333|dts=1000000|dts_time=0.833333|duration=40000|duration_time=0.033333|size=67|pos=68393|flags=K__|data_hash=CRC32:89069152
-packet|codec_type=video|stream_index=0|pts=1040000|pts_time=0.866667|dts=1040000|dts_time=0.866667|duration=40000|duration_time=0.033333|size=8403|pos=68460|flags=K__|data_hash=CRC32:a22913dd
-packet|codec_type=video|stream_index=0|pts=1080000|pts_time=0.900000|dts=1080000|dts_time=0.900000|duration=40000|duration_time=0.033333|size=70|pos=76863|flags=K__|data_hash=CRC32:98772596
-packet|codec_type=video|stream_index=0|pts=1120000|pts_time=0.933333|dts=1120000|dts_time=0.933333|duration=40000|duration_time=0.033333|size=63|pos=76933|flags=K__|data_hash=CRC32:cfd62cc4
-packet|codec_type=video|stream_index=0|pts=1160000|pts_time=0.966667|dts=1160000|dts_time=0.966667|duration=40000|duration_time=0.033333|size=70|pos=76996|flags=K__|data_hash=CRC32:9b526357
-packet|codec_type=video|stream_index=0|pts=1200000|pts_time=1.000000|dts=1200000|dts_time=1.000000|duration=40000|duration_time=0.033333|size=7945|pos=77066|flags=K__|data_hash=CRC32:d0f46769
-packet|codec_type=video|stream_index=0|pts=1240000|pts_time=1.033333|dts=1240000|dts_time=1.033333|duration=40000|duration_time=0.033333|size=40558|pos=85011|flags=K__|data_hash=CRC32:4db0bd7d
-packet|codec_type=video|stream_index=0|pts=1280000|pts_time=1.066667|dts=1280000|dts_time=1.066667|duration=40000|duration_time=0.033333|size=1260|pos=125569|flags=K__|data_hash=CRC32:3c4397d7
-packet|codec_type=video|stream_index=0|pts=1320000|pts_time=1.100000|dts=1320000|dts_time=1.100000|duration=40000|duration_time=0.033333|size=27|pos=126829|flags=K__|data_hash=CRC32:5e233c77
-packet|codec_type=video|stream_index=0|pts=1360000|pts_time=1.133333|dts=1360000|dts_time=1.133333|duration=40000|duration_time=0.033333|size=26|pos=126856|flags=K__|data_hash=CRC32:57985e7b
-packet|codec_type=video|stream_index=0|pts=1400000|pts_time=1.166667|dts=1400000|dts_time=1.166667|duration=40000|duration_time=0.033333|size=18|pos=126882|flags=K__|data_hash=CRC32:f4eb01ba
-packet|codec_type=video|stream_index=0|pts=1440000|pts_time=1.200000|dts=1440000|dts_time=1.200000|duration=40000|duration_time=0.033333|size=2931|pos=126900|flags=K__|data_hash=CRC32:ca20964f
-packet|codec_type=video|stream_index=0|pts=1480000|pts_time=1.233333|dts=1480000|dts_time=1.233333|duration=40000|duration_time=0.033333|size=25|pos=129831|flags=K__|data_hash=CRC32:a82bd0b4
-packet|codec_type=video|stream_index=0|pts=1520000|pts_time=1.266667|dts=1520000|dts_time=1.266667|duration=40000|duration_time=0.033333|size=19|pos=129856|flags=K__|data_hash=CRC32:bc5f709d
-packet|codec_type=video|stream_index=0|pts=1560000|pts_time=1.300000|dts=1560000|dts_time=1.300000|duration=40000|duration_time=0.033333|size=30|pos=129875|flags=K__|data_hash=CRC32:c1f8a4c9
-packet|codec_type=video|stream_index=0|pts=1600000|pts_time=1.333333|dts=1600000|dts_time=1.333333|duration=40000|duration_time=0.033333|size=5088|pos=129905|flags=K__|data_hash=CRC32:41ace145
-packet|codec_type=video|stream_index=0|pts=1640000|pts_time=1.366667|dts=1640000|dts_time=1.366667|duration=40000|duration_time=0.033333|size=41|pos=134993|flags=K__|data_hash=CRC32:e169b3c7
-packet|codec_type=video|stream_index=0|pts=1680000|pts_time=1.400000|dts=1680000|dts_time=1.400000|duration=40000|duration_time=0.033333|size=53|pos=135034|flags=K__|data_hash=CRC32:973c5fe3
-packet|codec_type=video|stream_index=0|pts=1720000|pts_time=1.433333|dts=1720000|dts_time=1.433333|duration=40000|duration_time=0.033333|size=54|pos=135087|flags=K__|data_hash=CRC32:665639e6
-packet|codec_type=video|stream_index=0|pts=1760000|pts_time=1.466667|dts=1760000|dts_time=1.466667|duration=40000|duration_time=0.033333|size=7150|pos=135141|flags=K__|data_hash=CRC32:cc910027
-packet|codec_type=video|stream_index=0|pts=1800000|pts_time=1.500000|dts=1800000|dts_time=1.500000|duration=40000|duration_time=0.033333|size=48|pos=142291|flags=K__|data_hash=CRC32:45658f78
-packet|codec_type=video|stream_index=0|pts=1840000|pts_time=1.533333|dts=1840000|dts_time=1.533333|duration=40000|duration_time=0.033333|size=48|pos=142339|flags=K__|data_hash=CRC32:94e359a2
-packet|codec_type=video|stream_index=0|pts=1880000|pts_time=1.566667|dts=1880000|dts_time=1.566667|duration=40000|duration_time=0.033333|size=51|pos=142387|flags=K__|data_hash=CRC32:959ccdd9
-packet|codec_type=video|stream_index=0|pts=1920000|pts_time=1.600000|dts=1920000|dts_time=1.600000|duration=40000|duration_time=0.033333|size=9379|pos=142438|flags=K__|data_hash=CRC32:a3318410
-packet|codec_type=video|stream_index=0|pts=1960000|pts_time=1.633333|dts=1960000|dts_time=1.633333|duration=40000|duration_time=0.033333|size=58|pos=151817|flags=K__|data_hash=CRC32:44b24f03
-packet|codec_type=video|stream_index=0|pts=2000000|pts_time=1.666667|dts=2000000|dts_time=1.666667|duration=40000|duration_time=0.033333|size=43|pos=151875|flags=K__|data_hash=CRC32:f4876e05
-packet|codec_type=video|stream_index=0|pts=2040000|pts_time=1.700000|dts=2040000|dts_time=1.700000|duration=40000|duration_time=0.033333|size=62|pos=151918|flags=K__|data_hash=CRC32:34dce749
-packet|codec_type=video|stream_index=0|pts=2080000|pts_time=1.733333|dts=2080000|dts_time=1.733333|duration=40000|duration_time=0.033333|size=10733|pos=151980|flags=K__|data_hash=CRC32:9012fdfb
-packet|codec_type=video|stream_index=0|pts=2120000|pts_time=1.766667|dts=2120000|dts_time=1.766667|duration=40000|duration_time=0.033333|size=58|pos=162713|flags=K__|data_hash=CRC32:8a3c8760
-packet|codec_type=video|stream_index=0|pts=2160000|pts_time=1.800000|dts=2160000|dts_time=1.800000|duration=40000|duration_time=0.033333|size=41|pos=162771|flags=K__|data_hash=CRC32:28da6bf4
-packet|codec_type=video|stream_index=0|pts=2200000|pts_time=1.833333|dts=2200000|dts_time=1.833333|duration=40000|duration_time=0.033333|size=68|pos=162812|flags=K__|data_hash=CRC32:959dcc10
-packet|codec_type=video|stream_index=0|pts=2240000|pts_time=1.866667|dts=2240000|dts_time=1.866667|duration=40000|duration_time=0.033333|size=9247|pos=162880|flags=K__|data_hash=CRC32:cf1e2a1a
-packet|codec_type=video|stream_index=0|pts=2280000|pts_time=1.900000|dts=2280000|dts_time=1.900000|duration=40000|duration_time=0.033333|size=58|pos=172127|flags=K__|data_hash=CRC32:2efcb7ba
-packet|codec_type=video|stream_index=0|pts=2320000|pts_time=1.933333|dts=2320000|dts_time=1.933333|duration=40000|duration_time=0.033333|size=67|pos=172185|flags=K__|data_hash=CRC32:42484449
-packet|codec_type=video|stream_index=0|pts=2360000|pts_time=1.966667|dts=2360000|dts_time=1.966667|duration=40000|duration_time=0.033333|size=83|pos=172252|flags=K__|data_hash=CRC32:a941bdf0
-packet|codec_type=video|stream_index=0|pts=2400000|pts_time=2.000000|dts=2400000|dts_time=2.000000|duration=40000|duration_time=0.033333|size=5417|pos=172335|flags=K__|data_hash=CRC32:9d0d503b
+packet|codec_type=video|stream_index=0|pts=0|pts_time=0.000000|dts=0|dts_time=0.000000|duration=40000|duration_time=0.033333|size=14447|pos=0|flags=K__|data_hash=CRC32:83f257c0
+packet|codec_type=video|stream_index=0|pts=40000|pts_time=0.033333|dts=40000|dts_time=0.033333|duration=40000|duration_time=0.033333|size=483|pos=14447|flags=___|data_hash=CRC32:5abb82f8
+packet|codec_type=video|stream_index=0|pts=80000|pts_time=0.066667|dts=80000|dts_time=0.066667|duration=40000|duration_time=0.033333|size=18|pos=14930|flags=___|data_hash=CRC32:b8b123d8
+packet|codec_type=video|stream_index=0|pts=120000|pts_time=0.100000|dts=120000|dts_time=0.100000|duration=40000|duration_time=0.033333|size=18|pos=14948|flags=___|data_hash=CRC32:19180fa8
+packet|codec_type=video|stream_index=0|pts=160000|pts_time=0.133333|dts=160000|dts_time=0.133333|duration=40000|duration_time=0.033333|size=18|pos=14966|flags=___|data_hash=CRC32:cf501647
+packet|codec_type=video|stream_index=0|pts=200000|pts_time=0.166667|dts=200000|dts_time=0.166667|duration=40000|duration_time=0.033333|size=1807|pos=14984|flags=___|data_hash=CRC32:4267e1d5
+packet|codec_type=video|stream_index=0|pts=240000|pts_time=0.200000|dts=240000|dts_time=0.200000|duration=40000|duration_time=0.033333|size=28|pos=16791|flags=___|data_hash=CRC32:c223285a
+packet|codec_type=video|stream_index=0|pts=280000|pts_time=0.233333|dts=280000|dts_time=0.233333|duration=40000|duration_time=0.033333|size=25|pos=16819|flags=___|data_hash=CRC32:2565cc9e
+packet|codec_type=video|stream_index=0|pts=320000|pts_time=0.266667|dts=320000|dts_time=0.266667|duration=40000|duration_time=0.033333|size=22|pos=16844|flags=___|data_hash=CRC32:7fbf36ac
+packet|codec_type=video|stream_index=0|pts=360000|pts_time=0.300000|dts=360000|dts_time=0.300000|duration=40000|duration_time=0.033333|size=23884|pos=16866|flags=___|data_hash=CRC32:d61430fd
+packet|codec_type=video|stream_index=0|pts=400000|pts_time=0.333333|dts=400000|dts_time=0.333333|duration=40000|duration_time=0.033333|size=265|pos=40750|flags=___|data_hash=CRC32:d64145a0
+packet|codec_type=video|stream_index=0|pts=440000|pts_time=0.366667|dts=440000|dts_time=0.366667|duration=40000|duration_time=0.033333|size=393|pos=41015|flags=___|data_hash=CRC32:32c020e2
+packet|codec_type=video|stream_index=0|pts=480000|pts_time=0.400000|dts=480000|dts_time=0.400000|duration=40000|duration_time=0.033333|size=656|pos=41408|flags=___|data_hash=CRC32:965c7846
+packet|codec_type=video|stream_index=0|pts=520000|pts_time=0.433333|dts=520000|dts_time=0.433333|duration=40000|duration_time=0.033333|size=3500|pos=42064|flags=___|data_hash=CRC32:ddf731de
+packet|codec_type=video|stream_index=0|pts=560000|pts_time=0.466667|dts=560000|dts_time=0.466667|duration=40000|duration_time=0.033333|size=68|pos=45564|flags=___|data_hash=CRC32:f8c8ba07
+packet|codec_type=video|stream_index=0|pts=600000|pts_time=0.500000|dts=600000|dts_time=0.500000|duration=40000|duration_time=0.033333|size=58|pos=45632|flags=___|data_hash=CRC32:22adbb83
+packet|codec_type=video|stream_index=0|pts=640000|pts_time=0.533333|dts=640000|dts_time=0.533333|duration=40000|duration_time=0.033333|size=43|pos=45690|flags=___|data_hash=CRC32:53fb136c
+packet|codec_type=video|stream_index=0|pts=680000|pts_time=0.566667|dts=680000|dts_time=0.566667|duration=40000|duration_time=0.033333|size=11757|pos=45733|flags=___|data_hash=CRC32:551e491b
+packet|codec_type=video|stream_index=0|pts=720000|pts_time=0.600000|dts=720000|dts_time=0.600000|duration=40000|duration_time=0.033333|size=98|pos=57490|flags=___|data_hash=CRC32:4e718dd4
+packet|codec_type=video|stream_index=0|pts=760000|pts_time=0.633333|dts=760000|dts_time=0.633333|duration=40000|duration_time=0.033333|size=79|pos=57588|flags=___|data_hash=CRC32:4c5a32f5
+packet|codec_type=video|stream_index=0|pts=800000|pts_time=0.666667|dts=800000|dts_time=0.666667|duration=40000|duration_time=0.033333|size=128|pos=57667|flags=___|data_hash=CRC32:95b8cad1
+packet|codec_type=video|stream_index=0|pts=840000|pts_time=0.700000|dts=840000|dts_time=0.700000|duration=40000|duration_time=0.033333|size=10487|pos=57795|flags=___|data_hash=CRC32:8646f8f2
+packet|codec_type=video|stream_index=0|pts=880000|pts_time=0.733333|dts=880000|dts_time=0.733333|duration=40000|duration_time=0.033333|size=65|pos=68282|flags=___|data_hash=CRC32:73687d19
+packet|codec_type=video|stream_index=0|pts=920000|pts_time=0.766667|dts=920000|dts_time=0.766667|duration=40000|duration_time=0.033333|size=46|pos=68347|flags=___|data_hash=CRC32:ad381ca5
+packet|codec_type=video|stream_index=0|pts=960000|pts_time=0.800000|dts=960000|dts_time=0.800000|duration=40000|duration_time=0.033333|size=67|pos=68393|flags=___|data_hash=CRC32:89069152
+packet|codec_type=video|stream_index=0|pts=1000000|pts_time=0.833333|dts=1000000|dts_time=0.833333|duration=40000|duration_time=0.033333|size=8403|pos=68460|flags=___|data_hash=CRC32:a22913dd
+packet|codec_type=video|stream_index=0|pts=1040000|pts_time=0.866667|dts=1040000|dts_time=0.866667|duration=40000|duration_time=0.033333|size=70|pos=76863|flags=___|data_hash=CRC32:98772596
+packet|codec_type=video|stream_index=0|pts=1080000|pts_time=0.900000|dts=1080000|dts_time=0.900000|duration=40000|duration_time=0.033333|size=63|pos=76933|flags=___|data_hash=CRC32:cfd62cc4
+packet|codec_type=video|stream_index=0|pts=1120000|pts_time=0.933333|dts=1120000|dts_time=0.933333|duration=40000|duration_time=0.033333|size=70|pos=76996|flags=___|data_hash=CRC32:9b526357
+packet|codec_type=video|stream_index=0|pts=1160000|pts_time=0.966667|dts=1160000|dts_time=0.966667|duration=40000|duration_time=0.033333|size=7945|pos=77066|flags=___|data_hash=CRC32:d0f46769
+packet|codec_type=video|stream_index=0|pts=1200000|pts_time=1.000000|dts=1200000|dts_time=1.000000|duration=40000|duration_time=0.033333|size=40558|pos=85011|flags=K__|data_hash=CRC32:4db0bd7d
+packet|codec_type=video|stream_index=0|pts=1240000|pts_time=1.033333|dts=1240000|dts_time=1.033333|duration=40000|duration_time=0.033333|size=1260|pos=125569|flags=___|data_hash=CRC32:3c4397d7
+packet|codec_type=video|stream_index=0|pts=1280000|pts_time=1.066667|dts=1280000|dts_time=1.066667|duration=40000|duration_time=0.033333|size=27|pos=126829|flags=___|data_hash=CRC32:5e233c77
+packet|codec_type=video|stream_index=0|pts=1320000|pts_time=1.100000|dts=1320000|dts_time=1.100000|duration=40000|duration_time=0.033333|size=26|pos=126856|flags=___|data_hash=CRC32:57985e7b
+packet|codec_type=video|stream_index=0|pts=1360000|pts_time=1.133333|dts=1360000|dts_time=1.133333|duration=40000|duration_time=0.033333|size=18|pos=126882|flags=___|data_hash=CRC32:f4eb01ba
+packet|codec_type=video|stream_index=0|pts=1400000|pts_time=1.166667|dts=1400000|dts_time=1.166667|duration=40000|duration_time=0.033333|size=2931|pos=126900|flags=___|data_hash=CRC32:ca20964f
+packet|codec_type=video|stream_index=0|pts=1440000|pts_time=1.200000|dts=1440000|dts_time=1.200000|duration=40000|duration_time=0.033333|size=25|pos=129831|flags=___|data_hash=CRC32:a82bd0b4
+packet|codec_type=video|stream_index=0|pts=1480000|pts_time=1.233333|dts=1480000|dts_time=1.233333|duration=40000|duration_time=0.033333|size=19|pos=129856|flags=___|data_hash=CRC32:bc5f709d
+packet|codec_type=video|stream_index=0|pts=1520000|pts_time=1.266667|dts=1520000|dts_time=1.266667|duration=40000|duration_time=0.033333|size=30|pos=129875|flags=___|data_hash=CRC32:c1f8a4c9
+packet|codec_type=video|stream_index=0|pts=1560000|pts_time=1.300000|dts=1560000|dts_time=1.300000|duration=40000|duration_time=0.033333|size=5088|pos=129905|flags=___|data_hash=CRC32:41ace145
+packet|codec_type=video|stream_index=0|pts=1600000|pts_time=1.333333|dts=1600000|dts_time=1.333333|duration=40000|duration_time=0.033333|size=41|pos=134993|flags=___|data_hash=CRC32:e169b3c7
+packet|codec_type=video|stream_index=0|pts=1640000|pts_time=1.366667|dts=1640000|dts_time=1.366667|duration=40000|duration_time=0.033333|size=53|pos=135034|flags=___|data_hash=CRC32:973c5fe3
+packet|codec_type=video|stream_index=0|pts=1680000|pts_time=1.400000|dts=1680000|dts_time=1.400000|duration=40000|duration_time=0.033333|size=54|pos=135087|flags=___|data_hash=CRC32:665639e6
+packet|codec_type=video|stream_index=0|pts=1720000|pts_time=1.433333|dts=1720000|dts_time=1.433333|duration=40000|duration_time=0.033333|size=7150|pos=135141|flags=___|data_hash=CRC32:cc910027
+packet|codec_type=video|stream_index=0|pts=1760000|pts_time=1.466667|dts=1760000|dts_time=1.466667|duration=40000|duration_time=0.033333|size=48|pos=142291|flags=___|data_hash=CRC32:45658f78
+packet|codec_type=video|stream_index=0|pts=1800000|pts_time=1.500000|dts=1800000|dts_time=1.500000|duration=40000|duration_time=0.033333|size=48|pos=142339|flags=___|data_hash=CRC32:94e359a2
+packet|codec_type=video|stream_index=0|pts=1840000|pts_time=1.533333|dts=1840000|dts_time=1.533333|duration=40000|duration_time=0.033333|size=51|pos=142387|flags=___|data_hash=CRC32:959ccdd9
+packet|codec_type=video|stream_index=0|pts=1880000|pts_time=1.566667|dts=1880000|dts_time=1.566667|duration=40000|duration_time=0.033333|size=9379|pos=142438|flags=___|data_hash=CRC32:a3318410
+packet|codec_type=video|stream_index=0|pts=1920000|pts_time=1.600000|dts=1920000|dts_time=1.600000|duration=40000|duration_time=0.033333|size=58|pos=151817|flags=___|data_hash=CRC32:44b24f03
+packet|codec_type=video|stream_index=0|pts=1960000|pts_time=1.633333|dts=1960000|dts_time=1.633333|duration=40000|duration_time=0.033333|size=43|pos=151875|flags=___|data_hash=CRC32:f4876e05
+packet|codec_type=video|stream_index=0|pts=2000000|pts_time=1.666667|dts=2000000|dts_time=1.666667|duration=40000|duration_time=0.033333|size=62|pos=151918|flags=___|data_hash=CRC32:34dce749
+packet|codec_type=video|stream_index=0|pts=2040000|pts_time=1.700000|dts=2040000|dts_time=1.700000|duration=40000|duration_time=0.033333|size=10733|pos=151980|flags=___|data_hash=CRC32:9012fdfb
+packet|codec_type=video|stream_index=0|pts=2080000|pts_time=1.733333|dts=2080000|dts_time=1.733333|duration=40000|duration_time=0.033333|size=58|pos=162713|flags=___|data_hash=CRC32:8a3c8760
+packet|codec_type=video|stream_index=0|pts=2120000|pts_time=1.766667|dts=2120000|dts_time=1.766667|duration=40000|duration_time=0.033333|size=41|pos=162771|flags=___|data_hash=CRC32:28da6bf4
+packet|codec_type=video|stream_index=0|pts=2160000|pts_time=1.800000|dts=2160000|dts_time=1.800000|duration=40000|duration_time=0.033333|size=68|pos=162812|flags=___|data_hash=CRC32:959dcc10
+packet|codec_type=video|stream_index=0|pts=2200000|pts_time=1.833333|dts=2200000|dts_time=1.833333|duration=40000|duration_time=0.033333|size=9247|pos=162880|flags=___|data_hash=CRC32:cf1e2a1a
+packet|codec_type=video|stream_index=0|pts=2240000|pts_time=1.866667|dts=2240000|dts_time=1.866667|duration=40000|duration_time=0.033333|size=58|pos=172127|flags=___|data_hash=CRC32:2efcb7ba
+packet|codec_type=video|stream_index=0|pts=2280000|pts_time=1.900000|dts=2280000|dts_time=1.900000|duration=40000|duration_time=0.033333|size=67|pos=172185|flags=___|data_hash=CRC32:42484449
+packet|codec_type=video|stream_index=0|pts=2320000|pts_time=1.933333|dts=2320000|dts_time=1.933333|duration=40000|duration_time=0.033333|size=83|pos=172252|flags=___|data_hash=CRC32:a941bdf0
+packet|codec_type=video|stream_index=0|pts=2360000|pts_time=1.966667|dts=2360000|dts_time=1.966667|duration=40000|duration_time=0.033333|size=5417|pos=172335|flags=___|data_hash=CRC32:9d0d503b
stream|index=0|codec_name=cavs|profile=unknown|codec_type=video|codec_tag_string=[0][0][0][0]|codec_tag=0x0000|width=1280|height=720|coded_width=1280|coded_height=720|has_b_frames=0|sample_aspect_ratio=N/A|display_aspect_ratio=N/A|pix_fmt=yuv420p|level=-99|color_range=unknown|color_space=unknown|color_transfer=unknown|color_primaries=unknown|chroma_location=unspecified|field_order=unknown|refs=1|id=N/A|r_frame_rate=30/1|avg_frame_rate=25/1|time_base=1/1200000|start_pts=N/A|start_time=N/A|duration_ts=N/A|duration=N/A|bit_rate=N/A|max_bit_rate=N/A|bits_per_raw_sample=N/A|nb_frames=N/A|nb_read_frames=N/A|nb_read_packets=60|extradata_size=18|extradata_hash=CRC32:1255d52e|disposition:default=0|disposition:dub=0|disposition:original=0|disposition:comment=0|disposition:lyrics=0|disposition:karaoke=0|disposition:forced=0|disposition:hearing_impaired=0|disposition:visual_impaired=0|disposition:clean_effects=0|disposition:attached_pic=0|disposition:timed_thumbnails=0|disposition:non_diegetic=
0|disposition:captions=0|disposition:descriptions=0|disposition:metadata=0|disposition:dependent=0|disposition:still_image=0|disposition:multilayer=0
format|filename=bunny.mp4|nb_streams=1|nb_programs=0|nb_stream_groups=0|format_name=cavsvideo|start_time=N/A|duration=N/A|size=177752|bit_rate=N/A|probe_score=51
-----------------------------------------------------------------------
Summary of changes:
libavcodec/cavs_parser.c | 85 +++++++++++++++++
libavformat/rawdec.c | 2 +-
tests/ref/fate/cavs-demux | 122 ++++++++++++-------------
tests/ref/fate/enhanced-flv-hevc-hdr10 | 4 +-
tests/ref/fate/h264-bsf-dts2pts | 102 ++++++++++-----------
tests/ref/fate/h264-conformance-cvpcmnl2_sva_c | 6 +-
tests/ref/fate/hevc-bsf-dts2pts-cra | 68 +++++++-------
tests/ref/fate/hevc-bsf-dts2pts-idr | 38 ++++----
tests/ref/fate/hevc-bsf-dts2pts-idr-cra | 38 ++++----
tests/ref/lavf-fate/hevc.mp4 | 2 +-
10 files changed, 276 insertions(+), 191 deletions(-)
hooks/post-receive
--
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]