[FFmpeg-devel] [PATCH 01/12] timecode: add write regressions tests.

Clément Bœsch ubitux at gmail.com
Tue Jan 31 14:30:37 CET 2012


On Wed, Jan 25, 2012 at 05:42:39PM +0100, Clément Bœsch wrote:
> On Tue, Jan 24, 2012 at 01:38:47PM +0100, Stefano Sabatini wrote:
> > On date Monday 2012-01-23 17:04:20 +0100, Clément Bœsch encoded:
> > > From: Clément Bœsch <clement.boesch at smartjog.com>
> > > 
> > > ---
> > >  tests/lavf-regression.sh |   34 ++++++++++++++++++++++++++++++----
> > >  tests/ref/lavf/dv_fmt    |    4 ++++
> > >  tests/ref/lavf/gxf       |    4 ++++
> > >  tests/ref/lavf/mov       |    4 ++++
> > >  tests/ref/lavf/mpg       |    4 ++++
> > >  tests/ref/lavf/mxf       |    6 +++++-
> > >  6 files changed, 51 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
> > > index af34e86..56029a4 100755
> > > --- a/tests/lavf-regression.sh
> > > +++ b/tests/lavf-regression.sh
> > > @@ -13,13 +13,35 @@ eval do_$test=y
> > >  
> > >  ENC_OPTS="$ENC_OPTS -metadata title=lavftest"
> > >  
> > > -do_lavf()
> > > +do_lavf_nocrc()
> > >  {
> > >      file=${outfile}lavf.$1
> > >      do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 44100 -f s16le -i $pcm_src $ENC_OPTS -b:a 64k -t 1 -qscale:v 10 $2
> > > +}
> > > +
> > 
> > > +do_lavf()
> > > +{
> > > +    do_lavf_nocrc "$@"
> > >      do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
> > >  }
> > 
> > I'm not sure why you don't want do_crc with timecodes.
> > 
> 
> Well actually the CRC looked the same as long as I don't play with the
> rate. Do you think it's worth keeping them? It's slowing down the tests
> quite a bit if I do so, and I'm not sure they are actually useful in this
> case.
> 

New simplified patch, with the CRC. Also reordered the tests so do_lavf is
the last one (the file is re-used for seeking tests later).

-- 
Clément B.
-------------- next part --------------
From a36489ec42250f9428030d79164b52e52de1acae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= <clement.boesch at smartjog.com>
Date: Mon, 23 Jan 2012 14:48:08 +0100
Subject: [PATCH 01/13] timecode: add write regressions tests.

---
 tests/lavf-regression.sh |   20 +++++++++++++++++---
 tests/ref/lavf/dv_fmt    |    6 ++++++
 tests/ref/lavf/gxf       |    6 ++++++
 tests/ref/lavf/mov       |    6 ++++++
 tests/ref/lavf/mpg       |    6 ++++++
 tests/ref/lavf/mxf       |    8 +++++++-
 6 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/tests/lavf-regression.sh b/tests/lavf-regression.sh
index e48358c..286d94f 100755
--- a/tests/lavf-regression.sh
+++ b/tests/lavf-regression.sh
@@ -20,6 +20,16 @@ do_lavf()
     do_avconv_crc $file $DEC_OPTS -i $target_path/$file $3
 }
 
