diff mbox series

[FFmpeg-devel,3/3] fate/oggvorbis: Fix tests after fixing AV_PKT_DATA_SKIP_SAMPLES

Message ID 20210707154134.59769-3-gsun@roblox.com
State Accepted
Headers show
Series [FFmpeg-devel,1/3] avformat/oggparsevorbis: Update end_trimming for the last packet | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate fail Make fate failed
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate warning Make fate failed

Commit Message

Guangyu Sun July 7, 2021, 3:41 p.m. UTC
After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg,
the actual decoded samples become fewer. Three fate tests are failing:

fate-vorbis-20:
The samples in 6.ogg are not frame aligned. 6.pcm file was generated by
ffmpeg before the fix. After the fix, the decoded pcm file does not match
anymore. The ref file 6.pcm needs to be updated.

fate-webm-dash-chapters:
The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm.
The ref file webm-dash-chapters needs to be updated.

fate-vorbis-encode:
This exposes another bug in the vorbis encoder that initial_padding is not
correctly set. It is fixed in the previous patch.

Signed-off-by: Guangyu Sun <gsun@roblox.com>
---
 tests/fate/vorbis.mak             | 2 +-
 tests/ref/fate/webm-dash-chapters | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Lynne July 8, 2021, 10:42 a.m. UTC | #1
7 Jul 2021, 17:41 by sunguangyucn@gmail.com:

> After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg,
> the actual decoded samples become fewer. Three fate tests are failing:
>
> fate-vorbis-20:
> The samples in 6.ogg are not frame aligned. 6.pcm file was generated by
> ffmpeg before the fix. After the fix, the decoded pcm file does not match
> anymore. The ref file 6.pcm needs to be updated.
>
> fate-webm-dash-chapters:
> The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm.
> The ref file webm-dash-chapters needs to be updated.
>
> fate-vorbis-encode:
> This exposes another bug in the vorbis encoder that initial_padding is not
> correctly set. It is fixed in the previous patch.
>
> Signed-off-by: Guangyu Sun <gsun@roblox.com>
> ---
>  tests/fate/vorbis.mak             | 2 +-
>  tests/ref/fate/webm-dash-chapters | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak
> index 354cc57a0f..65fcadf33d 100644
> --- a/tests/fate/vorbis.mak
> +++ b/tests/fate/vorbis.mak
> @@ -86,7 +86,7 @@ fate-vorbis-19: REF = $(SAMPLES)/vorbis/test-short2_small.pcm
>  
>  FATE_VORBIS += fate-vorbis-20
>  fate-vorbis-20: CMD = pcm -i $(TARGET_SAMPLES)/vorbis/6.ogg
> -fate-vorbis-20: REF = $(SAMPLES)/vorbis/6.pcm
> +fate-vorbis-20: REF = $(SAMPLES)/vorbis/6_v2.pcm 
>

I don't think it's really worth it including another copy of the same file,
only smaller. You can change the test itself to ignore the length difference
(but still keep the value check) by adding this line instead:
fate-vorbis-20: SIZE_TOLERANCE = XXXX

I'm not sure the exact units the tolerance is in, but try using multiples
or even divisors of 9948, +-1 until it fixes the check exactly.
Guangyu Sun July 10, 2021, 12:09 a.m. UTC | #2
On Thu, Jul 8, 2021 at 3:42 AM Lynne <dev@lynne.ee> wrote:
>
> 7 Jul 2021, 17:41 by sunguangyucn@gmail.com:
>
> > After fixing AV_PKT_DATA_SKIP_SAMPLES for reading vorbis packets from ogg,
> > the actual decoded samples become fewer. Three fate tests are failing:
> >
> > fate-vorbis-20:
> > The samples in 6.ogg are not frame aligned. 6.pcm file was generated by
> > ffmpeg before the fix. After the fix, the decoded pcm file does not match
> > anymore. The ref file 6.pcm needs to be updated.
> >
> > fate-webm-dash-chapters:
> > The original vorbis_chapter_extension_demo.ogg is transmuxed to dash-webm.
> > The ref file webm-dash-chapters needs to be updated.
> >
> > fate-vorbis-encode:
> > This exposes another bug in the vorbis encoder that initial_padding is not
> > correctly set. It is fixed in the previous patch.
> >
> > Signed-off-by: Guangyu Sun <gsun@roblox.com>
> > ---
> >  tests/fate/vorbis.mak             | 2 +-
> >  tests/ref/fate/webm-dash-chapters | 4 ++--
> >  2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak
> > index 354cc57a0f..65fcadf33d 100644
> > --- a/tests/fate/vorbis.mak
> > +++ b/tests/fate/vorbis.mak
> > @@ -86,7 +86,7 @@ fate-vorbis-19: REF = $(SAMPLES)/vorbis/test-short2_small.pcm
> >
> >  FATE_VORBIS += fate-vorbis-20
> >  fate-vorbis-20: CMD = pcm -i $(TARGET_SAMPLES)/vorbis/6.ogg
> > -fate-vorbis-20: REF = $(SAMPLES)/vorbis/6.pcm
> > +fate-vorbis-20: REF = $(SAMPLES)/vorbis/6_v2.pcm
> >
>
> I don't think it's really worth it including another copy of the same file,
> only smaller. You can change the test itself to ignore the length difference
> (but still keep the value check) by adding this line instead:
> fate-vorbis-20: SIZE_TOLERANCE = XXXX
>
> I'm not sure the exact units the tolerance is in, but try using multiples
> or even divisors of 9948, +-1 until it fixes the check exactly.
The units seem to be in bytes. 9948 should be correct. Will send the
new patch. Thanks!

> _______________________________________________
> 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".
diff mbox series

Patch

diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak
index 354cc57a0f..65fcadf33d 100644
--- a/tests/fate/vorbis.mak
+++ b/tests/fate/vorbis.mak
@@ -86,7 +86,7 @@  fate-vorbis-19: REF = $(SAMPLES)/vorbis/test-short2_small.pcm
 
 FATE_VORBIS += fate-vorbis-20
 fate-vorbis-20: CMD = pcm -i $(TARGET_SAMPLES)/vorbis/6.ogg
-fate-vorbis-20: REF = $(SAMPLES)/vorbis/6.pcm
+fate-vorbis-20: REF = $(SAMPLES)/vorbis/6_v2.pcm
 
 FATE_VORBIS_FFPROBE-$(CONFIG_OGG_DEMUXER) += fate-vorbis-1833-chapters
 fate-vorbis-1833-chapters: CMD = probechapters $(TARGET_SAMPLES)/vorbis/vorbis_chapter_extension_demo.ogg
diff --git a/tests/ref/fate/webm-dash-chapters b/tests/ref/fate/webm-dash-chapters
index 20ddfc031d..45368dca85 100644
--- a/tests/ref/fate/webm-dash-chapters
+++ b/tests/ref/fate/webm-dash-chapters
@@ -1,5 +1,5 @@ 
-e7fde2ecc9683a7a5296dab33b028653 *tests/data/fate/webm-dash-chapters.webm
-111220 tests/data/fate/webm-dash-chapters.webm
+f94bcae96166ad246a4b76605a4b3874 *tests/data/fate/webm-dash-chapters.webm
+111236 tests/data/fate/webm-dash-chapters.webm
 #extradata 0:     3469, 0xc6769ddc
 #tb 0: 1/1000
 #media_type 0: audio