Andreas Rheinhardt: > Also covers muxing and demuxing of nonstandard FLAC channel layouts > and the multi-dim-quant option of the FLAC encoder > (all of which was hitherto uncovered). > > Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com> > --- > tests/fate/cover-art.mak | 10 +++ > tests/ref/fate/cover-art-flac-remux | 111 ++++++++++++++++++++++++++++ > 2 files changed, 121 insertions(+) > create mode 100644 tests/ref/fate/cover-art-flac-remux > > diff --git a/tests/fate/cover-art.mak b/tests/fate/cover-art.mak > index c42a4bc499..cbcc03fabf 100644 > --- a/tests/fate/cover-art.mak > +++ b/tests/fate/cover-art.mak > @@ -46,6 +46,16 @@ FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL > MP3_DEMUXER MJPEG_DECODER \ > += fate-cover-art-mp3-id3v2-remux > fate-cover-art-mp3-id3v2-remux: CMD = transcode mp3 > $(TARGET_SAMPLES)/exif/embedded_small.mp3 mp3 "-map 0 -map 0:v -map 0:v -c:a > copy -filter:v:0 scale -filter:v:2 scale -c:v:0 bmp -c:v:1 copy -c:v:2 png > -metadata:s:v:0 comment=Band/Orchestra" "-map 0 -c copy -t 0.1" "" > "-show_entries > stream_tags:stream_disposition=attached_pic:stream=index,codec_name" > > +# Also covers muxing and demuxing of nonstandard channel layouts into FLAC. > +FATE_COVER_ART_REMUX-$(call ALLYES, FILE_PROTOCOL MOV_DEMUXER OGG_DEMUXER \ > + ALAC_DECODER MJPEG_DECODER SCALE_FILTER \ > + CHANNELMAP_FILTER ARESAMPLE_FILTER \ > + FLAC_ENCODER BMP_ENCODER PNG_ENCODER \ > + FLAC_MUXER FLAC_DEMUXER FLAC_DECODER \ > + FRAMECRC_MUXER PIPE_PROTOCOL) \ > + += fate-cover-art-flac-remux > +fate-cover-art-flac-remux: CMD = transcode mov > $(TARGET_SAMPLES)/lossless-audio/inside.m4a flac "-map 0 -map 1:v -map 1:v > -af channelmap=channel_layout=FL+FC,aresample -c:a flac -multi_dim_quant 1 > -c:v:0 copy -metadata:s:v:0 comment=Illustration -metadata:s:v:0 > title=OpenMusic -filter:v:1 scale -c:v:1 png -metadata:s:v:1 title=landscape > -c:v:2 copy -filter:v:3 scale -metadata:s:v:2 title=portrait -c:v:3 bmp > -metadata:s:v:3 comment=Conductor -c:v:4 copy -t 0.5" "-map 0 -map 0:a -c:a:0 > copy -c:v copy" "" "-show_entries > format_tags:stream_tags:stream_disposition=attached_pic:stream=index,codec_name" > "-f ogg -i $(TARGET_SAMPLES)/cover_art/ogg_vorbiscomment_cover.opus" > + > FCA_TEMP-$(call ALLYES, RAWVIDEO_MUXER FILE_PROTOCOL) = $(FATE_COVER_ART-yes) > FATE_COVER_ART = $(FCA_TEMP-yes) > $(FATE_COVER_ART): CMP = oneline > diff --git a/tests/ref/fate/cover-art-flac-remux > b/tests/ref/fate/cover-art-flac-remux > new file mode 100644 > index 0000000000..07a8400128 > --- /dev/null > +++ b/tests/ref/fate/cover-art-flac-remux > @@ -0,0 +1,111 @@ > +26a0d04dadbdd2703a78c603f7901bc9 *tests/data/fate/cover-art-flac-remux.flac > +1103460 tests/data/fate/cover-art-flac-remux.flac > +#extradata 0: 34, 0x92060af7 > +#tb 0: 1/44100 > +#media_type 0: audio > +#codec_id 0: flac > +#sample_rate 0: 44100 > +#channel_layout 0: 5 > +#channel_layout_name 0: 2 channels (FL+FC) > +#tb 1: 1/90000 > +#media_type 1: video > +#codec_id 1: png > +#dimensions 1: 200x200 > +#sar 1: 2834/2834 > +#tb 2: 1/90000 > +#media_type 2: video > +#codec_id 2: png > +#dimensions 2: 485x359 > +#sar 2: 1/1 > +#tb 3: 1/90000 > +#media_type 3: video > +#codec_id 3: mjpeg > +#dimensions 3: 199x300 > +#sar 3: 72/72 > +#tb 4: 1/90000 > +#media_type 4: video > +#codec_id 4: bmp > +#dimensions 4: 485x359 > +#sar 4: 0/1 > +#tb 5: 1/90000 > +#media_type 5: video > +#codec_id 5: mjpeg > +#dimensions 5: 199x300 > +#sar 5: 72/72 > +#tb 6: 1/44100 > +#media_type 6: audio > +#codec_id 6: pcm_s16le > +#sample_rate 6: 44100 > +#channel_layout 6: 5 > +#channel_layout_name 6: 2 channels (FL+FC) > +0, 0, 0, 4608, 14, 0x242b036d > +1, 0, 0, 0, 66888, 0x1fd72743 > +2, 0, 0, 0, 438706, 0x8bcb753b > +3, 0, 0, 0, 21671, 0x7d1c6030 > +4, 0, 0, 0, 522758, 0x7a63572f > +5, 0, 0, 0, 21671, 0x7d1c6030 > +6, 0, 0, 4608, 18432, 0x00000000 > +0, 4608, 4608, 4608, 7636, 0xc3775d85 > +6, 4608, 4608, 4608, 18432, 0xaaab4d62 > +0, 9216, 9216, 4608, 5700, 0x8b9a3cc7 > +6, 9216, 9216, 4608, 18432, 0x49410f52 > +0, 13824, 13824, 4608, 5375, 0x1fa6c33b > +6, 13824, 13824, 4608, 18432, 0x2d52e439 > +0, 18432, 18432, 3618, 4060, 0x59fd7219 > +6, 18432, 18432, 3618, 14472, 0xd2d47505 >
This test gives different results depending upon whether lpc_apply_welch_window_sse2 is used or not. Here is the diff: --- ./tests/ref/fate/cover-art-flac-remux 2021-08-31 03:50:13.923155025 +0000 +++ tests/data/fate/cover-art-flac-remux 2021-08-31 04:17:10.016165436 +0000 @@ -1,4 +1,4 @@ -26a0d04dadbdd2703a78c603f7901bc9 *tests/data/fate/cover-art-flac-remux.flac +6f275651fdb5af696a95f9f0a1afbadb *tests/data/fate/cover-art-flac-remux.flac 1103460 tests/data/fate/cover-art-flac-remux.flac #extradata 0: 34, 0x92060af7 #tb 0: 1/44100 @@ -51,7 +51,7 @@ 6, 9216, 9216, 4608, 18432, 0x49410f52 0, 13824, 13824, 4608, 5375, 0x1fa6c33b 6, 13824, 13824, 4608, 18432, 0x2d52e439 -0, 18432, 18432, 3618, 4060, 0x59fd7219 +0, 18432, 18432, 3618, 4060, 0xcb396324 6, 18432, 18432, 3618, 14472, 0xd2d47505 [STREAM] index=0 I presume that it has something to do with this being the small last frame and that maybe said function overreads a bit? It also happens when one disables the uncommon option "-multi_dim_quant 1"; in fact the difference is more pronounced if one does so: Using lpc_apply_welch_window_sse2 results in a one byte bigger frame. Notice that the decoded audio is always identical. It would be nice if someone with assembly skills could look into this. - 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-requ...@ffmpeg.org with subject "unsubscribe".