+do_lavf_timecode_nodrop() { do_lavf $1 "$2 -timecode 02:56:14:13"; }
+do_lavf_timecode_drop()   { do_lavf $1 "$2 -timecode 02:56:14.13 -r 30000/1001"; }
+
+do_lavf_timecode()
+{
+    do_lavf_timecode_nodrop "$@"
+    do_lavf_timecode_drop "$@"
+    do_lavf "$@"
+}
+
 do_streamed_images()
 {
     file=${outfile}${1}pipe.$1
@@ -61,11 +71,11 @@ do_avconv $file $DEC_OPTS -f image2 -vcodec pgmyuv -i $raw_src $DEC_OPTS -ar 441
 fi
 
 if [ -n "$do_mpg" ] ; then
-do_lavf mpg "-ab 64k"
+do_lavf_timecode mpg "-ab 64k"
 fi
 
 if [ -n "$do_mxf" ] ; then
-do_lavf mxf "-ar 48000 -bf 2 -timecode 02:56:14:13"
+do_lavf_timecode mxf "-ar 48000 -bf 2"
 fi
 
 if [ -n "$do_mxf_d10" ]; then
@@ -89,14 +99,18 @@ do_lavf flv -an
 fi
 
 if [ -n "$do_mov" ] ; then
-do_lavf mov "-acodec pcm_alaw -vcodec mpeg4"
+do_lavf_timecode mov "-acodec pcm_alaw -vcodec mpeg4"
 fi
 
 if [ -n "$do_dv_fmt" ] ; then
+do_lavf_timecode_nodrop dv "-ar 48000 -r 25 -s pal -ac 2"
+do_lavf_timecode_drop   dv "-ar 48000 -pix_fmt yuv411p -s ntsc -ac 2"
 do_lavf dv "-ar 48000 -r 25 -s pal -ac 2"
 fi
 
 if [ -n "$do_gxf" ] ; then
+do_lavf_timecode_nodrop gxf "-ar 48000 -r 25 -s pal -ac 1"
+do_lavf_timecode_drop   gxf "-ar 48000 -s ntsc -ac 1"
 do_lavf gxf "-ar 48000 -r 25 -s pal -ac 1"
 fi
 
diff --git a/tests/ref/lavf/dv_fmt b/tests/ref/lavf/dv_fmt
index ded1cee..884c079 100644
--- a/tests/ref/lavf/dv_fmt
+++ b/tests/ref/lavf/dv_fmt
@@ -1,3 +1,9 @@
+6f9cfff48f536fa727696f2f9fb3ac08 *./tests/data/lavf/lavf.dv
+3600000 ./tests/data/lavf/lavf.dv
+./tests/data/lavf/lavf.dv CRC=0x5ce4e5e4
+cc33ae4f9e6828914dea0f09d1241b7e *./tests/data/lavf/lavf.dv
+3480000 ./tests/data/lavf/lavf.dv
+./tests/data/lavf/lavf.dv CRC=0x8d5e9e8f
 3a6a9163a67b729b4a6b5d972ccceb97 *./tests/data/lavf/lavf.dv
 3600000 ./tests/data/lavf/lavf.dv
 ./tests/data/lavf/lavf.dv CRC=0x5ce4e5e4
diff --git a/tests/ref/lavf/gxf b/tests/ref/lavf/gxf
index 57839c9..5796895 100644
--- a/tests/ref/lavf/gxf
+++ b/tests/ref/lavf/gxf
@@ -1,3 +1,9 @@
+befc1a39c37a4ecd9264942a3e34b3f6 *./tests/data/lavf/lavf.gxf
+796392 ./tests/data/lavf/lavf.gxf
+./tests/data/lavf/lavf.gxf CRC=0x102918fd
+267d2b2b6e357209d76c366302cf35c3 *./tests/data/lavf/lavf.gxf
+794572 ./tests/data/lavf/lavf.gxf
+./tests/data/lavf/lavf.gxf CRC=0xab47d02d
 1c1693cf2358025f1e37ac76e1da925a *./tests/data/lavf/lavf.gxf
 796392 ./tests/data/lavf/lavf.gxf
 ./tests/data/lavf/lavf.gxf CRC=0x102918fd
diff --git a/tests/ref/lavf/mov b/tests/ref/lavf/mov
index 619489c..610a759 100644
--- a/tests/ref/lavf/mov
+++ b/tests/ref/lavf/mov
@@ -1,3 +1,9 @@
 9a0b239ff596da58debcf210dece3985 *./tests/data/lavf/lavf.mov
 357821 ./tests/data/lavf/lavf.mov
 ./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
+cea874222a6d40b1761d75ea11ebe681 *./tests/data/lavf/lavf.mov
+367251 ./tests/data/lavf/lavf.mov
+./tests/data/lavf/lavf.mov CRC=0xab307eb9
+9a0b239ff596da58debcf210dece3985 *./tests/data/lavf/lavf.mov
+357821 ./tests/data/lavf/lavf.mov
+./tests/data/lavf/lavf.mov CRC=0x2f6a9b26
diff --git a/tests/ref/lavf/mpg b/tests/ref/lavf/mpg
index b81cb8a..a22e208 100644
--- a/tests/ref/lavf/mpg
+++ b/tests/ref/lavf/mpg
@@ -1,3 +1,9 @@
+6103dbae73aec6c9bf05bbbc6ea35f89 *./tests/data/lavf/lavf.mpg
+372736 ./tests/data/lavf/lavf.mpg
+./tests/data/lavf/lavf.mpg CRC=0xf361ed74
+91b42dd3352e21dd0dee57f6a7241ca2 *./tests/data/lavf/lavf.mpg
+387072 ./tests/data/lavf/lavf.mpg
+./tests/data/lavf/lavf.mpg CRC=0x3d6ddf56
 dd60652c2193670abffb8c2a123a820e *./tests/data/lavf/lavf.mpg
 372736 ./tests/data/lavf/lavf.mpg
 ./tests/data/lavf/lavf.mpg CRC=0xf361ed74
diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf
index 73eb307..f78fe38 100644
--- a/tests/ref/lavf/mxf
+++ b/tests/ref/lavf/mxf
@@ -1,3 +1,9 @@
 785e38ddd2466046f30aa36399b8f8fa *./tests/data/lavf/lavf.mxf
 525881 ./tests/data/lavf/lavf.mxf
-./tests/data/lavf/lavf.mxf CRC=0x4ace0849
\ No newline at end of file
+./tests/data/lavf/lavf.mxf CRC=0x4ace0849
+ccaa42c75e653f71604fd28c7c83722d *./tests/data/lavf/lavf.mxf
+537657 ./tests/data/lavf/lavf.mxf
+./tests/data/lavf/lavf.mxf CRC=0x9b928d6b
+c78207030d57b48295b089916849d50d *./tests/data/lavf/lavf.mxf
+525881 ./tests/data/lavf/lavf.mxf
+./tests/data/lavf/lavf.mxf CRC=0x4ace0849
-- 
1.7.8.3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120131/89873de3/attachment.asc>


More information about the ffmpeg-devel mailing list