* [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning
@ 2022-01-09 20:15 Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 2/3] avformat/matroskaenc: Add option to shift data to write cues at front Andreas Rheinhardt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andreas Rheinhardt @ 2022-01-09 20:15 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
It is perfectly fine to have from one to seven bits left
at the end of parsing.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
libavcodec/vp3.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index 5b9ba60f49..791e531862 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -3149,10 +3149,10 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
"Unknown Theora config packet: %d\n", ptype & ~0x80);
break;
}
- if (ptype != 0x81 && 8 * header_len[i] != get_bits_count(&gb))
+ if (ptype != 0x81 && get_bits_left(&gb) >= 8U)
av_log(avctx, AV_LOG_WARNING,
"%d bits left in packet %X\n",
- 8 * header_len[i] - get_bits_count(&gb), ptype);
+ get_bits_left(&gb), ptype);
if (s->theora < 0x030200)
break;
}
--
2.32.0
_______________________________________________
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] 4+ messages in thread
* [FFmpeg-devel] [PATCH 2/3] avformat/matroskaenc: Add option to shift data to write cues at front
2022-01-09 20:15 [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
@ 2022-01-09 20:24 ` Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 3/3] fate/matroska: Add test for QT-mode Andreas Rheinhardt
2022-01-12 9:51 ` [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Rheinhardt @ 2022-01-09 20:24 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
This is similar to the faststart option of the mov muxer, yet
in contrast to it it works together with reserve_index_space
(the equivalent to reserved_moov_size): If the reserved space
does not suffice, the data is shifted; if not, the Cues are
written at the front without shifting the data.
Several tests that cover (not only) this have been added.
Implements #7017.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
doc/muxers.texi | 9 +++
libavformat/matroskaenc.c | 42 +++++++---
tests/fate/matroska.mak | 32 ++++++++
tests/ref/fate/matroska-dovi-write-config7 | 49 ++++++++++++
tests/ref/fate/matroska-move-cues-to-front | 72 +++++++++++++++++
tests/ref/fate/matroska-ms-mode | 89 ++++++++++++++++++++++
6 files changed, 282 insertions(+), 11 deletions(-)
create mode 100644 tests/ref/fate/matroska-dovi-write-config7
create mode 100644 tests/ref/fate/matroska-move-cues-to-front
create mode 100644 tests/ref/fate/matroska-ms-mode
diff --git a/doc/muxers.texi b/doc/muxers.texi
index 1ea98a69a3..c49ae3a17b 100644
--- a/doc/muxers.texi
+++ b/doc/muxers.texi
@@ -1567,6 +1567,15 @@ A safe size for most use cases should be about 50kB per hour of video.
Note that cues are only written if the output is seekable and this option will
have no effect if it is not.
+
+@item cues_to_front
+If set, the muxer will write the index at the beginning of the file
+by shifting the main data if necessary. This can be combined with
+reserve_index_space in which case the data is only shifted if
+the initially reserved space turns out to be insufficient.
+
+This option is ignored if the output is unseekable.
+
@item default_mode
This option controls how the FlagDefault of the output tracks will be set.
It influences which tracks players should play by default. The default mode
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 152312102a..41b2df7dbf 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -161,6 +161,7 @@ typedef struct MatroskaMuxContext {
int allow_raw_vfw;
int flipped_raw_rgb;
int default_mode;
+ int move_cues_to_front;
uint32_t segment_uid[4];
} MatroskaMuxContext;
@@ -566,7 +567,8 @@ static int mkv_add_cuepoint(MatroskaMuxContext *mkv, int stream, int64_t ts,
}
static int mkv_assemble_cues(AVStream **streams, AVIOContext *dyn_cp,
- mkv_cues *cues, mkv_track *tracks, int num_tracks)
+ const mkv_cues *cues, mkv_track *tracks, int num_tracks,
+ uint64_t offset)
{
AVIOContext *cuepoint;
int ret;
@@ -597,7 +599,7 @@ static int mkv_assemble_cues(AVStream **streams, AVIOContext *dyn_cp,
tracks[idx].has_cue = 1;
track_positions = start_ebml_master(cuepoint, MATROSKA_ID_CUETRACKPOSITION, MAX_CUETRACKPOS_SIZE);
put_ebml_uint(cuepoint, MATROSKA_ID_CUETRACK , tracks[idx].track_num);
- put_ebml_uint(cuepoint, MATROSKA_ID_CUECLUSTERPOSITION , entry->cluster_pos);
+ put_ebml_uint(cuepoint, MATROSKA_ID_CUECLUSTERPOSITION , entry->cluster_pos + offset);
put_ebml_uint(cuepoint, MATROSKA_ID_CUERELATIVEPOSITION, entry->relative_pos);
if (entry->duration > 0)
put_ebml_uint(cuepoint, MATROSKA_ID_CUEDURATION , entry->duration);
@@ -1984,12 +1986,14 @@ static int mkv_write_header(AVFormatContext *s)
put_ebml_void(pb, s->metadata_header_padding);
}
- if (mkv->reserve_cues_space) {
+ if (mkv->reserve_cues_space || mkv->move_cues_to_front) {
if (IS_SEEKABLE(pb, mkv)) {
mkv->cues_pos = avio_tell(pb);
- if (mkv->reserve_cues_space == 1)
- mkv->reserve_cues_space++;
- put_ebml_void(pb, mkv->reserve_cues_space);
+ if (mkv->reserve_cues_space >= 1) {
+ if (mkv->reserve_cues_space == 1)
+ mkv->reserve_cues_space++;
+ put_ebml_void(pb, mkv->reserve_cues_space);
+ }
} else
mkv->reserve_cues_space = -1;
}
@@ -2575,25 +2579,31 @@ static int mkv_write_trailer(AVFormatContext *s)
if (mkv->cues.num_entries && mkv->reserve_cues_space >= 0) {
AVIOContext *cues = NULL;
- uint64_t size;
+ uint64_t size, offset = 0;
int length_size = 0;
+redo_cues:
ret = start_ebml_master_crc32(&cues, mkv);
if (ret < 0)
return ret;
ret = mkv_assemble_cues(s->streams, cues, &mkv->cues,
- mkv->tracks, s->nb_streams);
+ mkv->tracks, s->nb_streams, offset);
if (ret < 0) {
ffio_free_dyn_buf(&cues);
return ret;
}
- if (mkv->reserve_cues_space) {
+ if (mkv->reserve_cues_space || mkv->move_cues_to_front) {
size = avio_tell(cues);
length_size = ebml_length_size(size);
size += 4 + length_size;
- if (mkv->reserve_cues_space < size) {
+ if (offset + mkv->reserve_cues_space < size) {
+ if (mkv->move_cues_to_front) {
+ offset = size - mkv->reserve_cues_space;
+ ffio_reset_dyn_buf(cues);
+ goto redo_cues;
+ }
av_log(s, AV_LOG_WARNING,
"Insufficient space reserved for Cues: "
"%d < %"PRIu64". No Cues will be output.\n",
@@ -2601,6 +2611,15 @@ static int mkv_write_trailer(AVFormatContext *s)
ret2 = AVERROR(EINVAL);
goto after_cues;
} else {
+ if (offset) {
+ ret = ff_format_shift_data(s, mkv->cues_pos + mkv->reserve_cues_space,
+ offset);
+ if (ret < 0) {
+ ffio_free_dyn_buf(&cues);
+ return ret;
+ }
+ endpos += offset;
+ }
if ((ret64 = avio_seek(pb, mkv->cues_pos, SEEK_SET)) < 0) {
ffio_free_dyn_buf(&cues);
return ret64;
@@ -2623,7 +2642,7 @@ static int mkv_write_trailer(AVFormatContext *s)
if (mkv->reserve_cues_space) {
if (size < mkv->reserve_cues_space)
put_ebml_void(pb, mkv->reserve_cues_space - size);
- } else
+ } else if (!mkv->move_cues_to_front)
endpos = avio_tell(pb);
}
@@ -2848,6 +2867,7 @@ static const AVCodecTag additional_subtitle_tags[] = {
#define FLAGS AV_OPT_FLAG_ENCODING_PARAM
static const AVOption options[] = {
{ "reserve_index_space", "Reserve a given amount of space (in bytes) at the beginning of the file for the index (cues).", OFFSET(reserve_cues_space), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS },
+ { "cues_to_front", "Move Cues (the index) to the front by shifting data if necessary", OFFSET(move_cues_to_front), AV_OPT_TYPE_BOOL, { .i64 = 0}, 0, 1, FLAGS },
{ "cluster_size_limit", "Store at most the provided amount of bytes in a cluster. ", OFFSET(cluster_size_limit), AV_OPT_TYPE_INT , { .i64 = -1 }, -1, INT_MAX, FLAGS },
{ "cluster_time_limit", "Store at most the provided number of milliseconds in a cluster.", OFFSET(cluster_time_limit), AV_OPT_TYPE_INT64, { .i64 = -1 }, -1, INT64_MAX, FLAGS },
{ "dash", "Create a WebM file conforming to WebM DASH specification", OFFSET(is_dash), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS },
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index e117a0f6a6..fca84ecf12 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -67,6 +67,38 @@ FATE_MATROSKA_FFMPEG_FFPROBE-$(call DEMMUX, MATROSKA, MATROSKA) \
+= fate-matroska-zero-length-block
fate-matroska-zero-length-block: CMD = transcode matroska $(TARGET_SAMPLES)/mkv/zero_length_block.mks matroska "-c:s copy -dash 1 -dash_track_number 2000000000 -reserve_index_space 62 -metadata_header_padding 1 -default_mode infer_no_subs" "-c:s copy" "" "-show_entries stream_tags=description"
+# This mainly tests the Matroska muxer's ability to shift the data
+# to create enough free space to write the Cues at the front.
+# The metadata_header_padding has been chosen so that three attempts
+# to write the Cues are necessary.
+# It also tests writing PCM audio in both endiannesses and putting
+# Cues with the same timestamp in the same CuePoint as well as
+# omitting CRC-32 elements when writing Matroska.
+FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL WAV_DEMUXER PCM_S24LE_DECODER \
+ PCM_S24BE_ENCODER MATROSKA_MUXER \
+ MATROSKA_DEMUXER FRAMECRC_MUXER PIPE_PROTOCOL) \
+ += fate-matroska-move-cues-to-front
+fate-matroska-move-cues-to-front: CMD = transcode wav $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav matroska "-map 0 -map 0 -c:a:0 pcm_s24be -c:a:1 copy -cluster_time_limit 5 -cues_to_front yes -metadata_header_padding 7840 -write_crc32 0" "-map 0 -c copy -t 0.1"
+
+# 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.
+FATE_MATROSKA_FFMPEG_FFPROBE-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER \
+ HEVC_DECODER MATROSKA_MUXER \
+ MATROSKA_DEMUXER FRAMECRC_MUXER \
+ PIPE_PROTOCOL) \
+ += fate-matroska-dovi-write-config7
+fate-matroska-dovi-write-config7: CMD = transcode mov $(TARGET_SAMPLES)/mov/dovi-p7.mp4 matroska "-map 0 -c copy -cues_to_front yes -reserve_index_space 40 -metadata_header_padding 64339" "-map 0 -c copy" "" "-show_entries stream_side_data_list"
+
+# This tests writing the MS-compatibility modes V_MS/VFW/FOURCC and A_MS/ACM.
+# It furthermore tests writing the Cues at the front if the cues_to_front
+# option is set and more than enough space has been reserved in advance.
+# (Btw: The keyframe flags of the input video stream seem wrong.)
+FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL AVI_DEMUXER MATROSKA_MUXER \
+ MATROSKA_DEMUXER FRAMECRC_MUXER \
+ PIPE_PROTOCOL) += fate-matroska-ms-mode
+fate-matroska-ms-mode: CMD = transcode avi $(TARGET_SAMPLES)/vp5/potter512-400-partial.avi matroska "-map 0 -c copy -cues_to_front yes -reserve_index_space 5000" "-map 0 -c copy -t 1"
+
# This test the following features of the Matroska muxer: Writing projection
# stream side-data; not setting any track to default if the user requested it;
# and modifying and writing colorspace properties.
diff --git a/tests/ref/fate/matroska-dovi-write-config7 b/tests/ref/fate/matroska-dovi-write-config7
new file mode 100644
index 0000000000..1c1422c0e4
--- /dev/null
+++ b/tests/ref/fate/matroska-dovi-write-config7
@@ -0,0 +1,49 @@
+3fa1f47c5c3d22b5c33156ff14928d6c *tests/data/fate/matroska-dovi-write-config7.matroska
+72758 tests/data/fate/matroska-dovi-write-config7.matroska
+#extradata 0: 116, 0x2b8d1669
+#extradata 1: 116, 0x2b8d1669
+#tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: hevc
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+#tb 1: 1/1000
+#media_type 1: video
+#codec_id 1: hevc
+#dimensions 1: 1920x1080
+#sar 1: 0/1
+0, -83, 0, 41, 699, 0x728548f1
+1, -83, 0, 41, 1085, 0xfb2dba82, S=1, 8
+0, -42, 167, 41, 95, 0xc0312044, F=0x0
+1, -42, 167, 41, 481, 0xf23f91d5, F=0x0
+0, 0, 83, 41, 99, 0x5e0a2221, F=0x0
+1, 0, 83, 41, 485, 0x5f7b93b2, F=0x0
+0, 42, 42, 41, 99, 0xe60e208b, F=0x0
+1, 42, 42, 41, 485, 0x8335921c, F=0x0
+0, 83, 125, 41, 99, 0xa1e422e1, F=0x0
+1, 83, 125, 41, 485, 0xc4e49472, F=0x0
+0, 125, 333, 41, 96, 0xdc762089, F=0x0
+1, 125, 333, 41, 482, 0x769c921a, F=0x0
+0, 167, 250, 41, 100, 0x89cd22a0, F=0x0
+1, 167, 250, 41, 486, 0x4aca9431, F=0x0
+0, 208, 208, 41, 100, 0x6d4521ff, F=0x0
+1, 208, 208, 41, 486, 0x3b719390, F=0x0
+0, 250, 292, 41, 99, 0x92ab22c0, F=0x0
+1, 250, 292, 41, 485, 0x83e99451, F=0x0
+0, 292, 292, 41, 95, 0xcd9020bd, F=0x0
+1, 292, 292, 41, 481, 0x44ec924e, F=0x0
+[STREAM]
+[/STREAM]
+[STREAM]
+[SIDE_DATA]
+side_data_type=DOVI configuration record
+dv_version_major=1
+dv_version_minor=0
+dv_profile=7
+dv_level=4
+rpu_present_flag=1
+el_present_flag=1
+bl_present_flag=0
+dv_bl_signal_compatibility_id=6
+[/SIDE_DATA]
+[/STREAM]
diff --git a/tests/ref/fate/matroska-move-cues-to-front b/tests/ref/fate/matroska-move-cues-to-front
new file mode 100644
index 0000000000..46effff53e
--- /dev/null
+++ b/tests/ref/fate/matroska-move-cues-to-front
@@ -0,0 +1,72 @@
+ce15d8b7577933a057c413af505500df *tests/data/fate/matroska-move-cues-to-front.matroska
+23210310 tests/data/fate/matroska-move-cues-to-front.matroska
+#tb 0: 1/1000
+#media_type 0: audio
+#codec_id 0: pcm_s24be
+#sample_rate 0: 192000
+#channel_layout 0: 3
+#channel_layout_name 0: stereo
+#tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: pcm_s24le
+#sample_rate 1: 192000
+#channel_layout 1: 3
+#channel_layout_name 1: stereo
+0, 0, 0, 3, 4092, 0x71f10ea0
+1, 0, 0, 3, 4092, 0xa6320ea0
+0, 4, 4, 3, 4092, 0x51852317
+1, 4, 4, 3, 4092, 0x27732317
+0, 7, 7, 3, 4092, 0xc8e2693d
+1, 7, 7, 3, 4092, 0x5899693d
+0, 11, 11, 3, 4092, 0x8df13008
+1, 11, 11, 3, 4092, 0x6fa63008
+0, 14, 14, 3, 4092, 0xc56bdf7f
+1, 14, 14, 3, 4092, 0x22b0df7f
+0, 18, 18, 3, 4092, 0x4ac2c0f9
+1, 18, 18, 3, 4092, 0x5512c0f9
+0, 21, 21, 3, 4092, 0x11a50650
+1, 21, 21, 3, 4092, 0x11b90650
+0, 25, 25, 3, 4092, 0x0a3837f4
+1, 25, 25, 3, 4092, 0x9cb537f4
+0, 28, 28, 3, 4092, 0xff0a3ce7
+1, 28, 28, 3, 4092, 0x7d1a3ce7
+0, 32, 32, 3, 4092, 0x42d2c983
+1, 32, 32, 3, 4092, 0x0f56c983
+0, 36, 36, 3, 4092, 0x2adbf4ea
+1, 36, 36, 3, 4092, 0x386bf4ea
+0, 39, 39, 3, 4092, 0x86d4f0a5
+1, 39, 39, 3, 4092, 0x5924f0a5
+0, 43, 43, 3, 4092, 0x5f35d5f7
+1, 43, 43, 3, 4092, 0x565fd5f7
+0, 46, 46, 3, 4092, 0xd3f27234
+1, 46, 46, 3, 4092, 0x4d197234
+0, 50, 50, 3, 4092, 0xb3a97ff5
+1, 50, 50, 3, 4092, 0x61e67ff5
+0, 53, 53, 3, 4092, 0xce30e2ba
+1, 53, 53, 3, 4092, 0xe65de2ba
+0, 57, 57, 3, 4092, 0x3d482d44
+1, 57, 57, 3, 4092, 0xf85b2d44
+0, 60, 60, 3, 4092, 0x691d161c
+1, 60, 60, 3, 4092, 0x3b01161c
+0, 64, 64, 3, 4092, 0xe6b93525
+1, 64, 64, 3, 4092, 0xdd4e3525
+0, 67, 67, 3, 4092, 0x9ce3f785
+1, 67, 67, 3, 4092, 0x8a28f785
+0, 71, 71, 3, 4092, 0x688fc452
+1, 71, 71, 3, 4092, 0x8c5ec452
+0, 75, 75, 3, 4092, 0x400cf87e
+1, 75, 75, 3, 4092, 0x1e64f87e
+0, 78, 78, 3, 4092, 0x49baa923
+1, 78, 78, 3, 4092, 0x68d9a923
+0, 82, 82, 3, 4092, 0x4df27658
+1, 82, 82, 3, 4092, 0x38d77658
+0, 85, 85, 3, 4092, 0xdfebf0e7
+1, 85, 85, 3, 4092, 0xab2cf0e7
+0, 89, 89, 3, 4092, 0x69d2f76c
+1, 89, 89, 3, 4092, 0x35b9f76c
+0, 92, 92, 3, 4092, 0x877b89d3
+1, 92, 92, 3, 4092, 0xcc4889d3
+0, 96, 96, 3, 4092, 0x70035443
+1, 96, 96, 3, 4092, 0x04825443
+0, 99, 99, 3, 4092, 0x30135036
+1, 99, 99, 3, 4092, 0x4fba5036
diff --git a/tests/ref/fate/matroska-ms-mode b/tests/ref/fate/matroska-ms-mode
new file mode 100644
index 0000000000..5fe052c39b
--- /dev/null
+++ b/tests/ref/fate/matroska-ms-mode
@@ -0,0 +1,89 @@
+b3d928e92bc8b323793a237ce82f9437 *tests/data/fate/matroska-ms-mode.matroska
+413108 tests/data/fate/matroska-ms-mode.matroska
+#extradata 0: 40, 0x54290c93
+#extradata 1: 114, 0xb6c80771
+#tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: vp5
+#dimensions 0: 512x304
+#sar 0: 0/1
+#tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: speex
+#sample_rate 1: 32000
+#channel_layout 1: 4
+#channel_layout_name 1: mono
+0, 0, 0, 41, 12972, 0x6588cf8e
+1, 0, 0, 0, 74, 0xd4eb274d
+1, 20, 20, 0, 74, 0xef822181
+1, 40, 40, 0, 74, 0x61e3239c
+0, 42, 42, 41, 478, 0xeca1eeb9
+1, 60, 60, 0, 74, 0x474623d5
+1, 80, 80, 0, 74, 0x79a21f22
+0, 83, 83, 41, 260, 0x335f8133
+1, 100, 100, 0, 74, 0xb3022058
+1, 120, 120, 0, 74, 0x57a32240
+0, 125, 125, 41, 199, 0xf6f86142
+1, 140, 140, 0, 74, 0x34892453
+1, 160, 160, 0, 74, 0x55621efb
+0, 167, 167, 41, 188, 0x0eeb5f55
+1, 180, 180, 0, 74, 0xb92f206a
+1, 200, 200, 0, 74, 0x1988222e
+0, 209, 209, 41, 183, 0x921a5b3c
+1, 220, 220, 0, 74, 0x033b20dc
+1, 240, 240, 0, 74, 0xf8f41da4
+0, 250, 250, 41, 181, 0xae765703
+1, 260, 260, 0, 74, 0xfc89201f
+1, 280, 280, 0, 74, 0x2b102428
+0, 292, 292, 41, 181, 0xdc975d93
+1, 300, 300, 0, 74, 0x2df42380
+1, 320, 320, 0, 74, 0xebcf20fd
+0, 334, 334, 41, 181, 0x30355b73
+1, 340, 340, 0, 74, 0x3eb524f8
+1, 360, 360, 0, 74, 0x1f802308
+0, 375, 375, 41, 179, 0xef275e89
+1, 380, 380, 0, 74, 0x218d23bd
+1, 400, 400, 0, 74, 0x77f82421
+0, 417, 417, 41, 181, 0xbdb35a1b
+1, 420, 420, 0, 74, 0xf20023a3
+1, 440, 440, 0, 74, 0x82cc1f9a
+0, 459, 459, 41, 179, 0x1b245f55
+1, 460, 460, 0, 74, 0x8d3222e4
+1, 480, 480, 0, 74, 0x939d1e4c
+1, 500, 500, 0, 74, 0x55c3232c
+0, 501, 501, 41, 181, 0x30355b73
+1, 520, 520, 0, 74, 0x85e02092
+1, 540, 540, 0, 74, 0xb9d02059
+0, 542, 542, 41, 179, 0xef275e89
+1, 560, 560, 0, 74, 0xbbd8211f
+1, 580, 580, 0, 74, 0xe0ca20e1
+0, 584, 584, 41, 181, 0xbdb35a1b
+1, 600, 600, 0, 74, 0xd4f9216b
+1, 620, 620, 0, 74, 0xdea723f9
+0, 626, 626, 41, 179, 0x1b245f55
+1, 640, 640, 0, 74, 0xc2611fe9
+1, 660, 660, 0, 74, 0x9f941f2d
+0, 667, 667, 41, 181, 0x30355b73
+1, 680, 680, 0, 74, 0xaf991eb9
+1, 700, 700, 0, 74, 0x7e79250e
+0, 709, 709, 41, 179, 0xef275e89
+1, 720, 720, 0, 74, 0x5a421faa
+1, 740, 740, 0, 74, 0x3b211ce0
+0, 751, 751, 41, 181, 0xbdb35a1b
+1, 760, 760, 0, 74, 0x4a812478
+1, 780, 780, 0, 74, 0xfc1b234f
+0, 792, 792, 41, 179, 0x1b245f55
+1, 800, 800, 0, 74, 0x3d561db1
+1, 820, 820, 0, 74, 0x6bbb2475
+0, 834, 834, 41, 181, 0x30355b73
+1, 840, 840, 0, 74, 0x76fe1f63
+1, 860, 860, 0, 74, 0x15861cf1
+0, 876, 876, 41, 179, 0xef275e89
+1, 880, 880, 0, 74, 0x7dca1c6a
+1, 900, 900, 0, 74, 0xad8b20aa
+0, 918, 918, 41, 181, 0xbdb35a1b
+1, 920, 920, 0, 74, 0x6ba01e89
+1, 940, 940, 0, 74, 0x621421eb
+0, 959, 959, 41, 179, 0x1b245f55
+1, 960, 960, 0, 74, 0x26672424
+1, 980, 980, 0, 74, 0xcb6120f4
--
2.32.0
_______________________________________________
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] 4+ messages in thread
* [FFmpeg-devel] [PATCH 3/3] fate/matroska: Add test for QT-mode
2022-01-09 20:15 [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 2/3] avformat/matroskaenc: Add option to shift data to write cues at front Andreas Rheinhardt
@ 2022-01-09 20:24 ` Andreas Rheinhardt
2022-01-12 9:51 ` [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Rheinhardt @ 2022-01-09 20:24 UTC (permalink / raw)
To: ffmpeg-devel; +Cc: Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
tests/fate/matroska.mak | 6 ++
tests/ref/fate/matroska-qt-mode | 125 ++++++++++++++++++++++++++++++++
2 files changed, 131 insertions(+)
create mode 100644 tests/ref/fate/matroska-qt-mode
diff --git a/tests/fate/matroska.mak b/tests/fate/matroska.mak
index fca84ecf12..295489d2cc 100644
--- a/tests/fate/matroska.mak
+++ b/tests/fate/matroska.mak
@@ -99,6 +99,12 @@ FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL AVI_DEMUXER MATROSKA_MUXER \
PIPE_PROTOCOL) += fate-matroska-ms-mode
fate-matroska-ms-mode: CMD = transcode avi $(TARGET_SAMPLES)/vp5/potter512-400-partial.avi matroska "-map 0 -c copy -cues_to_front yes -reserve_index_space 5000" "-map 0 -c copy -t 1"
+# This tests Matroska's QT-compatibility mode.
+FATE_MATROSKA-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER MATROSKA_MUXER \
+ MATROSKA_DEMUXER FRAMECRC_MUXER PIPE_PROTOCOL) \
+ += fate-matroska-qt-mode
+fate-matroska-qt-mode: CMD = transcode mov $(TARGET_SAMPLES)/svq1/marymary-shackles.mov matroska "-c copy" "-c copy -t 3"
+
# This test the following features of the Matroska muxer: Writing projection
# stream side-data; not setting any track to default if the user requested it;
# and modifying and writing colorspace properties.
diff --git a/tests/ref/fate/matroska-qt-mode b/tests/ref/fate/matroska-qt-mode
new file mode 100644
index 0000000000..9dc115cc0d
--- /dev/null
+++ b/tests/ref/fate/matroska-qt-mode
@@ -0,0 +1,125 @@
+a741bd63da27d6b8ce3a21009267703d *tests/data/fate/matroska-qt-mode.matroska
+1884278 tests/data/fate/matroska-qt-mode.matroska
+#extradata 0: 90, 0x817d0185
+#tb 0: 1/1000
+#media_type 0: video
+#codec_id 0: svq1
+#dimensions 0: 160x120
+#sar 0: 0/1
+#tb 1: 1/1000
+#media_type 1: audio
+#codec_id 1: pcm_u8
+#sample_rate 1: 22050
+#channel_layout 1: 4
+#channel_layout_name 1: mono
+0, 0, 0, 66, 3340, 0xcdb26464
+1, 0, 0, 46, 1024, 0x3c0f001e
+1, 46, 46, 46, 1024, 0x5772fef7
+0, 67, 67, 66, 76, 0xc93b1f74, F=0x0
+1, 93, 93, 46, 1024, 0xa98efec4
+0, 133, 133, 66, 116, 0x5688353c, F=0x0
+1, 139, 139, 46, 1024, 0xba56fd5d
+1, 186, 186, 46, 1024, 0x69d7063c
+0, 200, 200, 66, 112, 0xbe8f3086, F=0x0
+1, 232, 232, 46, 1024, 0x2b67fc5a
+0, 267, 267, 66, 132, 0xd0cd3b9c, F=0x0
+1, 279, 279, 46, 1024, 0xcdf9022d
+1, 325, 325, 46, 1024, 0x91f6fd81
+0, 333, 333, 66, 200, 0x42385725, F=0x0
+1, 372, 372, 46, 1024, 0x920eff99
+0, 400, 400, 66, 164, 0x2d344be3, F=0x0
+1, 418, 418, 46, 1024, 0x09a2ff2b
+1, 464, 464, 35, 785, 0x6ece8797
+0, 467, 467, 66, 176, 0xc97c53ff, F=0x0
+1, 500, 500, 46, 1024, 0x9a50fc54
+0, 533, 533, 66, 216, 0x62fe5cf9, F=0x0
+1, 546, 546, 46, 1024, 0xc5ef006e
+1, 593, 593, 46, 1024, 0x53430734
+0, 600, 600, 66, 164, 0x52564b48, F=0x0
+1, 639, 639, 46, 1024, 0xaaaff2dc
+0, 667, 667, 66, 244, 0x25e16dfb, F=0x0
+1, 686, 686, 46, 1024, 0xe29a01d2
+1, 732, 732, 46, 1024, 0x4deb0411
+0, 733, 733, 66, 156, 0x6abe49bf, F=0x0
+1, 779, 779, 46, 1024, 0x4f5dfd8d
+0, 800, 800, 66, 152, 0x47f84373, F=0x0
+1, 825, 825, 46, 1024, 0x4dc5fdf1
+0, 867, 867, 66, 144, 0xe0c64013, F=0x0
+1, 872, 872, 46, 1024, 0x7e0dff54
+1, 918, 918, 46, 1024, 0xde9cff3e
+0, 933, 933, 66, 280, 0xa3b57919, F=0x0
+1, 964, 964, 35, 785, 0xfdb78def
+0, 1000, 1000, 66, 3312, 0x45ee5b17
+1, 1000, 1000, 46, 1024, 0x5224f542
+1, 1046, 1046, 46, 1024, 0x6e61f9bc
+0, 1067, 1067, 66, 324, 0x07cd8cd2, F=0x0
+1, 1093, 1093, 46, 1024, 0x5727115f
+0, 1133, 1133, 66, 364, 0x101d9883, F=0x0
+1, 1139, 1139, 46, 1024, 0x1b70eccb
+1, 1186, 1186, 46, 1024, 0x717f0778
+0, 1200, 1200, 66, 440, 0x4628b544, F=0x0
+1, 1232, 1232, 46, 1024, 0xf1870091
+0, 1267, 1267, 66, 7020, 0x0a137edf
+1, 1279, 1279, 46, 1024, 0xca1df3a7
+1, 1325, 1325, 46, 1024, 0x5a921497
+0, 1333, 1333, 66, 5768, 0xc019d7b8, F=0x0
+1, 1372, 1372, 46, 1024, 0x0655e7bf
+0, 1400, 1400, 66, 4820, 0xcc946718, F=0x0
+1, 1418, 1418, 46, 1024, 0x2a8a141c
+1, 1464, 1464, 35, 785, 0xbd3a81a5
+0, 1467, 1467, 66, 6112, 0xbaf23f70, F=0x0
+1, 1500, 1500, 46, 1024, 0x54b5fc77
+0, 1533, 1533, 66, 6112, 0xc79655d0, F=0x0
+1, 1546, 1546, 46, 1024, 0x8febfbc1
+1, 1593, 1593, 46, 1024, 0x8ef8f1c1
+0, 1600, 1600, 66, 5112, 0x1d8fe26b, F=0x0
+1, 1639, 1639, 46, 1024, 0x565817aa
+0, 1667, 1667, 66, 5872, 0x162eed4d, F=0x0
+1, 1686, 1686, 46, 1024, 0xfdd7ef74
+1, 1732, 1732, 46, 1024, 0x69080694
+0, 1733, 1733, 66, 5092, 0x6ce7e2aa, F=0x0
+1, 1779, 1779, 46, 1024, 0xe4a105c3
+0, 1800, 1800, 66, 5648, 0xfa739b01, F=0x0
+1, 1825, 1825, 46, 1024, 0x1397f5e1
+0, 1867, 1867, 66, 5516, 0x8a778b2b, F=0x0
+1, 1872, 1872, 46, 1024, 0xb298fc7a
+1, 1918, 1918, 46, 1024, 0x2869030a
+0, 1933, 1933, 66, 5088, 0xdd60e51e, F=0x0
+1, 1964, 1964, 35, 785, 0xf6a49164
+0, 2000, 2000, 66, 5808, 0x14b6e8b3, F=0x0
+1, 2000, 2000, 46, 1024, 0x668ce4db
+1, 2046, 2046, 46, 1024, 0x08c71cd7
+0, 2067, 2067, 66, 4512, 0x9efdf756, F=0x0
+1, 2093, 2093, 46, 1024, 0xc682e3f3
+0, 2133, 2133, 66, 5404, 0x50ce47a2, F=0x0
+1, 2139, 2139, 46, 1024, 0x98bc11c5
+1, 2186, 2186, 46, 1024, 0x4a6ef47d
+0, 2200, 2200, 66, 5732, 0x7b46abbf, F=0x0
+1, 2232, 2232, 46, 1024, 0xa6660535
+0, 2267, 2267, 66, 6936, 0x325421f1
+1, 2279, 2279, 46, 1024, 0xa1d1fd9d
+1, 2325, 2325, 46, 1024, 0xf012fbf3
+0, 2333, 2333, 66, 5780, 0x8eb1d896, F=0x0
+1, 2372, 2372, 46, 1024, 0xacc00616
+0, 2400, 2400, 66, 2280, 0x3a778e69
+1, 2418, 2418, 46, 1024, 0xc8660aac
+1, 2464, 2464, 35, 785, 0xe9416835
+0, 2467, 2467, 66, 1220, 0x676b10f0, F=0x0
+1, 2500, 2500, 46, 1024, 0xe31622b5
+0, 2533, 2533, 66, 1584, 0x668b6e9e, F=0x0
+1, 2546, 2546, 46, 1024, 0xc53ee0b8
+1, 2593, 2593, 46, 1024, 0xf26d1102
+0, 2600, 2600, 66, 1084, 0xbdf4ca3d, F=0x0
+1, 2639, 2639, 46, 1024, 0xd2fffa3d
+0, 2667, 2667, 66, 1612, 0xd9f3817a, F=0x0
+1, 2686, 2686, 46, 1024, 0x584f0189
+1, 2732, 2732, 46, 1024, 0xb765fce5
+0, 2733, 2733, 66, 1696, 0x91ceac8b, F=0x0
+1, 2779, 2779, 46, 1024, 0x570dfe8b
+0, 2800, 2800, 66, 1532, 0x0b2a7bf1, F=0x0
+1, 2825, 2825, 46, 1024, 0x2aa7ff16
+0, 2867, 2867, 66, 2072, 0x3daf2859, F=0x0
+1, 2872, 2872, 46, 1024, 0x5174fe72
+1, 2918, 2918, 46, 1024, 0x21b302d0
+0, 2933, 2933, 66, 1568, 0xbd4d7e64, F=0x0
+1, 2964, 2964, 35, 785, 0x88b67dcd
--
2.32.0
_______________________________________________
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] 4+ messages in thread
* Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning
2022-01-09 20:15 [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 2/3] avformat/matroskaenc: Add option to shift data to write cues at front Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 3/3] fate/matroska: Add test for QT-mode Andreas Rheinhardt
@ 2022-01-12 9:51 ` Andreas Rheinhardt
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Rheinhardt @ 2022-01-12 9:51 UTC (permalink / raw)
To: ffmpeg-devel
Andreas Rheinhardt:
> It is perfectly fine to have from one to seven bits left
> at the end of parsing.
>
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
> ---
> libavcodec/vp3.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
> index 5b9ba60f49..791e531862 100644
> --- a/libavcodec/vp3.c
> +++ b/libavcodec/vp3.c
> @@ -3149,10 +3149,10 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
> "Unknown Theora config packet: %d\n", ptype & ~0x80);
> break;
> }
> - if (ptype != 0x81 && 8 * header_len[i] != get_bits_count(&gb))
> + if (ptype != 0x81 && get_bits_left(&gb) >= 8U)
> av_log(avctx, AV_LOG_WARNING,
> "%d bits left in packet %X\n",
> - 8 * header_len[i] - get_bits_count(&gb), ptype);
> + get_bits_left(&gb), ptype);
> if (s->theora < 0x030200)
> break;
> }
>
Will apply this patchset 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] 4+ messages in thread
end of thread, other threads:[~2022-01-12 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-09 20:15 [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 2/3] avformat/matroskaenc: Add option to shift data to write cues at front Andreas Rheinhardt
2022-01-09 20:24 ` [FFmpeg-devel] [PATCH 3/3] fate/matroska: Add test for QT-mode Andreas Rheinhardt
2022-01-12 9:51 ` [FFmpeg-devel] [PATCH 1/3] avcodec/vp3: Don't output bogus warning 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