[FFmpeg-devel] [PATCH] fate: add test for avfft
Hi there, Here is a patch that changes the avfft test. This test is similar to libavcodec/tests/fft-fixed.c. I modified libavcodec/tests/fft.c a bit to adapt to make use of the new abi. At the moment I only did test for fft and mdct, If no more suggestions then I'll do tests for the remaining modules. Any suggestion is welcome :) Thanks, Petru Rares.From b77fa779cf961ddb4bbe89152ec2712b80979a02 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 4 Jul 2016 17:23:14 +0200 Subject: [PATCH] fate: add test for avfft --- libavcodec/tests/avfft.c | 41 +++-- libavcodec/tests/fft.c | 113 +-- tests/fate/fft.mak | 33 +- 3 files changed, 138 insertions(+), 49 deletions(-) diff --git a/libavcodec/tests/avfft.c b/libavcodec/tests/avfft.c index 6bc48ea..6660b15 100644 --- a/libavcodec/tests/avfft.c +++ b/libavcodec/tests/avfft.c @@ -16,38 +16,11 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" -#include "libavutil/mem.h" -#include "libavcodec/avfft.h" - -int main(int argc, char **argv) -{ -int i; -#define LEN 1024 -FFTSample *ref = av_malloc_array(LEN, sizeof(*ref)); -FFTSample *data = av_malloc_array(LEN, sizeof(*data)); -RDFTContext *rdft_context = av_rdft_init(10, DFT_R2C); -RDFTContext *irdft_context = av_rdft_init(10, IDFT_C2R); - -if (!ref || !data || !rdft_context || !irdft_context) -return 2; -for (i=0; i 1) { -fprintf(stderr, "Failed at %d (%f %f)\n", i, ref[i], data[i]/LEN*2); -return 1; -} -} - -av_rdft_end(rdft_context); -av_rdft_end(irdft_context); -av_free(data); -av_free(ref); +/* + * This test is similar to fft-fixed.c or fft-fixed32.c + */ -return 0; -} +#define AVFFT 1 +#define FFT_FLOAT 0 +#define FFT_FIXED_32 0 +#include "fft.c" diff --git a/libavcodec/tests/fft.c b/libavcodec/tests/fft.c index 4717303..afd8ecb 100644 --- a/libavcodec/tests/fft.c +++ b/libavcodec/tests/fft.c @@ -39,7 +39,12 @@ #include "libavutil/mathematics.h" #include "libavutil/time.h" +#if AVFFT +#include "libavcodec/avfft.h" +#else #include "libavcodec/fft.h" +#endif + #if FFT_FLOAT #include "libavcodec/dct.h" #include "libavcodec/rdft.h" @@ -55,7 +60,7 @@ pim += (MUL16(are, bim) + MUL16(bre, aim)); \ } -#if FFT_FLOAT +#if FFT_FLOAT || AVFFT #define RANGE 1.0 #define REF_SCALE(x, bits) (x) #define FMT "%10.6f" @@ -211,6 +216,78 @@ static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale) return err; } +static inline void fft_init(FFTContext **s, int nbits, int inverse) +{ +#if AVFFT +*s = av_fft_init(nbits, inverse); +#else +ff_fft_init(*s, nbits, inverse); +#endif +} + +static inline void mdct_init(FFTContext **s, int nbits, int inverse, double scale) +{ +#if AVFFT +*s = av_mdct_init(nbits, inverse, scale); +#else +ff_mdct_init(*s, nbits, inverse, scale); +#endif +} + +static inline void mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input) +{ +#if AVFFT +av_mdct_calc(s, output, input); +#else +s->mdct_calc(s, output, input); +#endif +} + +static inline void imdct_calc(struct FFTContext *s, FFTSample *output, const FFTSample *input) +{ +#if AVFFT +av_imdct_calc(s, output, input); +#else +s->imdct_calc(s, output, input); +#endif +} + +static inline void fft_permute(FFTContext *s, FFTComplex *z) +{ +#if AVFFT +av_fft_permute(s, z); +#else +s->fft_permute(s, z); +#endif +} + +static inline void fft_calc(FFTContext *s, FFTComplex *z) +{ +#if AVFFT +av_fft_calc(s, z); +#else +s->fft_calc(s, z); +#endif +} + +static inline void mdct_end(FFTContext *s) +{ +#if AVFFT +av_mdct_end(s); +#else +ff_mdct_end(s); +#endif +} + +static inline void fft_end(FFTContext *s) +{ +#if AVFFT +av_fft_end(s); +#else +ff_fft_end(s); +#endif +} + static void help(void) { av_log(NULL, AV_LOG_INFO, @@ -241,7 +318,7 @@ int main(int argc, char **argv) FFTComplex *tab, *tab1, *tab_ref; FFTSample *tab2; enum tf_transform transform = TRANSFORM_FFT; -FFTContext m, s; +FFTContext *m, *s; #if FFT_FLOAT RDFTContext r; DCTContext d; @@ -252,6 +329,11 @@ int main(int argc, char **argv) double scale = 1.0; AVLFG prng; +#if !AVFFT + s = av_mallocz(sizeof(*s)); + m = av_mallocz(sizeof(*m)); +#endif + av_lfg_init(&prng, 1); for (;;) { @@ -313,7 +395,7 @@ int main(int argc, char **argv) av_log(NULL, AV_LOG_INFO, "IMDCT"); else av_log(NULL, AV_LOG_INFO, "MDCT"); -ff_mdct_init(&m, fft_nbits, do_inverse, scale); +mdct_init(&m, fft_nbits, do_inverse, scale); break; #endif /* CONFIG_MDCT */ ca
Re: [FFmpeg-devel] [PATCH] fate: add test for avfft
Hi, Here is the rest of the test. I changed the tabs to spaces, sorry for this. Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Saturday, July 16, 2016 3:22:24 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for avfft On Fri, Jul 15, 2016 at 02:07:08PM +, Petru Rares Sincraian wrote: > Hi there, > > Here is a patch that changes the avfft test. This test is similar to > libavcodec/tests/fft-fixed.c. I modified libavcodec/tests/fft.c a bit to > adapt to make use of the new abi. At the moment I only did test for fft and > mdct, If no more suggestions then I'll do tests for the remaining modules. its a bit difficult to test with just fft and mdct but the code overall looks good to me there are also a few stray tabs in there, they should be replaced by spaces as tabs cannot be pushed to git master thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB While the State exists there can be no freedom; when there is freedom there will be no State. -- Vladimir Lenin From 726d11db2257ace12132529b49e584b60a4a6acf Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 4 Jul 2016 17:23:14 +0200 Subject: [PATCH] fate: add test for avfft --- libavcodec/tests/avfft.c | 40 ++ libavcodec/tests/fft.c | 196 +-- tests/fate/fft.mak | 33 +++- 3 files changed, 209 insertions(+), 60 deletions(-) diff --git a/libavcodec/tests/avfft.c b/libavcodec/tests/avfft.c index 6bc48ea..22aa99a 100644 --- a/libavcodec/tests/avfft.c +++ b/libavcodec/tests/avfft.c @@ -16,38 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" -#include "libavutil/mem.h" -#include "libavcodec/avfft.h" - -int main(int argc, char **argv) -{ -int i; -#define LEN 1024 -FFTSample *ref = av_malloc_array(LEN, sizeof(*ref)); -FFTSample *data = av_malloc_array(LEN, sizeof(*data)); -RDFTContext *rdft_context = av_rdft_init(10, DFT_R2C); -RDFTContext *irdft_context = av_rdft_init(10, IDFT_C2R); - -if (!ref || !data || !rdft_context || !irdft_context) -return 2; -for (i=0; i 1) { -fprintf(stderr, "Failed at %d (%f %f)\n", i, ref[i], data[i]/LEN*2); -return 1; -} -} - -av_rdft_end(rdft_context); -av_rdft_end(irdft_context); -av_free(data); -av_free(ref); +/* + * This test is similar to fft-fixed.c or fft-fixed32.c + */ -return 0; -} +#define AVFFT 1 +#define FFT_FLOAT 1 +#include "fft.c" diff --git a/libavcodec/tests/fft.c b/libavcodec/tests/fft.c index 4717303..11fd3af 100644 --- a/libavcodec/tests/fft.c +++ b/libavcodec/tests/fft.c @@ -39,7 +39,12 @@ #include "libavutil/mathematics.h" #include "libavutil/time.h" +#if AVFFT +#include "libavcodec/avfft.h" +#else #include "libavcodec/fft.h" +#endif + #if FFT_FLOAT #include "libavcodec/dct.h" #include "libavcodec/rdft.h" @@ -55,7 +60,7 @@ pim += (MUL16(are, bim) + MUL16(bre, aim)); \ } -#if FFT_FLOAT +#if FFT_FLOAT || AVFFT #define RANGE 1.0 #define REF_SCALE(x, bits) (x) #define FMT "%10.6f" @@ -211,6 +216,132 @@ static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale) return err; } +static inline void fft_init(FFTContext **s, int nbits, int inverse) +{ +#if AVFFT +*s = av_fft_init(nbits, inverse); +#else +ff_fft_init(*s, nbits, inverse); +#endif +} + +static inline void mdct_init(FFTContext **s, int nbits, int inverse, double scale) +{ +#if AVFFT +*s = av_mdct_init(nbits, inverse, scale); +#else +ff_mdct_init(*s, nbits, inverse, scale); +#endif +} + +static inline void rdft_init(RDFTContext **r, int nbits, enum RDFTransformType trans) +{ +#if AVFFT +*r = av_rdft_init(nbits, trans); +#else +ff_rdft_init(*r, nbits, trans); +#endif +} + +static inline void dct_init(DCTContext **d, int nbits, enum DCTTransformType trans) +{ +#if AVFFT +*d = av_dct_init(nbits, trans); +#else +ff_dct_init(*d, nbits, trans); +#endif +} + +static inline void mdct_calc(FFTContext *s, FFTSample *output, const FFTSample *input) +{ +#if AVFFT +av_mdct_calc(s, output, input); +#else +s->mdct_calc(s, output, input); +#endif +} + +static inline void imdct_calc(struct FFTContext *s, FFTSample *output, const FFTSample *input) +{ +#if AVFFT +av_imdct_calc(s, output, input); +#else +s->imdct_calc(s, output, input); +#endif +} + +static inline void fft_permute(FFTContext *s, FFTComplex *z) +{ +#if AVFFT +av_fft_permute(s, z); +#else +s->fft_permute(s, z); +#endif +} + +static inline void fft_calc(FFTContext *s, FFTComplex *z) +{ +#if AVFFT +av_fft_calc(s, z); +#else +s->fft_calc
Re: [FFmpeg-devel] [PATCH] fate: add test for avfft
Ups, sorry again. Here is the patch. I tested and seems to work :) From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, July 19, 2016 12:38:36 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for avfft On Mon, Jul 18, 2016 at 03:27:12PM +, Petru Rares Sincraian wrote: > Hi, > > > Here is the rest of the test. I changed the tabs to spaces, sorry for this. it seems this doesnt build make distclean ; ./configure && make -j12 fate tests/api/api-seek-test.c: In function ‘main’: tests/api/api-seek-test.c:246:36: warning: ‘j’ may be used uninitialized in this function [-Wuninitialized] tests/api/api-seek-test.c:183:12: note: ‘j’ was declared here tests/api/api-seek-test.c:246:36: warning: ‘i’ may be used uninitialized in this function [-Wuninitialized] tests/api/api-seek-test.c:183:9: note: ‘i’ was declared here ... libavcodec/tests/fft.c:656:6: warning: "AVFFT" is not defined [-Wundef] libavcodec/tests/fft.c:659:13: error: ‘r’ undeclared (first use in this function) libavcodec/tests/fft.c:659:13: note: each undeclared identifier is reported only once for each function it appears in libavcodec/tests/fft.c:660:13: error: ‘d’ undeclared (first use in this function) > > > > Thanks, > > Petru Rares. > > > From: ffmpeg-devel on behalf of Michael > Niedermayer > Sent: Saturday, July 16, 2016 3:22:24 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for avfft > > On Fri, Jul 15, 2016 at 02:07:08PM +, Petru Rares Sincraian wrote: > > Hi there, > > > > Here is a patch that changes the avfft test. This test is similar to > > libavcodec/tests/fft-fixed.c. I modified libavcodec/tests/fft.c a bit to > > adapt to make use of the new abi. At the moment I only did test for fft and > > mdct, If no more suggestions then I'll do tests for the remaining modules. > > its a bit difficult to test with just fft and mdct but the code overall > looks good to me > > there are also a few stray tabs in there, they should be replaced by > spaces as tabs cannot be pushed to git master > > thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. From 01951de1de141c10e92722f8a14cf7795a8c7d83 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 4 Jul 2016 17:23:14 +0200 Subject: [PATCH] fate: add test for avfft --- libavcodec/tests/avfft.c | 40 ++-- libavcodec/tests/fft-fixed.c | 1 + libavcodec/tests/fft-fixed32.c | 1 + libavcodec/tests/fft.c | 201 - tests/fate/fft.mak | 33 ++- 5 files changed, 216 insertions(+), 60 deletions(-) diff --git a/libavcodec/tests/avfft.c b/libavcodec/tests/avfft.c index 6bc48ea..22aa99a 100644 --- a/libavcodec/tests/avfft.c +++ b/libavcodec/tests/avfft.c @@ -16,38 +16,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include "config.h" -#include "libavutil/mem.h" -#include "libavcodec/avfft.h" - -int main(int argc, char **argv) -{ -int i; -#define LEN 1024 -FFTSample *ref = av_malloc_array(LEN, sizeof(*ref)); -FFTSample *data = av_malloc_array(LEN, sizeof(*data)); -RDFTContext *rdft_context = av_rdft_init(10, DFT_R2C); -RDFTContext *irdft_context = av_rdft_init(10, IDFT_C2R); - -if (!ref || !data || !rdft_context || !irdft_context) -return 2; -for (i=0; i 1) { -fprintf(stderr, "Failed at %d (%f %f)\n", i, ref[i], data[i]/LEN*2); -return 1; -} -} - -av_rdft_end(rdft_context); -av_rdft_end(irdft_context); -av_free(data); -av_free(ref); +/* + * This test is similar to fft-fixed.c or fft-fixed32.c + */ -return 0; -} +#define AVFFT 1 +#define FFT_FLOAT 1 +#include "fft.c" diff --git a/libavcodec/tests/fft-fixed.c b/libavcodec/tests/fft-fixed.c index fe1b57a..3c50bf1 100644 --- a/libavcodec/tests/fft-fixed.c +++ b/libavcodec/tests/fft-fixed.c @@ -17,4 +17,5 @@ */ #define FFT_FLOAT 0 +#define AVFFT 0 #include "fft.c" diff --git a/libavcodec/tests/fft-fixed32.c b/libavcodec/tests/fft-fixed32.c index f33494f..9fadd8a 100644 --- a/libavcodec/tests/fft-fixed32.c +++ b/libavcodec/tests/fft-fixed32.c @@ -18,4 +18,5 @@ #define FFT_FLOAT 0 #define FFT_FIXED_32 1 +#define AVFFT 0 #include "fft.c" diff --git a/libavcodec/tests/fft.c b/libavcodec/tests/fft.c index 4717303..1ce964e 100644 --- a/libavcodec/tests/fft.c +++ b/libavcodec/tests/fft.c @@ -39,7 +39,12 @@ #include "libavutil/mathematics.h" #include "libavutil/time.h"
[FFmpeg-devel] [PATCH] fate: add test for chorus filter
Hi there, Here is a patch for the chorus filter. I tested on x64 and x86. Regards, Petru Rares.From 4a06b5da1e4b3a3dcf8a8df09f650d2545fade6d Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 19 Jul 2016 21:18:08 +0200 Subject: [PATCH] fate: add test for chorus filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-chorus | 15 +++ 2 files changed, 20 insertions(+) create mode 100644 tests/ref/fate/filter-chorus diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 1a52320..21f68ee 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -94,6 +94,11 @@ fate-filter-asetrate: tests/data/asynth-44100-2.wav fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetrate: CMD = framecrc -i $(SRC) -aframes 20 -af asetrate=2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, CHORUS, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-chorus +fate-filter-chorus: tests/data/asynth-22050-1.wav +fate-filter-chorus: SRC = $(TARGET_PATH)/tests/data/asynth-22050-1.wav +fate-filter-chorus: CMD = framecrc -i $(SRC) -aframes 10 -af chorus=0.5:0.5:64:0.5:0.25:2 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-chorus b/tests/ref/fate/filter-chorus new file mode 100644 index 000..777a378 --- /dev/null +++ b/tests/ref/fate/filter-chorus @@ -0,0 +1,15 @@ +#tb 0: 1/22050 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 22050 +#channel_layout 0: 4 +0, 0, 0, 2048, 4096, 0x4cd2fbdf +0, 2048, 2048, 2048, 4096, 0x233cfca2 +0, 4096, 4096, 2048, 4096, 0xf43af2b0 +0, 6144, 6144, 2048, 4096, 0xea6eff9f +0, 8192, 8192, 2048, 4096, 0xa5ecf6a0 +0, 10240, 10240, 2048, 4096, 0x40d4f3b1 +0, 12288, 12288, 2048, 4096, 0x6b2bf76b +0, 14336, 14336, 2048, 4096, 0xf19df862 +0, 16384, 16384, 2048, 4096, 0x736ef763 +0, 18432, 18432, 2048, 4096, 0x93b6f640 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for dcshift filter
Hi there, Here is a test for dcshift filter :) Thanks, Petru Rares.From f64daccf65b56e6eff22989f42c70c771b2a3801 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Wed, 20 Jul 2016 18:32:04 +0200 Subject: [PATCH] fate: add test for dcshift filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-dcshift | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-dcshift diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 1a52320..a86db9c 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -94,6 +94,11 @@ fate-filter-asetrate: tests/data/asynth-44100-2.wav fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetrate: CMD = framecrc -i $(SRC) -aframes 20 -af asetrate=2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, DCSHIFT, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-dcshift +fate-filter-dcshift: tests/data/asynth-44100-2.wav +fate-filter-dcshift: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-dcshift: CMD = framecrc -i $(SRC) -aframes 20 -af dcshift=shift=0.25:limitergain=0.05 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-dcshift b/tests/ref/fate/filter-dcshift new file mode 100644 index 000..d04aa92 --- /dev/null +++ b/tests/ref/fate/filter-dcshift @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x96868842 +0, 1024, 1024, 1024, 4096, 0xeff98700 +0, 2048, 2048, 1024, 4096, 0x6ea28e1e +0, 3072, 3072, 1024, 4096, 0x67b982be +0, 4096, 4096, 1024, 4096, 0xd08a8302 +0, 5120, 5120, 1024, 4096, 0xfdf891dc +0, 6144, 6144, 1024, 4096, 0xbec4784a +0, 7168, 7168, 1024, 4096, 0x04ca910a +0, 8192, 8192, 1024, 4096, 0xe4af87d0 +0, 9216, 9216, 1024, 4096, 0xc7f18c66 +0, 10240, 10240, 1024, 4096, 0x6448732a +0, 11264, 11264, 1024, 4096, 0x98b89706 +0, 12288, 12288, 1024, 4096, 0xf47887f4 +0, 13312, 13312, 1024, 4096, 0x387290d2 +0, 14336, 14336, 1024, 4096, 0xc5716e84 +0, 15360, 15360, 1024, 4096, 0x94de8aa8 +0, 16384, 16384, 1024, 4096, 0x3a618d88 +0, 17408, 17408, 1024, 4096, 0xfeb56ec2 +0, 18432, 18432, 1024, 4096, 0x55fe8fb6 +0, 19456, 19456, 1024, 4096, 0x8ff788fa -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for earwax filter
Hi there, Here is another test, in this case for earwax filter. Regards, Petru Rares.From c5bf7787be1ff7b9be2be31341a9bd9d0dd4ceaa Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Wed, 20 Jul 2016 18:41:58 +0200 Subject: [PATCH] fate: add test for earwax filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-earwax | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-earwax diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 1a52320..ae869d4 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -94,6 +94,11 @@ fate-filter-asetrate: tests/data/asynth-44100-2.wav fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetrate: CMD = framecrc -i $(SRC) -aframes 20 -af asetrate=2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, EARWAX, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-earwax +fate-filter-earwax: tests/data/asynth-44100-2.wav +fate-filter-earwax: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-earwax: CMD = framecrc -i $(SRC) -aframes 20 -af earwax + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-earwax b/tests/ref/fate/filter-earwax new file mode 100644 index 000..8d4eaa8 --- /dev/null +++ b/tests/ref/fate/filter-earwax @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x900af751 +0, 1024, 1024, 1024, 4096, 0xad570065 +0, 2048, 2048, 1024, 4096, 0x93d5f494 +0, 3072, 3072, 1024, 4096, 0x2c65ef7d +0, 4096, 4096, 1024, 4096, 0xdc8af6d2 +0, 5120, 5120, 1024, 4096, 0x7ae00249 +0, 6144, 6144, 1024, 4096, 0xaab5fdd0 +0, 7168, 7168, 1024, 4096, 0x4373ef39 +0, 8192, 8192, 1024, 4096, 0x0756eb43 +0, 9216, 9216, 1024, 4096, 0x494d06e0 +0, 10240, 10240, 1024, 4096, 0x4393ffae +0, 11264, 11264, 1024, 4096, 0x6972f97e +0, 12288, 12288, 1024, 4096, 0xb834ea05 +0, 13312, 13312, 1024, 4096, 0x39b8f871 +0, 14336, 14336, 1024, 4096, 0xf032fccd +0, 15360, 15360, 1024, 4096, 0xefcd0709 +0, 16384, 16384, 1024, 4096, 0x0590ebc0 +0, 17408, 17408, 1024, 4096, 0x2e75f264 +0, 18432, 18432, 1024, 4096, 0xbea1fd03 +0, 19456, 19456, 1024, 4096, 0x9bbe0434 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for extrastereo filter
Hi there, Here is a patch for extrastereo filter. Regards, Petru Rares. From 24d3a378d839b7e0a165f8cd53eb28acd843cf54 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 21 Jul 2016 07:21:01 +0200 Subject: [PATCH] fate: add test for extrastereo filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-extrastereo | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-extrastereo diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 1a52320..b5663da 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -94,6 +94,11 @@ fate-filter-asetrate: tests/data/asynth-44100-2.wav fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetrate: CMD = framecrc -i $(SRC) -aframes 20 -af asetrate=2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, EXTRASTEREO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-extrastereo +fate-filter-extrastereo: tests/data/asynth-44100-2.wav +fate-filter-extrastereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-extrastereo: CMD = framecrc -i $(SRC) -aframes 20 -af extrastereo=m=2 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-extrastereo b/tests/ref/fate/filter-extrastereo new file mode 100644 index 000..e43de2d --- /dev/null +++ b/tests/ref/fate/filter-extrastereo @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x29e3eecf +0, 1024, 1024, 1024, 4096, 0x18390b96 +0, 2048, 2048, 1024, 4096, 0xc477fa99 +0, 3072, 3072, 1024, 4096, 0x3bc0f14f +0, 4096, 4096, 1024, 4096, 0x2379ed91 +0, 5120, 5120, 1024, 4096, 0xfd6a0070 +0, 6144, 6144, 1024, 4096, 0x0b01f4cf +0, 7168, 7168, 1024, 4096, 0x6716fd93 +0, 8192, 8192, 1024, 4096, 0x1840f25b +0, 9216, 9216, 1024, 4096, 0x9c1ffaf1 +0, 10240, 10240, 1024, 4096, 0xcbedefaf +0, 11264, 11264, 1024, 4096, 0x3e050390 +0, 12288, 12288, 1024, 4096, 0xb30e0090 +0, 13312, 13312, 1024, 4096, 0x26b8f75b +0, 14336, 14336, 1024, 4096, 0xd706e311 +0, 15360, 15360, 1024, 4096, 0x0c480138 +0, 16384, 16384, 1024, 4096, 0x6c9a0216 +0, 17408, 17408, 1024, 4096, 0x7abce54f +0, 18432, 18432, 1024, 4096, 0xda45f63f +0, 19456, 19456, 1024, 4096, 0x50d5ff87 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for silenceremove filter
Hi there, Here is a test for silenceremove filter. Regards, Petru :)From c91678a65751beee3959977af07f263cf879468a Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 28 Jul 2016 19:31:55 +0200 Subject: [PATCH] fate: add test for silenceremove filter --- tests/fate/filter-audio.mak | 4 tests/ref/fate/filter-silenceremove | 35 +++ 2 files changed, 39 insertions(+) create mode 100644 tests/ref/fate/filter-silenceremove diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 32787a7..d83c3b6 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -114,6 +114,10 @@ fate-filter-extrastereo: tests/data/asynth-44100-2.wav fate-filter-extrastereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-extrastereo: CMD = framecrc -i $(SRC) -aframes 20 -af extrastereo=m=2 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, SILENCEREMOVE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-silenceremove +fate-filter-silenceremove: SRC = $(TARGET_SAMPLES)/audio-reference/divertimenti_2ch_96kHz_s24.wav +fate-filter-silenceremove: CMD = framecrc -i $(SRC) -aframes 30 -af silenceremove=0:0:0:-1:0:-90dB + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-silenceremove b/tests/ref/fate/filter-silenceremove new file mode 100644 index 000..43360e8 --- /dev/null +++ b/tests/ref/fate/filter-silenceremove @@ -0,0 +1,35 @@ +#tb 0: 1/192000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 192000 +#channel_layout 0: 3 +0, 0, 0,1,4, 0x0028 +0, 1, 1,1,4, 0x00180006 +0, 2, 2,1,4, 0x001c0007 +0, 3, 3,1,4, 0x03250208 +0, 4, 4,1,4, 0x03290208 +0, 5, 5,1,4, 0x03230207 +0, 6, 6,1,4, 0x031f0206 +0, 7, 7,1,4, 0x03250208 +0, 8, 8,1,4, 0x00220009 +0, 9, 9,1,4, 0x0029 +0, 10, 10,1,4, 0x03250208 +0, 11, 11,1,4, 0x0335020c +0, 12, 12,1,4, 0x034b0211 +0, 13, 13,1,4, 0x034b020f +0, 14, 14,1,4, 0x0343020e +0, 15, 15,1,4, 0x00440011 +0, 16, 16,1,4, 0x00400011 +0, 17, 17,1,4, 0x003a000f +0, 18, 18,1,4, 0x0339020d +0, 19, 19,1,4, 0x003a000f +0, 20, 20,1,4, 0x0034000d +0, 21, 21,1,4, 0x0034000d +0, 22, 22,1,4, 0x0036000e +0, 23, 23,1,4, 0x03290208 +0, 24, 24,1,4, 0x03230204 +0, 25, 25,1,4, 0x03170201 +0, 26, 26,1,4, 0x030701fd +0, 27, 27,1,4, 0x02fd01fc +0, 28, 28,1,4, 0x00060002 +0, 29, 29,1,4, 0x000c0004 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for stereotools filter
Hi there, Here is a test for stereotools filter. Regards, Petru :DFrom fae8038c19ec162179d7606f74c698a0f6de61c2 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 28 Jul 2016 20:01:40 +0200 Subject: [PATCH] fate: add test for stereotools filter --- tests/fate/filter-audio.mak | 4 tests/ref/fate/filter-stereotools | 25 + 2 files changed, 29 insertions(+) create mode 100644 tests/ref/fate/filter-stereotools diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 32787a7..cb278c8 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -114,6 +114,10 @@ fate-filter-extrastereo: tests/data/asynth-44100-2.wav fate-filter-extrastereo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-extrastereo: CMD = framecrc -i $(SRC) -aframes 20 -af extrastereo=m=2 +FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, STEREOTOOLS, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-stereotools +fate-filter-stereotools: SRC = $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav +fate-filter-stereotools: CMD = framecrc -i $(SRC) -aframes 20 -af stereotools=mlev=0.015625 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-stereotools b/tests/ref/fate/filter-stereotools new file mode 100644 index 000..89babd6 --- /dev/null +++ b/tests/ref/fate/filter-stereotools @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x48b6d241 +0, 1024, 1024, 1024, 4096, 0xe0c4ca9a +0, 2048, 2048, 1024, 4096, 0x6dd8e26c +0, 3072, 3072, 1024, 4096, 0x047cce1c +0, 4096, 4096, 1024, 4096, 0x0b7bc8e4 +0, 5120, 5120, 1024, 4096, 0xf0c9d037 +0, 6144, 6144, 1024, 4096, 0x6f23c83d +0, 7168, 7168, 1024, 4096, 0xe6d8c099 +0, 8192, 8192, 1024, 4096, 0xcca3cb25 +0, 9216, 9216, 1024, 4096, 0xefced25b +0, 10240, 10240, 1024, 4096, 0x8614cdcb +0, 11264, 11264, 1024, 4096, 0x06d1eb3f +0, 12288, 12288, 1024, 4096, 0x7afbcffd +0, 13312, 13312, 1024, 4096, 0x6371dcd8 +0, 14336, 14336, 1024, 4096, 0xdd8f90d9 +0, 15360, 15360, 1024, 4096, 0x448c08f4 +0, 16384, 16384, 1024, 4096, 0x4d9b2d26 +0, 17408, 17408, 1024, 4096, 0x735a05da +0, 18432, 18432, 1024, 4096, 0x8651bf40 +0, 19456, 19456, 1024, 4096, 0xbf98c4e7 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for tremolo filter
Hi there, Here is a test for tremolo filter. Regards, Petru Rares :)From c83f7fadf860c9612dfa545703ba596f3c729cbf Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 2 Aug 2016 09:38:17 +0200 Subject: [PATCH] fate: add test for tremolo filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-tremolo | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-tremolo diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index ac4c3f4..d9db494 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -122,6 +122,11 @@ FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, STEREOTOOLS, WAV, PCM_S16LE, PCM fate-filter-stereotools: SRC = $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-filter-stereotools: CMD = framecrc -i $(SRC) -aframes 20 -af stereotools=mlev=0.015625 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, TREMOLO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-tremolo +fate-filter-tremolo: tests/data/asynth-44100-2.wav +fate-filter-tremolo: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-tremolo: CMD = framecrc -i $(SRC) -aframes 20 -af tremolo + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-tremolo b/tests/ref/fate/filter-tremolo new file mode 100644 index 000..ed0e662 --- /dev/null +++ b/tests/ref/fate/filter-tremolo @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x5d3be907 +0, 1024, 1024, 1024, 4096, 0xea151fbe +0, 2048, 2048, 1024, 4096, 0xa5bc19f4 +0, 3072, 3072, 1024, 4096, 0x8706ec6d +0, 4096, 4096, 1024, 4096, 0x334ff275 +0, 5120, 5120, 1024, 4096, 0xcd0ff7ad +0, 6144, 6144, 1024, 4096, 0x29a1e9c9 +0, 7168, 7168, 1024, 4096, 0x1d41e77f +0, 8192, 8192, 1024, 4096, 0x99e7fe07 +0, 9216, 9216, 1024, 4096, 0x4bbf09ce +0, 10240, 10240, 1024, 4096, 0x94600236 +0, 11264, 11264, 1024, 4096, 0xc8af0c9e +0, 12288, 12288, 1024, 4096, 0x70eef88f +0, 13312, 13312, 1024, 4096, 0xb222ec47 +0, 14336, 14336, 1024, 4096, 0x1071ee27 +0, 15360, 15360, 1024, 4096, 0x7c390bd2 +0, 16384, 16384, 1024, 4096, 0x68bdf655 +0, 17408, 17408, 1024, 4096, 0x810cfacb +0, 18432, 18432, 1024, 4096, 0x9639e41f +0, 19456, 19456, 1024, 4096, 0xa30be70f -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for vibrato filter
Hi there, Here is a patch for vibrato filter. Regards, Petru Rares.From 9969766d490e5106964c9f3e263df2679b0bac56 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 2 Aug 2016 10:03:45 +0200 Subject: [PATCH] fate: add test for vibrato filter --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-vibrato | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-vibrato diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index ac4c3f4..9e30f60 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -122,6 +122,11 @@ FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, STEREOTOOLS, WAV, PCM_S16LE, PCM fate-filter-stereotools: SRC = $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-filter-stereotools: CMD = framecrc -i $(SRC) -aframes 20 -af stereotools=mlev=0.015625 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, VIBRATO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-vibrato +fate-filter-vibrato: tests/data/asynth-44100-2.wav +fate-filter-vibrato: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-vibrato: CMD = framecrc -i $(SRC) -aframes 20 -af vibrato + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-vibrato b/tests/ref/fate/filter-vibrato new file mode 100644 index 000..b88848c --- /dev/null +++ b/tests/ref/fate/filter-vibrato @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x4fdd3c22 +0, 1024, 1024, 1024, 4096, 0xf5480016 +0, 2048, 2048, 1024, 4096, 0x5369e961 +0, 3072, 3072, 1024, 4096, 0xf6c6dd4d +0, 4096, 4096, 1024, 4096, 0xdf1cf565 +0, 5120, 5120, 1024, 4096, 0x07160438 +0, 6144, 6144, 1024, 4096, 0xa7f0fdc3 +0, 7168, 7168, 1024, 4096, 0xd4cb00ee +0, 8192, 8192, 1024, 4096, 0x8db30b00 +0, 9216, 9216, 1024, 4096, 0x2a17f385 +0, 10240, 10240, 1024, 4096, 0xc3b1d4c9 +0, 11264, 11264, 1024, 4096, 0x493ed68b +0, 12288, 12288, 1024, 4096, 0xd45af35f +0, 13312, 13312, 1024, 4096, 0x3739f52f +0, 14336, 14336, 1024, 4096, 0x3e6a09f0 +0, 15360, 15360, 1024, 4096, 0x104d3776 +0, 16384, 16384, 1024, 4096, 0x879af3e3 +0, 17408, 17408, 1024, 4096, 0xf57ce73b +0, 18432, 18432, 1024, 4096, 0xa4a7ed07 +0, 19456, 19456, 1024, 4096, 0xc585d339 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for compand filter
Hi there, Here is a test for the compand filter. Regards, Petru. From dbb44b497ca313d02c524eae5ea2195a4a1751a7 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Fri, 12 Aug 2016 19:00:09 +0200 Subject: [PATCH] fate: add test for compand filter --- tests/fate/filter-audio.mak | 6 ++ tests/filtergraphs/compand| 1 + tests/ref/fate/filter-compand | 25 + 3 files changed, 32 insertions(+) create mode 100644 tests/filtergraphs/compand create mode 100644 tests/ref/fate/filter-compand diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index ac4c3f4..beafe0a 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -122,6 +122,12 @@ FATE_AFILTER_SAMPLES-$(call FILTERDEMDECENCMUX, STEREOTOOLS, WAV, PCM_S16LE, PCM fate-filter-stereotools: SRC = $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-filter-stereotools: CMD = framecrc -i $(SRC) -aframes 20 -af stereotools=mlev=0.015625 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, COMPAND, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-compand +fate-filter-compand: tests/data/asynth-44100-2.wav +fate-filter-compand: tests/data/filtergraphs/compand +fate-filter-compand: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-compand: CMD = framecrc -i $(SRC) -aframes 20 -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/compand + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/filtergraphs/compand b/tests/filtergraphs/compand new file mode 100644 index 000..31e7504 --- /dev/null +++ b/tests/filtergraphs/compand @@ -0,0 +1 @@ +compand='points=-80/-80|-9/-9|0/-5.3|20/2.9' \ No newline at end of file diff --git a/tests/ref/fate/filter-compand b/tests/ref/fate/filter-compand new file mode 100644 index 000..14fe0b2 --- /dev/null +++ b/tests/ref/fate/filter-compand @@ -0,0 +1,25 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0xfc10e61b +0, 1024, 1024, 1024, 4096, 0x8801ef13 +0, 2048, 2048, 1024, 4096, 0xba55fc17 +0, 3072, 3072, 1024, 4096, 0x70f203a0 +0, 4096, 4096, 1024, 4096, 0x9f2ff593 +0, 5120, 5120, 1024, 4096, 0x52f0fb77 +0, 6144, 6144, 1024, 4096, 0x435502ec +0, 7168, 7168, 1024, 4096, 0xaacfe4bb +0, 8192, 8192, 1024, 4096, 0x38010f44 +0, 9216, 9216, 1024, 4096, 0x8a79e351 +0, 10240, 10240, 1024, 4096, 0x3d66ec91 +0, 11264, 11264, 1024, 4096, 0x03031b7e +0, 12288, 12288, 1024, 4096, 0xd9c310ec +0, 13312, 13312, 1024, 4096, 0x076af28b +0, 14336, 14336, 1024, 4096, 0xb80fdfe3 +0, 15360, 15360, 1024, 4096, 0xff0fe68d +0, 16384, 16384, 1024, 4096, 0x679efb4d +0, 17408, 17408, 1024, 4096, 0xf84fe6e3 +0, 18432, 18432, 1024, 4096, 0x01ebf175 +0, 19456, 19456, 1024, 4096, 0xe7cdea1b -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c
- Check if av_display_rotation_get() gets the correct degrees - Check if av_display_rotation_set() sets the correct matrix - Check if av_display_matrix_flip() changes correct the matrix --- libavutil/Makefile | 1 + libavutil/display.c | 47 +++ libavutil/display.h | 1 + tests/fate/libavutil.mak | 4 4 files changed, 53 insertions(+) diff --git a/libavutil/Makefile b/libavutil/Makefile index 58df75a..43fcf75 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -198,6 +198,7 @@ TESTPROGS = adler32 \ parseutils \ pixdesc \ pixelutils \ +display \ random_seed \ rational\ ripemd \ diff --git a/libavutil/display.c b/libavutil/display.c index a0076e0..001ae21 100644 --- a/libavutil/display.c +++ b/libavutil/display.c @@ -71,3 +71,50 @@ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip) for (i = 0; i < 9; i++) matrix[i] *= flip[i % 3]; } + +#ifdef TEST + +// Convert 2.30 fixed-point to double +#define CONV_FP30(x) ((double) (x)) / (1 << 30) + +static void print_matrix(int32_t matrix[9]) +{ +int i, j; + +for (i = 0; i < 3; ++i) +{ +for (j = 0; j < 3 - 1; ++j) +printf("%f ", CONV_FP(matrix[i*3 + j])); + +printf("%f\n", CONV_FP30(matrix[i*3 + j])); +} +} + +int main(void) +{ +int32_t matrix[9]; + +// Set the matrix to 90 degrees +av_display_rotation_set(matrix, 90); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// Set the matrix to -45 degrees +av_display_rotation_set(matrix, -45); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// flip horizontal +av_display_matrix_flip(matrix, 1, 0); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// flip vertical +av_display_matrix_flip(matrix, 0, 1); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +return 0; + +} +#endif diff --git a/libavutil/display.h b/libavutil/display.h index c0cfee3..39c15ee 100644 --- a/libavutil/display.h +++ b/libavutil/display.h @@ -22,6 +22,7 @@ #define AVUTIL_DISPLAY_H #include +#include "common.h" /** * The display transformation matrix specifies an affine transformation that diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 5d8e0e2..7f4fb7a 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -99,6 +99,10 @@ FATE_LIBAVUTIL-$(CONFIG_PIXELUTILS) += fate-pixelutils fate-pixelutils: libavutil/pixelutils-test$(EXESUF) fate-pixelutils: CMD = run libavutil/pixelutils-test +FATE_LIBAVUTIL += fate-display +fate-display: libavutil/display-test$(EXESUF) +fate-display: CMD = run libavutil/display-test + FATE_LIBAVUTIL += fate-random_seed fate-random_seed: libavutil/random_seed-test$(EXESUF) fate-random_seed: CMD = run libavutil/random_seed-test -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c
Hi, In this patch I made the following changes: - Added the missing file /tests/ref/fate/display - Now the program prints integers to avoid different results on different platforms. Thanks for your patience and especially to Michael, Petru Rares. From: Michael Niedermayer Sent: Sunday, March 20, 2016 11:32 PM To: FFmpeg development discussions and patches Cc: Petru Rares Sincraian Subject: Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c On Sun, Mar 20, 2016 at 09:29:04AM +, Petru Rares Sincraian wrote: > > - Check if av_display_rotation_get() gets the correct degrees > - Check if av_display_rotation_set() sets the correct matrix > - Check if av_display_matrix_flip() changes correct the matrix > --- > libavutil/Makefile | 1 + > libavutil/display.c | 47 +++ > libavutil/display.h | 1 + > tests/fate/libavutil.mak | 4 > 4 files changed, 53 insertions(+) Missing reference file make fate-display ... TESTdisplay reference file './tests/ref/fate/display' not found ./tests/fate-run.sh: 307: ./tests/fate-run.sh: cannot open tests/data/fate/display.diff: No such file Test display failed. Look at tests/data/fate/display.err for details. make: *** [fate-display] Error 1 also, if you arent subscribed to ffmpeg-devel, its highly recommanded to subscribe as developers generally forget to CC people who are not subscribed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha UpanishadFrom f2fec6cd08bc91058d5f8d012dfa900a722036ce Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 22 Mar 2016 12:55:24 +0100 Subject: [PATCH] Added a selftest to libavutil/display.c - Check if av_display_rotation_get() gets the correct degrees - Check if av_display_rotation_set() sets the correct matrix - Check if av_display_matrix_flip() changes correct the matrix --- libavutil/Makefile | 1 + libavutil/display.c | 47 +++ libavutil/display.h | 1 + tests/fate/libavutil.mak | 4 tests/ref/fate/display | 16 5 files changed, 69 insertions(+) create mode 100644 tests/ref/fate/display diff --git a/libavutil/Makefile b/libavutil/Makefile index 58df75a..43fcf75 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -198,6 +198,7 @@ TESTPROGS = adler32 \ parseutils \ pixdesc \ pixelutils \ +display \ random_seed \ rational\ ripemd \ diff --git a/libavutil/display.c b/libavutil/display.c index a0076e0..51ee992 100644 --- a/libavutil/display.c +++ b/libavutil/display.c @@ -71,3 +71,50 @@ void av_display_matrix_flip(int32_t matrix[9], int hflip, int vflip) for (i = 0; i < 9; i++) matrix[i] *= flip[i % 3]; } + +#ifdef TEST + +// Convert 2.30 fixed-point to double +#define CONV_FP30(x) ((double) (x)) / (1 << 30) + +static void print_matrix(int32_t matrix[9]) +{ +int i, j; + +for (i = 0; i < 3; ++i) +{ +for (j = 0; j < 3 - 1; ++j) +printf("%d ", matrix[i*3 + j]); + +printf("%d\n", matrix[i*3 + j]); +} +} + +int main(void) +{ +int32_t matrix[9]; + +// Set the matrix to 90 degrees +av_display_rotation_set(matrix, 90); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// Set the matrix to -45 degrees +av_display_rotation_set(matrix, -45); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// flip horizontal +av_display_matrix_flip(matrix, 1, 0); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +// flip vertical +av_display_matrix_flip(matrix, 0, 1); +print_matrix(matrix); +printf("degrees: %f\n", av_display_rotation_get(matrix)); + +return 0; + +} +#endif diff --git a/libavutil/display.h b/libavutil/display.h index c0cfee3..39c15ee 100644 --- a/libavutil/display.h +++ b/libavutil/display.h @@ -22,6 +22,7 @@ #define AVUTIL_DISPLAY_H #include +#include "common.h" /** * The display transformation matrix specifies an affine transf
[FFmpeg-devel] [PATCH] Add new test for libavutil/mastering_display_metadata
Hi there, I added a set of tests for libavutil/mastering_display_metadata module. I attached the patch in this message. Thanks, Petru Rares. From 1e502305f098c9aef852e19e91ddee831cc5ebaf Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 22 Mar 2016 11:39:08 +0100 Subject: [PATCH] Add selftest to libavutil/mastering_display_metadata This commit adds tests for functions of libavutil/mastering_display_metadata.c --- libavutil/Makefile| 1 + libavutil/mastering_display_metadata.c| 68 +++ libavutil/mastering_display_metadata.h| 1 + tests/fate/libavutil.mak | 4 ++ tests/ref/fate/mastering_display_metadata | 0 5 files changed, 74 insertions(+) create mode 100644 tests/ref/fate/mastering_display_metadata diff --git a/libavutil/Makefile b/libavutil/Makefile index 58df75a..3d89335 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -198,6 +198,7 @@ TESTPROGS = adler32 \ parseutils \ pixdesc \ pixelutils \ +mastering_display_metadata \ random_seed \ rational\ ripemd \ diff --git a/libavutil/mastering_display_metadata.c b/libavutil/mastering_display_metadata.c index e1683e5..8c264a2 100644 --- a/libavutil/mastering_display_metadata.c +++ b/libavutil/mastering_display_metadata.c @@ -41,3 +41,71 @@ AVMasteringDisplayMetadata *av_mastering_display_metadata_create_side_data(AVFra return (AVMasteringDisplayMetadata *)side_data->data; } + +#ifdef TEST + +static int check_alloc(void) +{ +int result = 0; +AVMasteringDisplayMetadata *original = av_mastering_display_metadata_alloc(); + +if (original == NULL) { +printf("Failed to allocate display metadata\n"); +result = 1; +} + +if (original) +av_freep(original); + +return result; +} + +static int check_create_side_data(void) +{ +int result = 0; +AVFrame *frame = av_frame_alloc(); +AVMasteringDisplayMetadata *metadata; +AVFrameSideData *side_data; + +if (frame == NULL) { +printf("Failed to allocate frame"); +result = 1; +goto end; +} + +metadata = av_mastering_display_metadata_create_side_data(frame); +if (metadata == NULL) { +printf("Failed to create display metadata frame side data"); +result = 1; +goto end; +} + +side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); +if (side_data == NULL) { +printf("Failed to get frame side data"); +result = 1; +goto end; +} + +if (metadata != (AVMasteringDisplayMetadata *) side_data->data) { +printf("Metadata and frame data are not the same attributes"); +result = 1; +goto end; +} + +end: +if (frame) +av_frame_free(&frame); + +return result; +} + + +int main(void) +{ +int result = check_alloc(); +result = result && check_create_side_data(); +return result; +} + +#endif diff --git a/libavutil/mastering_display_metadata.h b/libavutil/mastering_display_metadata.h index 936533f..aeaa8b3 100644 --- a/libavutil/mastering_display_metadata.h +++ b/libavutil/mastering_display_metadata.h @@ -23,6 +23,7 @@ #include "frame.h" #include "rational.h" +#include "common.h" /** diff --git a/tests/fate/libavutil.mak b/tests/fate/libavutil.mak index 5d8e0e2..773f923 100644 --- a/tests/fate/libavutil.mak +++ b/tests/fate/libavutil.mak @@ -107,6 +107,10 @@ FATE_LIBAVUTIL += fate-ripemd fate-ripemd: libavutil/ripemd-test$(EXESUF) fate-ripemd: CMD = run libavutil/ripemd-test +FATE_LIBAVUTIL += fate-mastering_display_metadata +fate-mastering_display_metadata: libavutil/mastering_display_metadata-test$(EXESUF) +fate-mastering_display_metadata: CMD = run libavutil/mastering_display_metadata-test + FATE_LIBAVUTIL += fate-sha fate-sha: libavutil/sha-test$(EXESUF) fate-sha: CMD = run libavutil/sha-test diff --git a/tests/ref/fate/mastering_display_metadata b/tests/ref/fate/mastering_display_metadata new file mode 100644 index 000..e69de29 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c
All solved =) Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, March 22, 2016 3:21 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c On Tue, Mar 22, 2016 at 12:05:53PM +, Petru Rares Sincraian wrote: > Hi, > In this patch I made the following changes: > > - Added the missing file /tests/ref/fate/display > - Now the program prints integers to avoid different results on different > platforms. > > > Thanks for your patience and especially to Michael, > Petru Rares. > > > From: Michael Niedermayer > Sent: Sunday, March 20, 2016 11:32 PM > To: FFmpeg development discussions and patches > Cc: Petru Rares Sincraian > Subject: Re: [FFmpeg-devel] [PATCH] Added a selftest to libavutil/display.c > > On Sun, Mar 20, 2016 at 09:29:04AM +, Petru Rares Sincraian wrote: > > > > - Check if av_display_rotation_get() gets the correct degrees > > - Check if av_display_rotation_set() sets the correct matrix > > - Check if av_display_matrix_flip() changes correct the matrix > > --- > > libavutil/Makefile | 1 + > > libavutil/display.c | 47 > > +++ > > libavutil/display.h | 1 + > > tests/fate/libavutil.mak | 4 > > 4 files changed, 53 insertions(+) > > Missing reference file > make fate-display > ... > TESTdisplay > reference file './tests/ref/fate/display' not found > ./tests/fate-run.sh: 307: ./tests/fate-run.sh: cannot open > tests/data/fate/display.diff: No such file > Test display failed. Look at tests/data/fate/display.err for details. > make: *** [fate-display] Error 1 > > also, if you arent subscribed to ffmpeg-devel, its highly recommanded > to subscribe as developers generally forget to CC people who are not > subscribed > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > Into a blind darkness they enter who follow after the Ignorance, > they as if into a greater darkness enter who devote themselves > to the Knowledge alone. -- Isha Upanishad > libavutil/Makefile |1 + > libavutil/display.c | 47 > +++ > libavutil/display.h |1 + > tests/fate/libavutil.mak |4 > tests/ref/fate/display | 16 > 5 files changed, 69 insertions(+) > 7c96ae727ecda72a68bfccd84cc80ed47572548d > 0001-Added-a-selftest-to-libavutil-display.c.patch > From f2fec6cd08bc91058d5f8d012dfa900a722036ce Mon Sep 17 00:00:00 2001 > From: Petru Rares Sincraian > Date: Tue, 22 Mar 2016 12:55:24 +0100 > Subject: [PATCH] Added a selftest to libavutil/display.c > > - Check if av_display_rotation_get() gets the correct degrees > - Check if av_display_rotation_set() sets the correct matrix > - Check if av_display_matrix_flip() changes correct the matrix > --- > libavutil/Makefile | 1 + > libavutil/display.c | 47 +++ > libavutil/display.h | 1 + > tests/fate/libavutil.mak | 4 > tests/ref/fate/display | 16 > 5 files changed, 69 insertions(+) > create mode 100644 tests/ref/fate/display > > diff --git a/libavutil/Makefile b/libavutil/Makefile > index 58df75a..43fcf75 100644 > --- a/libavutil/Makefile > +++ b/libavutil/Makefile > @@ -198,6 +198,7 @@ TESTPROGS = adler32 > \ > parseutils \ > pixdesc \ > pixelutils \ > +display \ > random_seed \ > rational\ > ripemd \ the list is alphabetically ordered, please insert the new entry so that it stays ordered > diff --git a/libavutil/display.c b/libavutil/display.c > index a0076e0..51ee992 100644 > --- a/libavutil/display.c > +++ b/libavutil/display.c > @@ -71,3 +71,50 @@ void av_display_matrix_flip(int32_t matrix[9], int hflip, > int vflip) > for (i = 0; i < 9; i++) > matrix[i] *= flip[i % 3]; > } > + > +#ifdef TEST > + > +// Convert 2.30 fixed-point to double > +#define CONV_FP30(x) ((double) (x)) /
Re: [FFmpeg-devel] [PATCH] Add new test for libavutil/mastering_display_metadata
If I understand well you want me to do a test that given a multimedia file test if it loads works ok. If so how can I get a simple multimedia file? I see this tests more like a unitary tests. In my opinion, test if loading/storing to AVFrame need to be done in AVFrame. Thanks :) From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, March 22, 2016 4:17 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add new test for libavutil/mastering_display_metadata On Tue, Mar 22, 2016 at 01:30:11PM +, Petru Rares Sincraian wrote: > > Hi there, > > I added a set of tests for libavutil/mastering_display_metadata module. I > attached the patch in this message. > > > Thanks, > Petru Rares. > libavutil/Makefile|1 > libavutil/mastering_display_metadata.c| 68 > ++ > libavutil/mastering_display_metadata.h|1 > tests/fate/libavutil.mak |4 + > tests/ref/fate/mastering_display_metadata |1 > 5 files changed, 74 insertions(+), 1 deletion(-) > 3125db1eb98ac3ad3393e88613a90af79ae812b1 > 0001-Add-selftest-to-libavutil-mastering_display_metadata.patch > From 1e502305f098c9aef852e19e91ddee831cc5ebaf Mon Sep 17 00:00:00 2001 > From: Petru Rares Sincraian > Date: Tue, 22 Mar 2016 11:39:08 +0100 > Subject: [PATCH] Add selftest to libavutil/mastering_display_metadata > > This commit adds tests for functions of libavutil/mastering_display_metadata.c > --- > libavutil/Makefile| 1 + > libavutil/mastering_display_metadata.c| 68 > +++ > libavutil/mastering_display_metadata.h| 1 + > tests/fate/libavutil.mak | 4 ++ > tests/ref/fate/mastering_display_metadata | 0 > 5 files changed, 74 insertions(+) > create mode 100644 tests/ref/fate/mastering_display_metadata > > diff --git a/libavutil/Makefile b/libavutil/Makefile > index 58df75a..3d89335 100644 > --- a/libavutil/Makefile > +++ b/libavutil/Makefile > @@ -198,6 +198,7 @@ TESTPROGS = adler32 > \ > parseutils \ > pixdesc \ > pixelutils \ > +mastering_display_metadata \ > random_seed \ > rational\ > ripemd \ > diff --git a/libavutil/mastering_display_metadata.c > b/libavutil/mastering_display_metadata.c > index e1683e5..8c264a2 100644 > --- a/libavutil/mastering_display_metadata.c > +++ b/libavutil/mastering_display_metadata.c > @@ -41,3 +41,71 @@ AVMasteringDisplayMetadata > *av_mastering_display_metadata_create_side_data(AVFra > > return (AVMasteringDisplayMetadata *)side_data->data; > } > + > +#ifdef TEST > + > +static int check_alloc(void) > +{ > +int result = 0; > +AVMasteringDisplayMetadata *original = > av_mastering_display_metadata_alloc(); > + > +if (original == NULL) { > +printf("Failed to allocate display metadata\n"); > +result = 1; > +} > + > +if (original) > +av_freep(original); > + > +return result; > +} > + > +static int check_create_side_data(void) > +{ > +int result = 0; > +AVFrame *frame = av_frame_alloc(); > +AVMasteringDisplayMetadata *metadata; > +AVFrameSideData *side_data; > + > +if (frame == NULL) { > +printf("Failed to allocate frame"); > +result = 1; > +goto end; > +} > + > +metadata = av_mastering_display_metadata_create_side_data(frame); > +if (metadata == NULL) { > +printf("Failed to create display metadata frame side data"); > +result = 1; > +goto end; > +} > + > +side_data = av_frame_get_side_data(frame, > AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); > +if (side_data == NULL) { > +printf("Failed to get frame side data"); > +result = 1; > +goto end; > +} i think to test side data handling the code should extract and display it based on a sample multimedia file, like using ffprobe. thats also more generic and can work with any side data case that would also test if storing and loading sidedata to a AVFrame works This test here seems very specific, testing adding one speci
[FFmpeg-devel] [PATCH 1/2] Refactor libavutil/parseutils.c
All tests were in the main method which produces a long main. Now, each test is in his own method. I think this produces a more clear code and follows more with the main priority of FFmpeg "simplicity and small code size" --- libavutil/parseutils.c | 338 + 1 file changed, 175 insertions(+), 163 deletions(-) diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 0097bec..43bd4eb 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -749,180 +749,192 @@ static uint32_t av_get_random_seed_deterministic(void) return randomv = randomv * 1664525 + 1013904223; } -int main(void) +static void test_av_parse_video_rate(void) { -printf("Testing av_parse_video_rate()\n"); -{ -int i; -static const char *const rates[] = { -"-inf", -"inf", -"nan", -"123/0", -"-123 / 0", -"", -"/", -" 123 / 321", -"foo/foo", -"foo/1", -"1/foo", -"0/0", -"/0", -"1/", -"1", -"0", -"-123/123", -"-foo", -"123.23", -".23", -"-.23", -"-0.234", -"-0.001", -" 21332.2324 ", -" -21332.2324 ", -}; - -for (i = 0; i < FF_ARRAY_ELEMS(rates); i++) { -int ret; -AVRational q = { 0, 0 }; -ret = av_parse_video_rate(&q, rates[i]); -printf("'%s' -> %d/%d %s\n", - rates[i], q.num, q.den, ret ? "ERROR" : "OK"); -} +int i; +static const char *const rates[] = { +"-inf", +"inf", +"nan", +"123/0", +"-123 / 0", +"", +"/", +" 123 / 321", +"foo/foo", +"foo/1", +"1/foo", +"0/0", +"/0", +"1/", +"1", +"0", +"-123/123", +"-foo", +"123.23", +".23", +"-.23", +"-0.234", +"-0.001", +" 21332.2324 ", +" -21332.2324 ", +}; + +for (i = 0; i < FF_ARRAY_ELEMS(rates); i++) { +int ret; +AVRational q = { 0, 0 }; +ret = av_parse_video_rate(&q, rates[i]); +printf("'%s' -> %d/%d %s\n", + rates[i], q.num, q.den, ret ? "ERROR" : "OK"); } +} -printf("\nTesting av_parse_color()\n"); -{ -int i; -uint8_t rgba[4]; -static const char *const color_names[] = { -"bikeshed", -"RaNdOm", -"foo", -"red", -"Red ", -"RED", -"Violet", -"Yellow", -"Red", -"0x00", -"0x000", -"0xff00", -"0x3e34ff", -"0x3e34ffaa", -"0xffXXee", -"0xfoobar", -"0x", -"#ff", -"#ffXX00", -"ff", -"ffXX00", -"red@foo", -"random@10", -"0xff@1.0", -"red@", -"red@0xfff", -"red@0xf", -"red@2", -"red@0.1", -"red@-1", -"red@0.5", -"red@1.0", -"red@256", -"red@10foo", -"red@-1.0", -"red@-0.0", -}; - -av_log_set_level(AV_LOG_DEBUG); - -for (i = 0; i < FF_ARRAY_ELEMS(color_names); i++) { -if (av_parse_color(rgba, color_names[i], -1, NULL) >= 0) -printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", - color_names[i], rgba[0], rgba[1], rgba[2], rgba[3]); -else -printf("%s -> error\n", color_names[i]); -} +static void test_av_parse_color(void) +{ +int i; +uint8_t rgba[4]; +static const char *const color_names[] = { +"bikeshed", +"RaNdOm", +"foo", +"red", +"Red ", +"RED", +"Violet", +"Yellow", +"Red", +"0x00", +"0x000", +"0xff00", +"0x3e34ff", +"0x3e34ffaa", +"0xffXXee", +"0xfoobar", +"0x", +"#ff", +"#ffXX00", +"ff", +"ffXX00", +"red@foo", +"random@10", +"0xff@1.0", +"red@", +"red@0xfff", +"red@0xf", +"red@2", +"red@0.1", +"red@-1", +"red@0.5", +"red@1.0", +"red@256", +"red@10foo", +"red@-1.0", +"red@-0.0", +}; + +av_log_set_level(AV_LOG_DEBUG); + +for (i = 0; i < FF_ARRAY_ELEMS(color_names); i++) { +if (av_parse_color(rgba, color_names[i], -1, NULL) >= 0) +printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", + co
[FFmpeg-devel] [PATCH 2/2] Added more tests to libavutil/parseutils.c
- Added tests for av_find_info_tag(). - Added test for av_get_known_color_name() --- libavutil/parseutils.c| 37 tests/ref/fate/parseutils | 151 ++ 2 files changed, 188 insertions(+) diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 43bd4eb..a782ef6 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -922,6 +922,38 @@ static void test_av_parse_time(void) } } +static void test_av_get_known_color_name(void) +{ +int i; +const uint8_t *rgba; +const char *color; + +for (i = 0; i < FF_ARRAY_ELEMS(color_table); ++i) { +color = av_get_known_color_name(i, &rgba); +if (color) { +printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", +color, rgba[0], rgba[1], rgba[2], rgba[3]); +} +else +printf("Color ID: %d not found\n", i); +} +} + +static void test_av_find_info_tag(void) +{ +char args[] = "?tag1=val1&tag2=val2&tag3=val3&tag41=value 41&tag42=random1"; +const char *tags[] = {"tag1", "tag2", "tag3", "tag4", "tag41", "41", "random1"}; +char buff[16]; +int i; + +for (i = 0; i < FF_ARRAY_ELEMS(tags); ++i) { +if (av_find_info_tag(buff, sizeof(buff), tags[i], args)) +printf("%d. %s found: %s\n", i, tags[i], buff); +else +printf("%d. %s not found\n", i, tags[i]); +} +} + int main(void) { printf("Testing av_parse_video_rate()\n"); @@ -936,6 +968,11 @@ int main(void) printf("\nTesting av_parse_time()\n"); test_av_parse_time(); +printf("\nTesting av_get_known_color_name()\n"); +test_av_get_known_color_name(); + +printf("\nTesting av_find_info_tag()\n"); +test_av_find_info_tag(); return 0; } diff --git a/tests/ref/fate/parseutils b/tests/ref/fate/parseutils index 3306229..1aad5ec 100644 --- a/tests/ref/fate/parseutils +++ b/tests/ref/fate/parseutils @@ -83,3 +83,154 @@ now -> 1331972053.20 = 2012-03-17T08:14:13Z 42.1729 -> +42172900 -1729.42 -> -172942 12:34->+75400 + +Testing av_get_known_color_name() +AliceBlue -> R(240) G(248) B(255) A(0) +AntiqueWhite -> R(250) G(235) B(215) A(0) +Aqua -> R(0) G(255) B(255) A(0) +Aquamarine -> R(127) G(255) B(212) A(0) +Azure -> R(240) G(255) B(255) A(0) +Beige -> R(245) G(245) B(220) A(0) +Bisque -> R(255) G(228) B(196) A(0) +Black -> R(0) G(0) B(0) A(0) +BlanchedAlmond -> R(255) G(235) B(205) A(0) +Blue -> R(0) G(0) B(255) A(0) +BlueViolet -> R(138) G(43) B(226) A(0) +Brown -> R(165) G(42) B(42) A(0) +BurlyWood -> R(222) G(184) B(135) A(0) +CadetBlue -> R(95) G(158) B(160) A(0) +Chartreuse -> R(127) G(255) B(0) A(0) +Chocolate -> R(210) G(105) B(30) A(0) +Coral -> R(255) G(127) B(80) A(0) +CornflowerBlue -> R(100) G(149) B(237) A(0) +Cornsilk -> R(255) G(248) B(220) A(0) +Crimson -> R(220) G(20) B(60) A(0) +Cyan -> R(0) G(255) B(255) A(0) +DarkBlue -> R(0) G(0) B(139) A(0) +DarkCyan -> R(0) G(139) B(139) A(0) +DarkGoldenRod -> R(184) G(134) B(11) A(0) +DarkGray -> R(169) G(169) B(169) A(0) +DarkGreen -> R(0) G(100) B(0) A(0) +DarkKhaki -> R(189) G(183) B(107) A(0) +DarkMagenta -> R(139) G(0) B(139) A(0) +DarkOliveGreen -> R(85) G(107) B(47) A(0) +Darkorange -> R(255) G(140) B(0) A(0) +DarkOrchid -> R(153) G(50) B(204) A(0) +DarkRed -> R(139) G(0) B(0) A(0) +DarkSalmon -> R(233) G(150) B(122) A(0) +DarkSeaGreen -> R(143) G(188) B(143) A(0) +DarkSlateBlue -> R(72) G(61) B(139) A(0) +DarkSlateGray -> R(47) G(79) B(79) A(0) +DarkTurquoise -> R(0) G(206) B(209) A(0) +DarkViolet -> R(148) G(0) B(211) A(0) +DeepPink -> R(255) G(20) B(147) A(0) +DeepSkyBlue -> R(0) G(191) B(255) A(0) +DimGray -> R(105) G(105) B(105) A(0) +DodgerBlue -> R(30) G(144) B(255) A(0) +FireBrick -> R(178) G(34) B(34) A(0) +FloralWhite -> R(255) G(250) B(240) A(0) +ForestGreen -> R(34) G(139) B(34) A(0) +Fuchsia -> R(255) G(0) B(255) A(0) +Gainsboro -> R(220) G(220) B(220) A(0) +GhostWhite -> R(248) G(248) B(255) A(0) +Gold -> R(255) G(215) B(0) A(0) +GoldenRod -> R(218) G(165) B(32) A(0) +Gray -> R(128) G(128) B(128) A(0) +Green -> R(0) G(128) B(0) A(0) +GreenYellow -> R(173) G(255) B(47) A(0) +HoneyDew -> R(240) G(255) B(240) A(0) +HotPink -> R(255) G(105) B(180) A(0) +IndianRed -> R(205) G(92) B(92) A(0) +Indigo -> R(75) G(0) B(130) A(0) +Ivory -> R(255) G(255) B(240) A(0) +Khaki -> R(240) G(230) B(140) A(0) +Lavender -> R(230) G(230) B(250) A(0) +LavenderBlush -> R(255) G(240) B(245) A(0) +LawnGreen -> R(124) G(252) B(0) A(0) +LemonChiffon -> R(255) G(250) B(205) A(0) +LightBlue -> R(173) G(216) B(230) A(0) +LightCoral -> R(240) G(128) B(128) A(0) +LightCyan -> R(224) G(255) B(255) A(0) +LightGoldenRodYellow -> R(250) G(250) B(210) A(0) +LightGreen -> R(144) G(238) B(144) A(0) +LightGrey -> R(211) G(211) B(211) A(0) +LightPink -> R(255) G(182) B(193) A(0) +LightSalmon -> R(255) G(160) B(122) A(0) +
Re: [FFmpeg-devel] [PATCH 2/2] Added more tests to libavutil/parseutils.c
Solved :) Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Thursday, March 24, 2016 4:04 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH 2/2] Added more tests to libavutil/parseutils.c On Wed, Mar 23, 2016 at 03:33:02PM +, Petru Rares Sincraian wrote: > > - Added tests for av_find_info_tag(). > - Added test for av_get_known_color_name() > --- > libavutil/parseutils.c| 37 > tests/ref/fate/parseutils | 151 > ++ > 2 files changed, 188 insertions(+) > > diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c > index 43bd4eb..a782ef6 100644 > --- a/libavutil/parseutils.c > +++ b/libavutil/parseutils.c > @@ -922,6 +922,38 @@ static void test_av_parse_time(void) > } > } > > +static void test_av_get_known_color_name(void) > +{ > +int i; > +const uint8_t *rgba; > +const char *color; > + > +for (i = 0; i < FF_ARRAY_ELEMS(color_table); ++i) { > +color = av_get_known_color_name(i, &rgba); > +if (color) { > +printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", > +color, rgba[0], rgba[1], rgba[2], rgba[3]); > +} > +else that code looks oddly formated > +printf("Color ID: %d not found\n", i); > +} > +} > + > +static void test_av_find_info_tag(void) > +{ > +char args[] = "?tag1=val1&tag2=val2&tag3=val3&tag41=value > 41&tag42=random1"; > +const char *tags[] = {"tag1", "tag2", "tag3", "tag4", "tag41", "41", > "random1"}; static const [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes From 092120d2d84b777e77a195db7ef894141833302a Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 22 Mar 2016 16:54:09 +0100 Subject: [PATCH 2/2] Added more tests to libavutil/parseutils.c - Added tests for av_find_info_tag(). - Added test for av_get_known_color_name() --- libavutil/parseutils.c| 36 +++ tests/ref/fate/parseutils | 151 ++ 2 files changed, 187 insertions(+) diff --git a/libavutil/parseutils.c b/libavutil/parseutils.c index 43bd4eb..977089c 100644 --- a/libavutil/parseutils.c +++ b/libavutil/parseutils.c @@ -922,6 +922,37 @@ static void test_av_parse_time(void) } } +static void test_av_get_known_color_name(void) +{ +int i; +const uint8_t *rgba; +const char *color; + +for (i = 0; i < FF_ARRAY_ELEMS(color_table); ++i) { +color = av_get_known_color_name(i, &rgba); +if (color) +printf("%s -> R(%d) G(%d) B(%d) A(%d)\n", +color, rgba[0], rgba[1], rgba[2], rgba[3]); +else +printf("Color ID: %d not found\n", i); +} +} + +static void test_av_find_info_tag(void) +{ +char args[] = "?tag1=val1&tag2=val2&tag3=val3&tag41=value 41&tag42=random1"; +static const char *tags[] = {"tag1", "tag2", "tag3", "tag4", "tag41", "41", "random1"}; +char buff[16]; +int i; + +for (i = 0; i < FF_ARRAY_ELEMS(tags); ++i) { +if (av_find_info_tag(buff, sizeof(buff), tags[i], args)) +printf("%d. %s found: %s\n", i, tags[i], buff); +else +printf("%d. %s not found\n", i, tags[i]); +} +} + int main(void) { printf("Testing av_parse_video_rate()\n"); @@ -936,6 +967,11 @@ int main(void) printf("\nTesting av_parse_time()\n"); test_av_parse_time(); +printf("\nTesting av_get_known_color_name()\n"); +test_av_get_known_color_name(); + +printf("\nTesting av_find_info_tag()\n"); +test_av_find_info_tag(); return 0; } diff --git a/tests/ref/fate/parseutils b/tests/ref/fate/parseutils index 3306229..1aad5ec 100644 --- a/tests/ref/fate/parseutils +++ b/tests/ref/fate/parseutils @@ -83,3 +83,154 @@ now -> 1331972053.20 = 2012-03-17T08:14:13Z 42.1729 -> +42172900 -1729.42 -> -172942 12:34->+75400 + +Testing av_get_known_color_name() +AliceBlue -> R(240) G(248) B(255) A(0) +AntiqueWhite -> R(250) G(235) B(215) A(0) +Aqua -> R(0) G(255) B(255) A(0) +Aquamarine -> R(127) G(255) B(212) A(0) +Azure -> R(240) G(255) B(255) A(0) +Beige -> R(245) G(245) B(220) A(0
[FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c
- Added test for: swscale_license() - Added test for: alphaless_fmt() - Added test for: alloc_gamma_tbl() --- libswscale/Makefile | 1 + libswscale/utils.c| 158 ++ tests/Makefile| 1 + tests/fate/libswscale.mak | 6 ++ tests/ref/fate/utils | 143 + 5 files changed, 309 insertions(+) create mode 100644 tests/fate/libswscale.mak create mode 100644 tests/ref/fate/utils diff --git a/libswscale/Makefile b/libswscale/Makefile index a9f9e03..a6ae81d 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -27,3 +27,4 @@ SLIBOBJS-$(HAVE_GNU_WINDRES) += swscaleres.o TESTPROGS = colorspace \ swscale \ +utils \ diff --git a/libswscale/utils.c b/libswscale/utils.c index ba409d6..da27808 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -2410,3 +2410,161 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW, } return context; } + +#ifdef TEST + +static void test_swscale_license(void) +{ +const char *license = swscale_license(); +printf("%s\n", license); +} + +static void test_alloc_gamma_tbl(void) +{ +uint16_t *tbl = alloc_gamma_tbl(1.); +int i; + +// print only 32 elements +printf("e = 1.0\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); + +tbl = alloc_gamma_tbl(0.75); +printf("\ne = 0.75\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); + +tbl = alloc_gamma_tbl(2.8); +printf("\ne = 2.8\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); + +} + +static void test_alphaless_fmt(void) +{ +int result; + +result = alphaless_fmt(AV_PIX_FMT_ARGB) == AV_PIX_FMT_RGB24; +printf("AV_PIX_FMT_ARGB == AV_PIX_FMT_RGB24 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_RGBA) == AV_PIX_FMT_RGB24; +printf("AV_PIX_FMT_RGBA == AV_PIX_FMT_RGB24 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_ABGR) == AV_PIX_FMT_BGR24; +printf("AV_PIX_FMT_ABGR == AV_PIX_FMT_BGR24 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_BGRA) == AV_PIX_FMT_BGR24; +printf("AV_PIX_FMT_BGRA == AV_PIX_FMT_BGR24 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YA8) == AV_PIX_FMT_GRAY8; +printf("AV_PIX_FMT_YA8 == AV_PIX_FMT_GRAY8 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA420P) == AV_PIX_FMT_YUV420P; +printf("AV_PIX_FMT_YUVA420P == AV_PIX_FMT_YUV420P ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA422P) == AV_PIX_FMT_YUV422P; +printf("AV_PIX_FMT_YUVA422P == AV_PIX_FMT_YUV422P ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA444P) == AV_PIX_FMT_YUV444P; +printf("AV_PIX_FMT_YUVA444P == AV_PIX_FMT_YUV444P ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_GBRAP) == AV_PIX_FMT_GBRP; +printf("AV_PIX_FMT_GBRAP == AV_PIX_FMT_GBRP ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_GBRAP12LE) == AV_PIX_FMT_GBRP12; +printf("AV_PIX_FMT_GBRAP12LE == AV_PIX_FMT_GBRP12 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_GBRAP12BE) == AV_PIX_FMT_GBRP12; +printf("AV_PIX_FMT_GBRAP12BE == AV_PIX_FMT_GBRP12 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_RGBA64LE) == AV_PIX_FMT_RGB48; +printf("AV_PIX_FMT_RGBA64LE == AV_PIX_FMT_RGB48 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_RGBA64BE) == AV_PIX_FMT_RGB48; +printf("AV_PIX_FMT_RGBA64BE == AV_PIX_FMT_RGB48 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_BGRA64LE) == AV_PIX_FMT_BGR48; +printf("AV_PIX_FMT_BGRA64LE == AV_PIX_FMT_BGR48 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_BGRA64BE) == AV_PIX_FMT_BGR48; +printf("AV_PIX_FMT_BGRA64BE == AV_PIX_FMT_BGR48 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YA16BE) == AV_PIX_FMT_GRAY16; +printf("AV_PIX_FMT_YA16LE == AV_PIX_FMT_GRAY16 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YA16LE) == AV_PIX_FMT_GRAY16; +printf("AV_PIX_FMT_YA16LE == AV_PIX_FMT_GRAY16 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA420P9BE) == AV_PIX_FMT_YUV420P9; +printf("AV_PIX_FMT_YUVA420P9BE == AV_PIX_FMT_YUV420P9 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA422P9BE) == AV_PIX_FMT_YUV422P9; +printf("AV_PIX_FMT_YUVA422P9BE == AV_PIX_FMT_YUV422P9 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA444P9BE) == AV_PIX_FMT_YUV444P9; +printf("AV_PIX_FMT_YUVA444P9BE == AV_PIX_FMT_YUV444P9 ? %d\n", result); + +result = alphaless_fmt(AV_PIX_FMT_YUVA420P9LE) == AV_PIX_FMT_YUV420P9; +printf("AV_PIX_FMT_YUVA420P9LE == AV_PIX_FMT_YUV420P9 ? %d\n", result); + +
Re: [FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c
Hi, I solved the problems with swscale_license() and alloc_gamma_tbl() functions. I am working to solve alphaless_fmt() function in a different way. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Sunday, March 27, 2016 9:43 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c On Sun, Mar 27, 2016 at 04:39:39PM +, Petru Rares Sincraian wrote: > > - Added test for: swscale_license() > - Added test for: alphaless_fmt() > - Added test for: alloc_gamma_tbl() [...] > +static void test_alloc_gamma_tbl(void) > +{ > +uint16_t *tbl = alloc_gamma_tbl(1.); > +int i; > + > +// print only 32 elements > +printf("e = 1.0\n"); > +for (i = 0; i < 65536; i += 2048) > +printf("it: %d\t value: %d\n", i, tbl[i]); > + > +tbl = alloc_gamma_tbl(0.75); > +printf("\ne = 0.75\n"); > +for (i = 0; i < 65536; i += 2048) > +printf("it: %d\t value: %d\n", i, tbl[i]); > + > +tbl = alloc_gamma_tbl(2.8); > +printf("\ne = 2.8\n"); > +for (i = 0; i < 65536; i += 2048) > +printf("it: %d\t value: %d\n", i, tbl[i]); this leaks memory [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of SinopeFrom ebefe53b13c878d50f5a388022c894d2b2c5ee96 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 24 Mar 2016 18:46:02 +0100 Subject: [PATCH] Added more tests to libswscale/utils.c - Added test for: swscale_license() - Added test for: alloc_gamma_tbl() --- libswscale/Makefile | 1 + libswscale/utils.c| 49 ++ tests/Makefile| 1 + tests/fate/libswscale.mak | 6 +++ tests/ref/fate/utils | 105 ++ 5 files changed, 162 insertions(+) create mode 100644 tests/fate/libswscale.mak create mode 100644 tests/ref/fate/utils diff --git a/libswscale/Makefile b/libswscale/Makefile index a9f9e03..a6ae81d 100644 --- a/libswscale/Makefile +++ b/libswscale/Makefile @@ -27,3 +27,4 @@ SLIBOBJS-$(HAVE_GNU_WINDRES) += swscaleres.o TESTPROGS = colorspace \ swscale \ +utils \ diff --git a/libswscale/utils.c b/libswscale/utils.c index ba409d6..b572a11 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -2410,3 +2410,52 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW, } return context; } + +#ifdef TEST + +static void test_swscale_license(void) +{ +const char *license = swscale_license(); +if (!strcmp(FFMPEG_LICENSE, license)) +printf("License OK\n"); +else +printf("License don't match.\nExpect: %s\nGiven: %s\n", +FFMPEG_LICENSE, license); +} + +static void test_alloc_gamma_tbl(void) +{ +uint16_t *tbl; +int i; + +// print only 32 elements +tbl = alloc_gamma_tbl(1.); +printf("e = 1.0\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); +av_free(tbl); + +tbl = alloc_gamma_tbl(0.75); +printf("\ne = 0.75\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); +av_free(tbl); + +tbl = alloc_gamma_tbl(2.8); +printf("\ne = 2.8\n"); +for (i = 0; i < 65536; i += 2048) +printf("it: %d\t value: %d\n", i, tbl[i]); +av_free(tbl); + +} + +int main(void) +{ +printf("Testing swscale_license()\n"); +test_swscale_license(); + +printf("\nTesting alloc_gamma_tbl()\n"); +test_alloc_gamma_tbl(); +} + +#endif diff --git a/tests/Makefile b/tests/Makefile index 6fef0cd..4e82a69 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -140,6 +140,7 @@ include $(SRC_PATH)/tests/fate/libavformat.mak include $(SRC_PATH)/tests/fate/libavresample.mak include $(SRC_PATH)/tests/fate/libavutil.mak include $(SRC_PATH)/tests/fate/libswresample.mak +include $(SRC_PATH)/tests/fate/libswscale.mak include $(SRC_PATH)/tests/fate/lossless-audio.mak include $(SRC_PATH)/tests/fate/lossless-video.mak include $(SRC_PATH)/tests/fate/microsoft.mak diff --git a/tests/fate/libswscale.mak b/tests/fate/libswscale.mak new file mode 100644 index 000..2bd7139 --- /dev/null +++ b/tests/fate/libswscale.mak @@ -0,0 +1,6 @@ +FATE_LIBAVSWSCALE += fate-utils +fate-utils: libswscale/utils-test$(EXESUF) +fate-utils: CMD = run libswscale/utils-test + +FATE-$(CONFIG_SWSCALE) += $(FATE_LIBAVSWSCALE) +fate-libavswscale:
Re: [FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c
Hi, Now the function computes the sum of the values and displays the result. Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Wednesday, March 30, 2016 4:18 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c On Wed, Mar 30, 2016 at 10:12:29AM +, Petru Rares Sincraian wrote: > Hi, > > I solved the problems with swscale_license() and alloc_gamma_tbl() functions. > I am working to solve alphaless_fmt() function in a different way. > > > From: ffmpeg-devel on behalf of Michael > Niedermayer > Sent: Sunday, March 27, 2016 9:43 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH] Added more tests to libswscale/utils.c > > On Sun, Mar 27, 2016 at 04:39:39PM +, Petru Rares Sincraian wrote: > > > > - Added test for: swscale_license() > > - Added test for: alphaless_fmt() > > - Added test for: alloc_gamma_tbl() > [...] > > > +static void test_alloc_gamma_tbl(void) > > +{ > > +uint16_t *tbl = alloc_gamma_tbl(1.); > > +int i; > > + > > +// print only 32 elements > > +printf("e = 1.0\n"); > > +for (i = 0; i < 65536; i += 2048) > > +printf("it: %d\t value: %d\n", i, tbl[i]); > > + > > +tbl = alloc_gamma_tbl(0.75); > > +printf("\ne = 0.75\n"); > > +for (i = 0; i < 65536; i += 2048) > > +printf("it: %d\t value: %d\n", i, tbl[i]); > > + > > +tbl = alloc_gamma_tbl(2.8); > > +printf("\ne = 2.8\n"); > > +for (i = 0; i < 65536; i += 2048) > > +printf("it: %d\t value: %d\n", i, tbl[i]); > > this leaks memory > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > In a rich man's house there is no place to spit but his face. > -- Diogenes of Sinope > libswscale/Makefile |1 > libswscale/utils.c| 49 + > tests/Makefile|1 > tests/fate/libswscale.mak |6 ++ > tests/ref/fate/utils | 105 > ++ > 5 files changed, 162 insertions(+) > f3e7cf692c31bf2df982eeeb97fc6fef8e3ec736 > 0001-Added-more-tests-to-libswscale-utils.c.patch > From ebefe53b13c878d50f5a388022c894d2b2c5ee96 Mon Sep 17 00:00:00 2001 > From: Petru Rares Sincraian > Date: Thu, 24 Mar 2016 18:46:02 +0100 > Subject: [PATCH] Added more tests to libswscale/utils.c > > - Added test for: swscale_license() > - Added test for: alloc_gamma_tbl() > --- > libswscale/Makefile | 1 + > libswscale/utils.c| 49 ++ > tests/Makefile| 1 + > tests/fate/libswscale.mak | 6 +++ > tests/ref/fate/utils | 105 > ++ > 5 files changed, 162 insertions(+) > create mode 100644 tests/fate/libswscale.mak > create mode 100644 tests/ref/fate/utils > > diff --git a/libswscale/Makefile b/libswscale/Makefile > index a9f9e03..a6ae81d 100644 > --- a/libswscale/Makefile > +++ b/libswscale/Makefile > @@ -27,3 +27,4 @@ SLIBOBJS-$(HAVE_GNU_WINDRES) += swscaleres.o > > TESTPROGS = colorspace \ > swscale \ > +utils \ > diff --git a/libswscale/utils.c b/libswscale/utils.c > index ba409d6..b572a11 100644 > --- a/libswscale/utils.c > +++ b/libswscale/utils.c > @@ -2410,3 +2410,52 @@ struct SwsContext *sws_getCachedContext(struct > SwsContext *context, int srcW, > } > return context; > } > + > +#ifdef TEST > + > +static void test_swscale_license(void) > +{ > +const char *license = swscale_license(); > +if (!strcmp(FFMPEG_LICENSE, license)) > +printf("License OK\n"); > +else > +printf("License don't match.\nExpect: %s\nGiven: %s\n", > +FFMPEG_LICENSE, license); > +} > + > +static void test_alloc_gamma_tbl(void) > +{ > +uint16_t *tbl; > +int i; > + > +// print only 32 elements > +tbl = alloc_gamma_tbl(1.); > +printf("e = 1.0\n"); > +for (i = 0; i < 65536; i += 2048) > +printf("it: %d\t value: %d\n", i, tbl[i]); > +av_free(tbl); > + > +tbl = alloc_gamma_tbl(0.75); > +printf("\ne = 0.75\n"); > +for (i
[FFmpeg-devel] [PATCH] Add test for mss1 codec
Hi there, Here I made a test for mss1 codec. The sample file for the FATE test can be found at: https://drive.google.com/file/d/0ByhGgswO8BQcRHJFU0VRWV9aSU0/view?usp=sharingFrom 652d52f6d52a38ef25fa6d4446afd3f96b2d0280 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 18 Apr 2016 17:03:01 +0200 Subject: [PATCH] Add test for mss1 codec The sample file for the FATE test is assumed to be stored as $FATE_SAMPLES/mss1/screen_codec.wmv --- tests/fate/microsoft.mak |6 + tests/ref/fate/mss1-pal | 1645 ++ 2 files changed, 1651 insertions(+) create mode 100644 tests/ref/fate/mss1-pal diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index 3da25a7..e72d408 100644 --- a/tests/fate/microsoft.mak +++ b/tests/fate/microsoft.mak @@ -1,6 +1,12 @@ FATE_MICROSOFT-$(call DEMDEC, AVI, MSMPEG4V1) += fate-msmpeg4v1 fate-msmpeg4v1: CMD = framecrc -flags +bitexact -idct simple -i $(TARGET_SAMPLES)/msmpeg4v1/mpg4.avi -an +FATE_MSS1 += fate-mss1-pal +fate-mss1-pal: CMD = framecrc -i $(TARGET_SAMPLES)/mss1/screen_codec.wmv + +FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, MSS1) += $(FATE_MSS1) +fate-mss1: $(FATE_MSS1) + FATE_MSS2 += fate-mss2-pal fate-mss2-pal: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/rlepal.wmv diff --git a/tests/ref/fate/mss1-pal b/tests/ref/fate/mss1-pal new file mode 100644 index 000..eb73fc0 --- /dev/null +++ b/tests/ref/fate/mss1-pal @@ -0,0 +1,1645 @@ +#tb 0: 12/23 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 1024x768 +#sar 0: 0/1 +#tb 1: 1/8000 +#media_type 1: audio +#codec_id 1: pcm_s16le +#sample_rate 1: 8000 +#channel_layout 1: 4 +1, 0, 0, 512, 1024, 0x +1,512,512, 512, 1024, 0x +1,512,512, 512, 1024, 0x +1, 1024, 1024, 512, 1024, 0x +1, 1536, 1536, 512, 1024, 0x +1, 2048, 2048, 512, 1024, 0x +1, 2560, 2560, 512, 1024, 0x +1, 3072, 3072, 512, 1024, 0x +1, 3584, 3584, 512, 1024, 0x +1, 4096, 4096, 512, 1024, 0x +0, 1, 1,1, 787456, 0x9369daec +1, 4608, 4608, 512, 1024, 0x +1, 5120, 5120, 512, 1024, 0x +1, 5632, 5632, 512, 1024, 0x +1, 6144, 6144, 512, 1024, 0x +1, 6656, 6656, 512, 1024, 0x +1, 7168, 7168, 512, 1024, 0x +1, 7680, 7680, 512, 1024, 0x +1, 8192, 8192, 512, 1024, 0x +0, 2, 2,1, 787456, 0x1c61a5b8 +1, 8704, 8704, 512, 1024, 0x +1, 9216, 9216, 512, 1024, 0x +1, 9728, 9728, 512, 1024, 0x +1, 10240, 10240, 512, 1024, 0x +1, 10752, 10752, 512, 1024, 0x +1, 11264, 11264, 512, 1024, 0x +1, 11776, 11776, 512, 1024, 0x +1, 12288, 12288, 512, 1024, 0x +0, 3, 3,1, 787456, 0xb9c3af1f +1, 12800, 12800, 512, 1024, 0x +1, 13312, 13312, 512, 1024, 0x +1, 13824, 13824, 512, 1024, 0x +1, 14336, 14336, 512, 1024, 0x +1, 14848, 14848, 512, 1024, 0x +1, 15360, 15360, 512, 1024, 0x +1, 15872, 15872, 512, 1024, 0x +1, 16384, 16384, 512, 1024, 0x +0, 4, 4,1, 787456, 0xc078bec7 +1, 16896, 16896, 512, 1024, 0x +1, 17408, 17408, 512, 1024, 0x +1, 17920, 17920, 512, 1024, 0x +1, 18432, 18432, 512, 1024, 0x +1, 18944, 18944, 512, 1024, 0x +1, 19456, 19456, 512, 1024, 0x +1, 19968, 19968, 512, 1024, 0x +1, 20480, 20480, 512, 1024, 0x +0, 5, 5,1, 787456, 0x31aece7b +1, 23296, 23296, 512, 1024, 0x +1, 23808, 23808, 512, 1024, 0x +1, 24320, 24320, 512, 1024, 0x +1, 24832, 24832, 512, 1024, 0x +0, 6, 6,1, 787456, 0x060a869e +1, 25344, 25344, 512, 1024, 0x +1, 25856, 25856, 512, 1024, 0x +1, 26368, 26368, 512, 1024, 0x +1, 26880, 26880, 512, 1024, 0x +1, 27392, 27392
[FFmpeg-devel] [PATCH] Add test for 012v codec
Hi there, Here is a patch for 012v codec. You can download the sample file here: https://drive.google.com/open?id=0ByhGgswO8BQcSDc0S3RONHFuN0k It is supposed to be in $(TARGET_SAMPLES)/012v/sample.avi. md5: e07bb155180c0140960ea4deb6cdf6b6From 418b709c534628781f24f25055c4c0e9c36ad6d1 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 18 Apr 2016 18:52:51 +0200 Subject: [PATCH] Add test for 012v codec --- tests/fate/video.mak | 3 +++ tests/ref/fate/012v | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/012v diff --git a/tests/fate/video.mak b/tests/fate/video.mak index dd24d28..ab7d0b2 100644 --- a/tests/fate/video.mak +++ b/tests/fate/video.mak @@ -7,6 +7,9 @@ fate-4xm-2: CMD = framecrc -i $(TARGET_SAMPLES)/4xm/version2.4xm -pix_fmt rgb24 FATE_VIDEO-$(call DEMDEC, FOURXM, FOURXM) += $(FATE_4XM) fate-4xm: $(FATE_4XM) +FATE_VIDEO-$(call DEMDEC, AVI, ZERO12V) += fate-012v +fate-012v: CMD = framecrc -i $(TARGET_SAMPLES)/012v/sample.avi + FATE_VIDEO-$(call DEMDEC, AVI, AASC) += fate-aasc fate-aasc: CMD = framecrc -i $(TARGET_SAMPLES)/aasc/AASC-1.5MB.AVI -pix_fmt rgb24 diff --git a/tests/ref/fate/012v b/tests/ref/fate/012v new file mode 100644 index 000..198bba3 --- /dev/null +++ b/tests/ref/fate/012v @@ -0,0 +1,6 @@ +#tb 0: 1/10 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 316x240 +#sar 0: 0/1 +0, 0, 0,1, 303360, 0xc5439580 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Add test for mts2 (mss4) codec
Hi there, Here is a patch for the mts2 codec. You can download the sample here: https://drive.google.com/open?id=0ByhGgswO8BQcbVBwS2pEUkNTN2c The sample is supposed to be in $(TARGET_SAMPLES)/mts2/sample.xesc md5: 47f13a4a49bd8955491a9421b6db3751 Thanks, Petru Rares. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add test for mts2 (mss4) codec
Ups, sorry. Here is the patch :) From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, April 19, 2016 7:15 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] Add test for mts2 (mss4) codec On Tue, Apr 19, 2016 at 04:26:12PM +, Petru Rares Sincraian wrote: > Hi there, > > Here is a patch for the mts2 codec. You can download the sample here: > https://drive.google.com/open?id=0ByhGgswO8BQcbVBwS2pEUkNTN2c > The sample is supposed to be in $(TARGET_SAMPLES)/mts2/sample.xesc > > md5: 47f13a4a49bd8955491a9421b6db3751 you forgot to attach the patch [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange From 0d05f93b287b514577eaa68e4d7f52b06740c3d9 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 19 Apr 2016 17:39:47 +0200 Subject: [PATCH] Add test for mts2 (mss4) codec --- tests/fate/microsoft.mak | 6 ++ tests/ref/fate/mts2-xesc | 22 ++ 2 files changed, 28 insertions(+) create mode 100644 tests/ref/fate/mts2-xesc diff --git a/tests/fate/microsoft.mak b/tests/fate/microsoft.mak index e72d408..861eb15 100644 --- a/tests/fate/microsoft.mak +++ b/tests/fate/microsoft.mak @@ -25,6 +25,12 @@ fate-mss2-wmv: CMD = framecrc -i $(TARGET_SAMPLES)/mss2/msscreencodec.wmv -an -f FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, MSS2) += $(FATE_MSS2) fate-mss2: $(FATE_MSS2) +FATE_MTS2 += fate-mts2-xesc +fate-mts2-xesc: CMD = framecrc -i $(TARGET_SAMPLES)/mts2/sample.xesc -pix_fmt yuv444p + +FATE_SAMPLES_AVCONV-$(call DEMDEC, ASF, MTS2) += $(FATE_MTS2) +fate-mts2: $(FATE_MTS2) + FATE_MSVIDEO1 += fate-msvideo1-8bit fate-msvideo1-8bit: CMD = framecrc -i $(TARGET_SAMPLES)/cram/skating.avi -t 1 -pix_fmt rgb24 diff --git a/tests/ref/fate/mts2-xesc b/tests/ref/fate/mts2-xesc new file mode 100644 index 000..6d40741 --- /dev/null +++ b/tests/ref/fate/mts2-xesc @@ -0,0 +1,22 @@ +#tb 0: 12/185 +#media_type 0: video +#codec_id 0: rawvideo +#dimensions 0: 1368x768 +#sar 0: 0/1 +0, 0, 0,1, 3151872, 0x90aa1943 +0, 3, 3,1, 3151872, 0xbbe670de +0, 4, 4,1, 3151872, 0x818d8c1c +0, 5, 5,1, 3151872, 0xc2cf510d +0, 6, 6,1, 3151872, 0xff904cda +0, 7, 7,1, 3151872, 0xc843fce8 +0, 8, 8,1, 3151872, 0xbfc24e6e +0, 9, 9,1, 3151872, 0x5eea45bc +0, 10, 10,1, 3151872, 0x86634b52 +0, 11, 11,1, 3151872, 0x86634b52 +0, 12, 12,1, 3151872, 0x86634b52 +0, 13, 13,1, 3151872, 0x86634b52 +0, 14, 14,1, 3151872, 0x86634b52 +0, 15, 15,1, 3151872, 0x86634b52 +0, 16, 16,1, 3151872, 0x86634b52 +0, 17, 17,1, 3151872, 0xaf542632 +0, 18, 18,1, 3151872, 0x8f16cdaf -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Add test for vorbis encode
Hi there, Here is a patch for the vorbis encoder. I only tried this test on a x64 architecture, maybe I need to change the FUZZ parameter. Can anybody test in another architecture? Many thanks, Petru Rares. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add test for vorbis encode
Here is the patch, Sorry. On 05/05/16 19:01, Petru Rares Sincraian wrote: > Hi there, > > Here is a patch for the vorbis encoder. I only tried this test on a > x64 architecture, maybe I need to change the FUZZ parameter. > > Can anybody test in another architecture? > > > Many thanks, > Petru Rares. From b7d07c0a97919c11072d1210579432bebb2967c2 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 5 May 2016 18:56:38 +0200 Subject: [PATCH] Add test for vorbis encoder --- tests/fate/vorbis.mak | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/fate/vorbis.mak b/tests/fate/vorbis.mak index 1344180..1d73fd3 100644 --- a/tests/fate/vorbis.mak +++ b/tests/fate/vorbis.mak @@ -1,3 +1,12 @@ +FATE_VORBIS += fate-vorbis-encode +fate-vorbis-encode: CMD = enc_dec_pcm ogg wav s16le $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav -c:a vorbis -strict experimental +fate-vorbis-encode: CMP = stddev +fate-vorbis-encode: REF = $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav +fate-vorbis-encode: CMP_SHIFT = 0 +fate-vorbis-encode: CMP_TARGET = 4810 +fate-vorbis-encode: SIZE_TOLERANCE = 3560 +fate-vorbis-encode: FUZZ = 0 + FATE_VORBIS += fate-vorbis-1 fate-vorbis-1: CMD = pcm -i $(TARGET_SAMPLES)/vorbis/1.0.1-test_small.ogg fate-vorbis-1: REF = $(SAMPLES)/vorbis/1.0.1-test_small.pcm -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add aecho test
Hi there, Here I add a new test for aecho filter.From 25e8de6f4caa08a1903a6756ca718ef06722d116 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Sat, 14 May 2016 11:04:25 +0200 Subject: [PATCH] fate: add aecho test --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-aecho | 286 2 files changed, 291 insertions(+) create mode 100644 tests/ref/fate/filter-aecho diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 7f7e520..2d125bb 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -3,6 +3,11 @@ fate-filter-adelay: tests/data/asynth-44100-2.wav fate-filter-adelay: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-adelay: CMD = framecrc -i $(SRC) -af adelay=42 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AECHO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-aecho +fate-filter-aecho: tests/data/asynth-44100-2.wav +fate-filter-aecho: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-aecho: CMD = framecrc -i $(SRC) -af aecho=0.8:0.88:1000:0.4 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-aecho b/tests/ref/fate/filter-aecho new file mode 100644 index 000..e7fd93a --- /dev/null +++ b/tests/ref/fate/filter-aecho @@ -0,0 +1,286 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x078eef35 +0, 1024, 1024, 1024, 4096, 0xa24bf529 +0, 2048, 2048, 1024, 4096, 0xd22c0198 +0, 3072, 3072, 1024, 4096, 0x09f9f4df +0, 4096, 4096, 1024, 4096, 0x280aecab +0, 5120, 5120, 1024, 4096, 0x1ea9e9a7 +0, 6144, 6144, 1024, 4096, 0xaf750540 +0, 7168, 7168, 1024, 4096, 0x0441013a +0, 8192, 8192, 1024, 4096, 0x7c4ce7e9 +0, 9216, 9216, 1024, 4096, 0x5eddeb19 +0, 10240, 10240, 1024, 4096, 0x351c08c4 +0, 11264, 11264, 1024, 4096, 0xc3a405a6 +0, 12288, 12288, 1024, 4096, 0xfc520092 +0, 13312, 13312, 1024, 4096, 0x4fa8f123 +0, 14336, 14336, 1024, 4096, 0x221bf9cf +0, 15360, 15360, 1024, 4096, 0x9804049c +0, 16384, 16384, 1024, 4096, 0x9c91042a +0, 17408, 17408, 1024, 4096, 0x78f8fc09 +0, 18432, 18432, 1024, 4096, 0xf87cf179 +0, 19456, 19456, 1024, 4096, 0xc7d2fe37 +0, 20480, 20480, 1024, 4096, 0xef880684 +0, 21504, 21504, 1024, 4096, 0x813f09be +0, 22528, 22528, 1024, 4096, 0x3575ea13 +0, 23552, 23552, 1024, 4096, 0x7217ea0d +0, 24576, 24576, 1024, 4096, 0x9838ff51 +0, 25600, 25600, 1024, 4096, 0xe087043c +0, 26624, 26624, 1024, 4096, 0x4b10ea9f +0, 27648, 27648, 1024, 4096, 0x050ced89 +0, 28672, 28672, 1024, 4096, 0x7228f295 +0, 29696, 29696, 1024, 4096, 0xc60101ee +0, 30720, 30720, 1024, 4096, 0xa4ebf763 +0, 31744, 31744, 1024, 4096, 0x83c1 +0, 32768, 32768, 1024, 4096, 0x078eef35 +0, 33792, 33792, 1024, 4096, 0xa24bf529 +0, 34816, 34816, 1024, 4096, 0xd22c0198 +0, 35840, 35840, 1024, 4096, 0x09f9f4df +0, 36864, 36864, 1024, 4096, 0x280aecab +0, 37888, 37888, 1024, 4096, 0x1ea9e9a7 +0, 38912, 38912, 1024, 4096, 0xaf750540 +0, 39936, 39936, 1024, 4096, 0x0441013a +0, 40960, 40960, 1024, 4096, 0x7c4ce7e9 +0, 41984, 41984, 1024, 4096, 0x5eddeb19 +0, 43008, 43008, 1024, 4096, 0x351c08c4 +0, 44032, 44032, 1024, 4096, 0x30c6db8f +0, 45056, 45056, 1024, 4096, 0x1c4b3258 +0, 46080, 46080, 1024, 4096, 0xe32d157e +0, 47104, 47104, 1024, 4096, 0xbbe9e635 +0, 48128, 48128, 1024, 4096, 0x7e8214dc +0, 49152, 49152, 1024, 4096, 0xd671e4c1 +0, 50176, 50176, 1024, 4096, 0xd268f457 +0, 51200, 51200, 1024, 4096, 0x6051018e +0, 52224, 52224, 1024, 4096, 0x2f31fe93 +0, 53248, 53248, 1024, 4096, 0xa72e0dca +0, 54272, 54272, 1024, 4096, 0x609ffcf1 +0, 55296, 55296, 1024, 4096, 0xe020f453 +0, 56320, 56320, 1024, 4096, 0xb9c9f631 +0, 57344, 57344, 1024, 4096, 0xa8a4c6fd +0, 58368, 58368, 1024, 4096, 0x1f40ffdd +0, 59392, 59392, 1
Re: [FFmpeg-devel] [PATCH] fate: add aecho test
Hi Michael, I have found some parameters that produce the same results in x64 and x32 architectures. Here is the patch :) Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Saturday, May 14, 2016 3:50:03 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add aecho test On Sat, May 14, 2016 at 09:07:17AM +, Petru Rares Sincraian wrote: > > > Hi there, > > Here I add a new test for aecho filter. > fate/filter-audio.mak |5 > ref/fate/filter-aecho | 286 > ++ > 2 files changed, 291 insertions(+) > efd0670e8f0c0c23e9d1392052b03ac4b7e047f0 0001-fate-add-aecho-test.patch > From 25e8de6f4caa08a1903a6756ca718ef06722d116 Mon Sep 17 00:00:00 2001 > From: Petru Rares Sincraian > Date: Sat, 14 May 2016 11:04:25 +0200 > Subject: [PATCH] fate: add aecho test this fails on x86-32 --- ffmpeg/tests/ref/fate/filter-aecho 2016-05-14 13:33:43.477820778 +0200 +++ tests/data/fate/filter-aecho2016-05-14 15:16:00.441950067 +0200 @@ -46,241 +46,241 @@ 0, 40960, 40960, 1024, 4096, 0x7c4ce7e9 0, 41984, 41984, 1024, 4096, 0x5eddeb19 0, 43008, 43008, 1024, 4096, 0x351c08c4 -0, 44032, 44032, 1024, 4096, 0x30c6db8f -0, 45056, 45056, 1024, 4096, 0x1c4b3258 -0, 46080, 46080, 1024, 4096, 0xe32d157e +0, 44032, 44032, 1024, 4096, 0x4dd4db91 +0, 45056, 45056, 1024, 4096, 0x07ad3256 +0, 46080, 46080, 1024, 4096, 0xe6131580 0, 47104, 47104, 1024, 4096, 0xbbe9e635 -0, 48128, 48128, 1024, 4096, 0x7e8214dc -0, 49152, 49152, 1024, 4096, 0xd671e4c1 -0, 50176, 50176, 1024, 4096, 0xd268f457 -0, 51200, 51200, 1024, 4096, 0x6051018e +0, 48128, 48128, 1024, 4096, 0x8f4014de +0, 49152, 49152, 1024, 4096, 0xbc53e4bf +0, 50176, 50176, 1024, 4096, 0xf2b6f459 +0, 51200, 51200, 1024, 4096, 0x83350192 you can test that with somethng like ./configure --arch=x86_32 --target-os=linux --extra-cflags=-m32 --extra-ldflags=-m32 --enable-cross-compile aecho uses floats so rounding and precission differences can cause differences between platforms you could improve aecho so it does not depend on floats for filtering of s16 samples but maybe you can find parameters that give the same result on all platforms without that or a small reference file would need to be added and tiny_psnr used for comparing [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 3 "Rare item" - "Common item with rare defect or maybe just a lie" "Professional" - "'Toy' made in china, not functional except as doorstop" "Experts will know" - "The seller hopes you are not an expert" From 5a3be60397e2f7bc0d84232736c8d44508bfbeff Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Sun, 22 May 2016 09:45:49 +0200 Subject: [PATCH] fate: add aecho test --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-aecho | 265 2 files changed, 270 insertions(+) create mode 100644 tests/ref/fate/filter-aecho diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 7f7e520..5e5f1f9 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -3,6 +3,11 @@ fate-filter-adelay: tests/data/asynth-44100-2.wav fate-filter-adelay: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-adelay: CMD = framecrc -i $(SRC) -af adelay=42 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AECHO, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-aecho +fate-filter-aecho: tests/data/asynth-44100-2.wav +fate-filter-aecho: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-aecho: CMD = framecrc -i $(SRC) -af aecho=0.5:0.5:32:0.5 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-aecho b/tests/ref/fate/filter-aecho new file mode 100644 index 000..f564fcc --- /dev/null +++ b/tests/ref/fate/filter-aecho @@ -0,0 +1,265 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x3019edd5 +0, 1024, 1024, 1024, 4096, 0x2df2fe2f +0, 2048, 2048, 1024, 4096, 0xde37ff37 +0, 3072, 3072, 1024, 4096, 0xe933f6a5 +0, 4096, 4096, 1024, 4096, 0xd5acf1f3 +0, 5120, 5120, 1024, 4096, 0x82a6f903 +0, 6144, 6144,
[FFmpeg-devel] [PATCH] fate: add aemphasis test
Hi there, Here is a patch with a new test for libavfilter/aemphasis. I tested the test in x64 and x32. Any idea how to test this on MIPS and ARM architectures? Is there any guide? Thanks. Regards, Petru Rares.From 7d64b876a3e90e57cb319c0a4bd94ec650ba1dd0 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Sat, 28 May 2016 17:20:25 +0200 Subject: [PATCH] fate: add aemphasis test --- tests/fate/filter-audio.mak | 12 + tests/ref/fate/filter-aemphasis | 528 +++ tests/ref/fate/filter-aemphasis-50fm | 264 ++ tests/ref/fate/filter-aemphasis-75kf | 264 ++ 4 files changed, 1068 insertions(+) create mode 100644 tests/ref/fate/filter-aemphasis create mode 100644 tests/ref/fate/filter-aemphasis-50fm create mode 100644 tests/ref/fate/filter-aemphasis-75kf diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 5e5f1f9..a87452f 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -8,6 +8,18 @@ fate-filter-aecho: tests/data/asynth-44100-2.wav fate-filter-aecho: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-aecho: CMD = framecrc -i $(SRC) -af aecho=0.5:0.5:32:0.5 +FATE_FILTER_AEMPHASIS += fate-filter-aemphasis-50fm +fate-filter-aemphasis-50fm: tests/data/asynth-44100-2.wav +fate-filter-aemphasis-50fm: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-aemphasis-50fm: CMD = framecrc -i $(SRC) -af aemphasis=1:5:reproduction:50fm + +FATE_FILTER_AEMPHASIS += fate-filter-aemphasis-75kf +fate-filter-aemphasis-75kf: tests/data/asynth-44100-2.wav +fate-filter-aemphasis-75kf: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-aemphasis-75kf: CMD = framecrc -i $(SRC) -af aemphasis=2:8:reproduction:75kf + +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AEMPHASIS, WAV, PCM_S16LE, PCM_S16LE, WAV) += $(FATE_FILTER_AEMPHASIS) + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-aemphasis b/tests/ref/fate/filter-aemphasis new file mode 100644 index 000..9509e43 --- /dev/null +++ b/tests/ref/fate/filter-aemphasis @@ -0,0 +1,528 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0xb9c5fefd +0, 1024, 1024, 1024, 4096, 0xb2ae0a90 +0, 2048, 2048, 1024, 4096, 0x97e6e9f3 +0, 3072, 3072, 1024, 4096, 0x5837f26f +0, 4096, 4096, 1024, 4096, 0x71500376 +0, 5120, 5120, 1024, 4096, 0xb4650378 +0, 6144, 6144, 1024, 4096, 0xd261f5b1 +0, 7168, 7168, 1024, 4096, 0x3038f3fd +0, 8192, 8192, 1024, 4096, 0x8e1908c6 +0, 9216, 9216, 1024, 4096, 0x1d6bfd33 +0, 10240, 10240, 1024, 4096, 0x7036f23f +0, 11264, 11264, 1024, 4096, 0xaf73e9a1 +0, 12288, 12288, 1024, 4096, 0x0ba70404 +0, 13312, 13312, 1024, 4096, 0xd34bf249 +0, 14336, 14336, 1024, 4096, 0x0c88fc2b +0, 15360, 15360, 1024, 4096, 0x55ebf9cf +0, 16384, 16384, 1024, 4096, 0xc16df0bd +0, 17408, 17408, 1024, 4096, 0xa635eac5 +0, 18432, 18432, 1024, 4096, 0xb41d059e +0, 19456, 19456, 1024, 4096, 0xa905f4d3 +0, 20480, 20480, 1024, 4096, 0x2736f1fb +0, 21504, 21504, 1024, 4096, 0x1a89f007 +0, 22528, 22528, 1024, 4096, 0x81d1fdab +0, 23552, 23552, 1024, 4096, 0x6156f97d +0, 24576, 24576, 1024, 4096, 0x1971ec89 +0, 25600, 25600, 1024, 4096, 0xdca1ec4f +0, 26624, 26624, 1024, 4096, 0x116ffcf5 +0, 27648, 27648, 1024, 4096, 0xc391fdc9 +0, 28672, 28672, 1024, 4096, 0x85e0ef45 +0, 29696, 29696, 1024, 4096, 0x81d3012c +0, 30720, 30720, 1024, 4096, 0x403ef11b +0, 31744, 31744, 1024, 4096, 0x3ca6f16d +0, 32768, 32768, 1024, 4096, 0x6775feb1 +0, 33792, 33792, 1024, 4096, 0xb2ae0a90 +0, 34816, 34816, 1024, 4096, 0x97e6e9f3 +0, 35840, 35840, 1024, 4096, 0x5837f26f +0, 36864, 36864, 1024, 4096, 0x71500376 +0, 37888, 37888, 1024, 4096, 0xb4650378 +0, 38912, 38912, 1024, 4096, 0xd261f5b1 +0, 39936, 39936, 1024, 4096, 0x3038f3fd +0, 40960, 40960, 1024, 4096, 0x8e1908c6 +0, 41984, 41984, 1024, 4096, 0x1d6bfd33 +0, 43008, 43008, 1024, 4096, 0x7036f23f +0, 44032, 44032, 1024, 4096, 0xabb8fbdb +0, 45056, 45056, 1
Re: [FFmpeg-devel] [PATCH] fate: add afade tes
I look the code for some time but I don't know how to express the dependency. I think it's ok because it uses FATE_AFILTER_SAMPLES and then this variable is added to FATE_SAMPLES_AVCONV. Muhammad which command did you execute to reproduce the error? Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, June 14, 2016 4:30:24 AM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add afade tes On Mon, Jun 13, 2016 at 01:34:39PM +0700, Muhammad Faiz wrote: > On Sun, Jun 12, 2016 at 8:14 PM, Michael Niedermayer > wrote: > > On Sun, Jun 12, 2016 at 09:37:28AM +, Petru Rares Sincraian wrote: > >> Hi there, > >> > >> I'm sorry, I hadn't considered mingw. Here is the patch without the > >> filter-afade-ihsin. > > > > applied > > > fail without SAMPLES should be fixed [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] fate: add test for agate
Hi there, Here is a patch for the agate filter. Regards, Petru.From 06678918311817e6b8d08780a594fb72b2a0fdbb Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Thu, 16 Jun 2016 17:12:29 +0200 Subject: [PATCH] fate: add test for agate --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-agate | 264 2 files changed, 269 insertions(+) create mode 100644 tests/ref/fate/filter-agate diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 575a7bf..7c903b7 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -58,6 +58,11 @@ fate-filter-acrossfade: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-acrossfade: SRC2 = $(TARGET_SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav fate-filter-acrossfade: CMD = framecrc -i $(SRC) -i $(SRC2) -filter_complex acrossfade=d=2:c1=log:c2=exp +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-agate +fate-filter-agate: tests/data/asynth-44100-2.wav +fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-agate: CMD = framecrc -i $(SRC) -af agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-agate b/tests/ref/fate/filter-agate new file mode 100644 index 000..4f7b10e --- /dev/null +++ b/tests/ref/fate/filter-agate @@ -0,0 +1,264 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x1af20090 +0, 1024, 1024, 1024, 4096, 0x0b05ef2d +0, 2048, 2048, 1024, 4096, 0x574bf11d +0, 3072, 3072, 1024, 4096, 0x774af5d3 +0, 4096, 4096, 1024, 4096, 0x7b51ff33 +0, 5120, 5120, 1024, 4096, 0xf610f9bf +0, 6144, 6144, 1024, 4096, 0x3c20ef79 +0, 7168, 7168, 1024, 4096, 0x427bef59 +0, 8192, 8192, 1024, 4096, 0x8773fa99 +0, 9216, 9216, 1024, 4096, 0xbf1dfe89 +0, 10240, 10240, 1024, 4096, 0x462df4dd +0, 11264, 11264, 1024, 4096, 0x1170f169 +0, 12288, 12288, 1024, 4096, 0xcb9cf633 +0, 13312, 13312, 1024, 4096, 0x7e8c01da +0, 14336, 14336, 1024, 4096, 0x93c202d0 +0, 15360, 15360, 1024, 4096, 0xd882ec6d +0, 16384, 16384, 1024, 4096, 0x03fbec6d +0, 17408, 17408, 1024, 4096, 0x73f400d4 +0, 18432, 18432, 1024, 4096, 0xea8c01da +0, 19456, 19456, 1024, 4096, 0x23cbf82f +0, 20480, 20480, 1024, 4096, 0x85cdf169 +0, 21504, 21504, 1024, 4096, 0x8e27f2e1 +0, 22528, 22528, 1024, 4096, 0x91bffe89 +0, 23552, 23552, 1024, 4096, 0xc31afd95 +0, 24576, 24576, 1024, 4096, 0x5c23ee59 +0, 25600, 25600, 1024, 4096, 0x58d0ef79 +0, 26624, 26624, 1024, 4096, 0xfccff7c3 +0, 27648, 27648, 1024, 4096, 0x7084ff33 +0, 28672, 28672, 1024, 4096, 0x7f1bf7cf +0, 29696, 29696, 1024, 4096, 0x8037f11d +0, 30720, 30720, 1024, 4096, 0xd106ed31 +0, 31744, 31744, 1024, 4096, 0xaf820090 +0, 32768, 32768, 1024, 4096, 0x1af20090 +0, 33792, 33792, 1024, 4096, 0x0b05ef2d +0, 34816, 34816, 1024, 4096, 0x574bf11d +0, 35840, 35840, 1024, 4096, 0x774af5d3 +0, 36864, 36864, 1024, 4096, 0x7b51ff33 +0, 37888, 37888, 1024, 4096, 0xf610f9bf +0, 38912, 38912, 1024, 4096, 0x3c20ef79 +0, 39936, 39936, 1024, 4096, 0x427bef59 +0, 40960, 40960, 1024, 4096, 0x8773fa99 +0, 41984, 41984, 1024, 4096, 0xbf1dfe89 +0, 43008, 43008, 1024, 4096, 0x462df4dd +0, 44032, 44032, 1024, 4096, 0x41650472 +0, 45056, 45056, 1024, 4096, 0x1081f133 +0, 46080, 46080, 1024, 4096, 0x9da3e58b +0, 47104, 47104, 1024, 4096, 0x752614ac +0, 48128, 48128, 1024, 4096, 0x0f23034c +0, 49152, 49152, 1024, 4096, 0x768fe8a1 +0, 50176, 50176, 1024, 4096, 0xf0f9079e +0, 51200, 51200, 1024, 4096, 0x8543ed93 +0, 52224, 52224, 1024, 4096, 0x9f96fe9d +0, 53248, 53248, 1024, 4096, 0x94f3facf +0, 54272, 54272, 1024, 4096, 0xc0defe4d +0, 55296, 55296, 1024, 4096, 0x4e22f5ff +0, 56320, 56320, 1024, 4
[FFmpeg-devel] [PATCH] fate: add test for alimiter
Hi there, Today I make a test for alimiter. Here is it :) Regards, Petru Rares.From f964d3524773df919d09df3316878997b8738f2b Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 20 Jun 2016 19:32:36 +0200 Subject: [PATCH] fate: add test for alimiter --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-alimiter | 264 + 2 files changed, 269 insertions(+) create mode 100644 tests/ref/fate/filter-alimiter diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 7c903b7..2bdb644 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -63,6 +63,11 @@ fate-filter-agate: tests/data/asynth-44100-2.wav fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-agate: CMD = framecrc -i $(SRC) -af agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-alimiter +fate-filter-alimiter: tests/data/asynth-44100-2.wav +fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-alimiter b/tests/ref/fate/filter-alimiter new file mode 100644 index 000..06e23f1 --- /dev/null +++ b/tests/ref/fate/filter-alimiter @@ -0,0 +1,264 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0xd4194af4 +0, 1024, 1024, 1024, 4096, 0x686af4ab +0, 2048, 2048, 1024, 4096, 0xe80cee61 +0, 3072, 3072, 1024, 4096, 0xa686fbad +0, 4096, 4096, 1024, 4096, 0x191e062c +0, 5120, 5120, 1024, 4096, 0x1a13edb1 +0, 6144, 6144, 1024, 4096, 0xab21f8ef +0, 7168, 7168, 1024, 4096, 0xaa30e757 +0, 8192, 8192, 1024, 4096, 0x5afdf69f +0, 9216, 9216, 1024, 4096, 0x765e05ec +0, 10240, 10240, 1024, 4096, 0x6484f551 +0, 11264, 11264, 1024, 4096, 0x61b9e9f7 +0, 12288, 12288, 1024, 4096, 0xa735feb3 +0, 13312, 13312, 1024, 4096, 0xb47203aa +0, 14336, 14336, 1024, 4096, 0xb6b5fbf5 +0, 15360, 15360, 1024, 4096, 0xbc66f14f +0, 16384, 16384, 1024, 4096, 0x2003ff5b +0, 17408, 17408, 1024, 4096, 0x1160f17d +0, 18432, 18432, 1024, 4096, 0x308001a4 +0, 19456, 19456, 1024, 4096, 0x9df9f429 +0, 20480, 20480, 1024, 4096, 0x3e6eec0f +0, 21504, 21504, 1024, 4096, 0xca3301f2 +0, 22528, 22528, 1024, 4096, 0x9eb1f961 +0, 23552, 23552, 1024, 4096, 0xd0a50c8c +0, 24576, 24576, 1024, 4096, 0x071ee96b +0, 25600, 25600, 1024, 4096, 0x7a46f05b +0, 26624, 26624, 1024, 4096, 0x2cb2f475 +0, 27648, 27648, 1024, 4096, 0x5bda0a52 +0, 28672, 28672, 1024, 4096, 0x33c0f727 +0, 29696, 29696, 1024, 4096, 0x53cfee59 +0, 30720, 30720, 1024, 4096, 0x1588f221 +0, 31744, 31744, 1024, 4096, 0x95d400d6 +0, 32768, 32768, 1024, 4096, 0x0078009a +0, 33792, 33792, 1024, 4096, 0x686af4ab +0, 34816, 34816, 1024, 4096, 0xe80cee61 +0, 35840, 35840, 1024, 4096, 0xa686fbad +0, 36864, 36864, 1024, 4096, 0x191e062c +0, 37888, 37888, 1024, 4096, 0x1a13edb1 +0, 38912, 38912, 1024, 4096, 0xab21f8ef +0, 39936, 39936, 1024, 4096, 0xaa30e757 +0, 40960, 40960, 1024, 4096, 0x5afdf69f +0, 41984, 41984, 1024, 4096, 0x765e05ec +0, 43008, 43008, 1024, 4096, 0x6484f551 +0, 44032, 44032, 1024, 4096, 0x755e0600 +0, 45056, 45056, 1024, 4096, 0x5056ecb9 +0, 46080, 46080, 1024, 4096, 0xdcb609a8 +0, 47104, 47104, 1024, 4096, 0xc87bf4a1 +0, 48128, 48128, 1024, 4096, 0xecdfef95 +0, 49152, 49152, 1024, 4096, 0x905ff13f +0, 50176, 50176, 1024, 4096, 0x4e69eeb3 +0, 51200, 51200, 1024, 4096, 0x16e1082c +0, 52224, 52224, 1024, 4096, 0x606c0a22 +0, 53248, 53248, 1024, 4096, 0x9f94f351 +0, 54272, 54272, 1024, 4096, 0x2c47f63f +0, 55296, 55296, 1024, 4096, 0x9e14ebf9 +0, 56320, 56320, 1024, 4096, 0x7804fbcb +0, 57
[FFmpeg-devel] [PATCH] fate: add test for amerge
Hi there, Here is test for amerge. Regards, Petru Rares.From 4882601b6eb5a825bd5ddf837b1dce3977496314 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 21 Jun 2016 14:43:01 +0200 Subject: [PATCH] fate: add test for amerge --- tests/fate/filter-audio.mak | 5 ++ tests/ref/fate/filter-amerge | 135 +++ 2 files changed, 140 insertions(+) create mode 100644 tests/ref/fate/filter-amerge diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 7c903b7..ea47961 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -63,6 +63,11 @@ fate-filter-agate: tests/data/asynth-44100-2.wav fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-agate: CMD = framecrc -i $(SRC) -af agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-amerge +fate-filter-amerge: tests/data/asynth-44100-1.wav +fate-filter-amerge: SRC = $(TARGET_PATH)/tests/data/asynth-44100-1.wav +fate-filter-amerge: CMD = framecrc -i $(SRC) -i $(SRC) -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-amerge b/tests/ref/fate/filter-amerge new file mode 100644 index 000..006383a --- /dev/null +++ b/tests/ref/fate/filter-amerge @@ -0,0 +1,135 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 2048, 8192, 0x120efa65 +0, 2048, 2048, 2048, 8192, 0x7b3cebf7 +0, 4096, 4096, 2048, 8192, 0x0fb8ee01 +0, 6144, 6144, 2048, 8192, 0x47a9f271 +0, 8192, 8192, 2048, 8192, 0x47a8ed5b +0, 10240, 10240, 2048, 8192, 0xdab6f33f +0, 12288, 12288, 2048, 8192, 0xda4df7eb +0, 14336, 14336, 2048, 8192, 0xc83ce449 +0, 16384, 16384, 2048, 8192, 0x4954e765 +0, 18432, 18432, 2048, 8192, 0x0214f5d5 +0, 20480, 20480, 2048, 8192, 0x2302f3c9 +0, 22528, 22528, 2048, 8192, 0x2b57ef5b +0, 24576, 24576, 2048, 8192, 0xad22f075 +0, 26624, 26624, 2048, 8192, 0x9bd5ee8b +0, 28672, 28672, 2048, 8192, 0x91a4e9e1 +0, 30720, 30720, 2048, 8192, 0x85a9fd7f +0, 32768, 32768, 2048, 8192, 0x120efa65 +0, 34816, 34816, 2048, 8192, 0x7b3cebf7 +0, 36864, 36864, 2048, 8192, 0x0fb8ee01 +0, 38912, 38912, 2048, 8192, 0x47a9f271 +0, 40960, 40960, 2048, 8192, 0x47a8ed5b +0, 43008, 43008, 2048, 8192, 0x76f7c64f +0, 45056, 45056, 2048, 8192, 0xade0f6f5 +0, 47104, 47104, 2048, 8192, 0xcc1ce131 +0, 49152, 49152, 2048, 8192, 0x11aaf88b +0, 51200, 51200, 2048, 8192, 0xcd50e409 +0, 53248, 53248, 2048, 8192, 0x7f72ee63 +0, 55296, 55296, 2048, 8192, 0xf7b4ff5d +0, 57344, 57344, 2048, 8192, 0xd8bc4192 +0, 59392, 59392, 2048, 8192, 0xc8fb0418 +0, 61440, 61440, 2048, 8192, 0x0859cac9 +0, 63488, 63488, 2048, 8192, 0x7529f279 +0, 65536, 65536, 2048, 8192, 0x0ee0df7b +0, 67584, 67584, 2048, 8192, 0x07edef6d +0, 69632, 69632, 2048, 8192, 0x7d02ea45 +0, 71680, 71680, 2048, 8192, 0x770104a8 +0, 73728, 73728, 2048, 8192, 0x7124f553 +0, 75776, 75776, 2048, 8192, 0x6df6269a +0, 77824, 77824, 2048, 8192, 0x4218002c +0, 79872, 79872, 2048, 8192, 0x274fe03d +0, 81920, 81920, 2048, 8192, 0xd00f5aae +0, 83968, 83968, 2048, 8192, 0x907dfe51 +0, 86016, 86016, 2048, 8192, 0xc2c10ed2 +0, 88064, 88064, 2048, 8192, 0x293aa355 +0, 90112, 90112, 2048, 8192, 0xb84a591d +0, 92160, 92160, 2048, 8192, 0x44f64e87 +0, 94208, 94208, 2048, 8192, 0x0f6869bd +0, 96256, 96256, 2048, 8192, 0xb3dcc44b +0, 98304, 98304, 2048, 8192, 0x44f85293 +0, 100352, 100352, 2048, 8192, 0x8545ad0f +0, 102400, 102400, 2048, 8192, 0xdee2a193 +0, 104448, 104448, 2048, 8192, 0x46a96e2d +0, 106496, 106496, 2048, 8192, 0xcebc56a1 +0, 108544, 108544, 2048, 8192, 0x5353a35b +0, 110592, 110592, 2048, 8192, 0x74aceb33 +0, 112640, 112640, 2048, 8192, 0x34fa1488 +0,
Re: [FFmpeg-devel] [PATCH] fate: add test for amerge
Upps, solved. Thanks, Petru Rares. From: ffmpeg-devel on behalf of Michael Niedermayer Sent: Tuesday, June 21, 2016 7:06:27 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for amerge On Tue, Jun 21, 2016 at 12:53:05PM +, Petru Rares Sincraian wrote: > > Hi there, > > Here is test for amerge. > > > Regards, > Petru Rares. > fate/filter-audio.mak |5 + > ref/fate/filter-amerge | 135 > + > 2 files changed, 140 insertions(+) > 1bb444a73dd174a82d8ff3c13171d0805e48aead 0001-fate-add-test-for-amerge.patch > From 4882601b6eb5a825bd5ddf837b1dce3977496314 Mon Sep 17 00:00:00 2001 > From: Petru Rares Sincraian > Date: Tue, 21 Jun 2016 14:43:01 +0200 > Subject: [PATCH] fate: add test for amerge > > --- > tests/fate/filter-audio.mak | 5 ++ > tests/ref/fate/filter-amerge | 135 > +++ > 2 files changed, 140 insertions(+) > create mode 100644 tests/ref/fate/filter-amerge > > diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak > index 7c903b7..ea47961 100644 > --- a/tests/fate/filter-audio.mak > +++ b/tests/fate/filter-audio.mak > @@ -63,6 +63,11 @@ fate-filter-agate: tests/data/asynth-44100-2.wav > fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav > fate-filter-agate: CMD = framecrc -i $(SRC) -af > agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4 > > +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AFADE, WAV, PCM_S16LE, PCM_S16LE, > WAV) += fate-filter-amerge ^ shouldnt this be AMERGE ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin From 9a6e91851eecce7b527c4ab003ac4f54f29461a4 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Tue, 21 Jun 2016 14:43:01 +0200 Subject: [PATCH] fate: add test for amerge --- tests/fate/filter-audio.mak | 5 ++ tests/ref/fate/filter-amerge | 135 +++ 2 files changed, 140 insertions(+) create mode 100644 tests/ref/fate/filter-amerge diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 2bdb644..3126f84 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -68,6 +68,11 @@ fate-filter-alimiter: tests/data/asynth-44100-2.wav fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, AMERGE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-amerge +fate-filter-amerge: tests/data/asynth-44100-1.wav +fate-filter-amerge: SRC = $(TARGET_PATH)/tests/data/asynth-44100-1.wav +fate-filter-amerge: CMD = framecrc -i $(SRC) -i $(SRC) -filter_complex "[0:a][1:a]amerge=inputs=2[aout]" -map "[aout]" + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-amerge b/tests/ref/fate/filter-amerge new file mode 100644 index 000..006383a --- /dev/null +++ b/tests/ref/fate/filter-amerge @@ -0,0 +1,135 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 2048, 8192, 0x120efa65 +0, 2048, 2048, 2048, 8192, 0x7b3cebf7 +0, 4096, 4096, 2048, 8192, 0x0fb8ee01 +0, 6144, 6144, 2048, 8192, 0x47a9f271 +0, 8192, 8192, 2048, 8192, 0x47a8ed5b +0, 10240, 10240, 2048, 8192, 0xdab6f33f +0, 12288, 12288, 2048, 8192, 0xda4df7eb +0, 14336, 14336, 2048, 8192, 0xc83ce449 +0, 16384, 16384, 2048, 8192, 0x4954e765 +0, 18432, 18432, 2048, 8192, 0x0214f5d5 +0, 20480, 20480, 2048, 8192, 0x2302f3c9 +0, 22528, 22528, 2048, 8192, 0x2b57ef5b +0, 24576, 24576, 2048, 8192, 0xad22f075 +0, 26624, 26624, 2048, 8192, 0x9bd5ee8b +0, 28672, 28672, 2048, 8192, 0x91a4e9e1 +0, 30720, 30720, 2048, 8192, 0x85a9fd7f +0, 32768, 32768, 2048, 8192, 0x120efa65 +0, 34816, 34816, 2048, 8192, 0x7b3cebf7 +0, 36864, 36864, 2048, 8192, 0x0fb8ee01 +0, 38912, 38912, 2048, 8192, 0x47a9f271 +0, 40960, 40960, 2048, 8192, 0x47a8ed5b +0, 43008, 43008, 2048, 8192, 0x76f7c64f +0, 45056, 45056, 2048, 8192,
[FFmpeg-devel] [PATCH] fate: add apad test
Hi, Here is another test. In this case for apad filter. From 7fc05fd4e3bd7d610189e14e3cfd4968bc570a65 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Wed, 22 Jun 2016 15:24:26 +0200 Subject: [PATCH] fate: add apad test --- tests/fate/filter-audio.mak | 5 + tests/ref/fate/filter-apad | 265 2 files changed, 270 insertions(+) create mode 100644 tests/ref/fate/filter-apad diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 2bdb644..ede9105 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -68,6 +68,11 @@ fate-filter-alimiter: tests/data/asynth-44100-2.wav fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, APAD, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-apad +fate-filter-apad: tests/data/asynth-44100-2.wav +fate-filter-apad: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-apad: CMD = framecrc -i $(SRC) -af apad=pad_len=10 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-apad b/tests/ref/fate/filter-apad new file mode 100644 index 000..194a459 --- /dev/null +++ b/tests/ref/fate/filter-apad @@ -0,0 +1,265 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x29e3eecf +0, 1024, 1024, 1024, 4096, 0x18390b96 +0, 2048, 2048, 1024, 4096, 0xc477fa99 +0, 3072, 3072, 1024, 4096, 0x3bc0f14f +0, 4096, 4096, 1024, 4096, 0x2379ed91 +0, 5120, 5120, 1024, 4096, 0xfd6a0070 +0, 6144, 6144, 1024, 4096, 0x0b01f4cf +0, 7168, 7168, 1024, 4096, 0x6716fd93 +0, 8192, 8192, 1024, 4096, 0x1840f25b +0, 9216, 9216, 1024, 4096, 0x9c1ffaf1 +0, 10240, 10240, 1024, 4096, 0xcbedefaf +0, 11264, 11264, 1024, 4096, 0x3e050390 +0, 12288, 12288, 1024, 4096, 0xb30e0090 +0, 13312, 13312, 1024, 4096, 0x26b8f75b +0, 14336, 14336, 1024, 4096, 0xd706e311 +0, 15360, 15360, 1024, 4096, 0x0c480138 +0, 16384, 16384, 1024, 4096, 0x6c9a0216 +0, 17408, 17408, 1024, 4096, 0x7abce54f +0, 18432, 18432, 1024, 4096, 0xda45f63f +0, 19456, 19456, 1024, 4096, 0x50d5ff87 +0, 20480, 20480, 1024, 4096, 0x59be0352 +0, 21504, 21504, 1024, 4096, 0xa61af077 +0, 22528, 22528, 1024, 4096, 0x84c4fc07 +0, 23552, 23552, 1024, 4096, 0x4a35f345 +0, 24576, 24576, 1024, 4096, 0xbb65fa81 +0, 25600, 25600, 1024, 4096, 0xf6c7f5e5 +0, 26624, 26624, 1024, 4096, 0xd3270138 +0, 27648, 27648, 1024, 4096, 0x4782ed53 +0, 28672, 28672, 1024, 4096, 0xe308f055 +0, 29696, 29696, 1024, 4096, 0x7d33f97d +0, 30720, 30720, 1024, 4096, 0xb8b00dd4 +0, 31744, 31744, 1024, 4096, 0x7ff7efab +0, 32768, 32768, 1024, 4096, 0x29e3eecf +0, 33792, 33792, 1024, 4096, 0x18390b96 +0, 34816, 34816, 1024, 4096, 0xc477fa99 +0, 35840, 35840, 1024, 4096, 0x3bc0f14f +0, 36864, 36864, 1024, 4096, 0x2379ed91 +0, 37888, 37888, 1024, 4096, 0xfd6a0070 +0, 38912, 38912, 1024, 4096, 0x0b01f4cf +0, 39936, 39936, 1024, 4096, 0x6716fd93 +0, 40960, 40960, 1024, 4096, 0x1840f25b +0, 41984, 41984, 1024, 4096, 0x9c1ffaf1 +0, 43008, 43008, 1024, 4096, 0xcbedefaf +0, 44032, 44032, 1024, 4096, 0xda37d691 +0, 45056, 45056, 1024, 4096, 0x7193ecbf +0, 46080, 46080, 1024, 4096, 0x6e4a0a36 +0, 47104, 47104, 1024, 4096, 0x61cfe70d +0, 48128, 48128, 1024, 4096, 0xc19ffa15 +0, 49152, 49152, 1024, 4096, 0x7b32fb3d +0, 50176, 50176, 1024, 4096, 0xdacefd3f +0, 51200, 51200, 1024, 4096, 0x3964f64d +0, 52224, 52224, 1024, 4096, 0xdcf2edad +0, 53248, 53248, 1024, 4096, 0x1367f69b +0, 54272, 54272, 1024, 4096, 0xd4c6f7b9 +0, 55296, 55296, 1024, 4096, 0x9e041186 +0, 56320, 56320, 1024, 4096, 0xe939edd7 +0, 57344, 57344, 1024, 4096, 0xa932336a +0, 58368, 58368, 1024, 4096, 0x5f510e28
[FFmpeg-devel] [PATCH] fate: add anequalizer test
Hi there, Here is a patch for anequalizer. Soon I will improve the coverage for this test. Regards, Petru Rares. From fe6fbe3a218b8a3eeffa0b6fd64e0f8c8aa2b78d Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Wed, 22 Jun 2016 12:58:14 +0200 Subject: [PATCH] fate: add anequalizer test --- tests/fate/filter-audio.mak | 6 + tests/filtergraphs/anequalizer| 1 + tests/ref/fate/filter-anequalizer | 264 ++ 3 files changed, 271 insertions(+) create mode 100644 tests/filtergraphs/anequalizer create mode 100644 tests/ref/fate/filter-anequalizer diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 7c903b7..282834f 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -63,6 +63,12 @@ fate-filter-agate: tests/data/asynth-44100-2.wav fate-filter-agate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-agate: CMD = framecrc -i $(SRC) -af agate=level_in=10:range=0:threshold=1:ratio=1:attack=1:knee=1:makeup=4 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ANEQUALIZER, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-anequalizer +fate-filter-anequalizer: tests/data/asynth-44100-2.wav +fate-filter-anequalizer: tests/data/filtergraphs/anequalizer +fate-filter-anequalizer: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-anequalizer: CMD = framecrc -i $(SRC) -filter_complex_script $(TARGET_PATH)/tests/data/filtergraphs/anequalizer + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/filtergraphs/anequalizer b/tests/filtergraphs/anequalizer new file mode 100644 index 000..fd4a86f --- /dev/null +++ b/tests/filtergraphs/anequalizer @@ -0,0 +1 @@ +anequalizer='c0 f=200 w=200 g=-80 t=1' diff --git a/tests/ref/fate/filter-anequalizer b/tests/ref/fate/filter-anequalizer new file mode 100644 index 000..21c7aaf --- /dev/null +++ b/tests/ref/fate/filter-anequalizer @@ -0,0 +1,264 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x8e1bf8e0 +0, 1024, 1024, 1024, 4096, 0xe315f564 +0, 2048, 2048, 1024, 4096, 0x3d0efa98 +0, 3072, 3072, 1024, 4096, 0x5c1bf6b2 +0, 4096, 4096, 1024, 4096, 0xb5b4ff02 +0, 5120, 5120, 1024, 4096, 0xb9b1f4b6 +0, 6144, 6144, 1024, 4096, 0x86e9f411 +0, 7168, 7168, 1024, 4096, 0x36aafbd3 +0, 8192, 8192, 1024, 4096, 0x05d2f63f +0, 9216, 9216, 1024, 4096, 0x1d95fd16 +0, 10240, 10240, 1024, 4096, 0x4fb0f009 +0, 11264, 11264, 1024, 4096, 0x6a6301c6 +0, 12288, 12288, 1024, 4096, 0x299cfbd8 +0, 13312, 13312, 1024, 4096, 0x2a7ffe8c +0, 14336, 14336, 1024, 4096, 0xceace509 +0, 15360, 15360, 1024, 4096, 0xd084feec +0, 16384, 16384, 1024, 4096, 0xd956f613 +0, 17408, 17408, 1024, 4096, 0xf61dfa8c +0, 18432, 18432, 1024, 4096, 0x6ebcf53e +0, 19456, 19456, 1024, 4096, 0x8601f9f2 +0, 20480, 20480, 1024, 4096, 0x6a4bf2d9 +0, 21504, 21504, 1024, 4096, 0xb917fc1d +0, 22528, 22528, 1024, 4096, 0x85cffbca +0, 23552, 23552, 1024, 4096, 0x80d9f509 +0, 24576, 24576, 1024, 4096, 0xa4acf898 +0, 25600, 25600, 1024, 4096, 0x7614f3c0 +0, 26624, 26624, 1024, 4096, 0x5f3700dc +0, 27648, 27648, 1024, 4096, 0x4308ef21 +0, 28672, 28672, 1024, 4096, 0x670df4fe +0, 29696, 29696, 1024, 4096, 0x98d0f24f +0, 30720, 30720, 1024, 4096, 0xed360be0 +0, 31744, 31744, 1024, 4096, 0xbe10f1eb +0, 32768, 32768, 1024, 4096, 0xb5d0fac0 +0, 33792, 33792, 1024, 4096, 0x94c1f649 +0, 34816, 34816, 1024, 4096, 0x3617fb9b +0, 35840, 35840, 1024, 4096, 0x1840f6e6 +0, 36864, 36864, 1024, 4096, 0x0ce8fdfa +0, 37888, 37888, 1024, 4096, 0xd7c1f4b8 +0, 38912, 38912, 1024, 4096, 0x86e9f411 +0, 39936, 39936, 1024, 4096, 0x36aafbd3 +0, 40960, 40960, 1024, 4096, 0x05d2f63f +0, 41984, 41984, 1024, 4096, 0x1d95fd16 +0, 43008, 43008, 1024, 4096, 0x4fb0f009 +0, 44032, 44032, 1024, 4096, 0xc6de743e +0, 45056, 45056, 1024, 4096, 0xe878f6e3 +0, 46080, 46080, 1024, 4096, 0x40c3fdf9 +0, 47104, 47104, 1024, 4096, 0x19def744 +0, 48128, 48128, 1024, 4096,
[FFmpeg-devel] [PATCH] fate: add test for asetnsamples
Hi there, Here is a new test, in this case for asetnsamples. From 350347097df129b82ec5d0d7ed59085f44acc605 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Wed, 29 Jun 2016 16:26:19 +0200 Subject: [PATCH] fate: add test for asetnsamples --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-asetnsamples | 522 + 2 files changed, 527 insertions(+) create mode 100644 tests/ref/fate/filter-asetnsamples diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 2bdb644..9ea7f8a 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -68,6 +68,11 @@ fate-filter-alimiter: tests/data/asynth-44100-2.wav fate-filter-alimiter: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-alimiter: CMD = framecrc -i $(SRC) -af alimiter=level_in=1:level_out=2:limit=0.2 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETNSAMPLES, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetnsamples +fate-filter-asetnsamples: tests/data/asynth-44100-2.wav +fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-asetnsamples b/tests/ref/fate/filter-asetnsamples new file mode 100644 index 000..5e246ec --- /dev/null +++ b/tests/ref/fate/filter-asetnsamples @@ -0,0 +1,522 @@ +#tb 0: 1/44100 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 44100 +#channel_layout 0: 3 +0, 0, 0, 512, 2048, 0xd2dbf701 +0,512,512, 512, 2048, 0xdb22f7bf +0, 1024, 1024, 512, 2048, 0x82a103be +0, 1536, 1536, 512, 2048, 0xa3c707d8 +0, 2048, 2048, 512, 2048, 0x8aaafb8f +0, 2560, 2560, 512, 2048, 0x4bdafefb +0, 3072, 3072, 512, 2048, 0x75a3e833 +0, 3584, 3584, 512, 2048, 0xc130091c +0, 4096, 4096, 512, 2048, 0x99d8f36d +0, 4608, 4608, 512, 2048, 0xaf6efa15 +0, 5120, 5120, 512, 2048, 0xff5f0506 +0, 5632, 5632, 512, 2048, 0xcba4fb5b +0, 6144, 6144, 512, 2048, 0x729309c6 +0, 6656, 6656, 512, 2048, 0x63cdeb09 +0, 7168, 7168, 512, 2048, 0x386cfccb +0, 7680, 7680, 512, 2048, 0x602100c8 +0, 8192, 8192, 512, 2048, 0x3573f565 +0, 8704, 8704, 512, 2048, 0x47b9fce7 +0, 9216, 9216, 512, 2048, 0xd1e90b7a +0, 9728, 9728, 512, 2048, 0xf4c3ef77 +0, 10240, 10240, 512, 2048, 0x59ebfe3f +0, 10752, 10752, 512, 2048, 0x02d4f161 +0, 11264, 11264, 512, 2048, 0xbbf5ff05 +0, 11776, 11776, 512, 2048, 0xe26a047c +0, 12288, 12288, 512, 2048, 0x5452f02b +0, 12800, 12800, 512, 2048, 0x961e1056 +0, 13312, 13312, 512, 2048, 0x9192f803 +0, 13824, 13824, 512, 2048, 0x08d7ff49 +0, 14336, 14336, 512, 2048, 0x7c64ee03 +0, 14848, 14848, 512, 2048, 0xd303f4ff +0, 15360, 15360, 512, 2048, 0xda5902be +0, 15872, 15872, 512, 2048, 0x4096fe6b +0, 16384, 16384, 512, 2048, 0x178e016a +0, 16896, 16896, 512, 2048, 0x046700ac +0, 17408, 17408, 512, 2048, 0x5f20f4ad +0, 17920, 17920, 512, 2048, 0x40e2f093 +0, 18432, 18432, 512, 2048, 0x5c37fccd +0, 18944, 18944, 512, 2048, 0x9f85f963 +0, 19456, 19456, 512, 2048, 0x69461038 +0, 19968, 19968, 512, 2048, 0x1ff1ef4f +0, 20480, 20480, 512, 2048, 0x409304fc +0, 20992, 20992, 512, 2048, 0x36d3fe47 +0, 21504, 21504, 512, 2048, 0xea01f367 +0, 22016, 22016, 512, 2048, 0x11f5fd01 +0, 22528, 22528, 512, 2048, 0x6da5 +0, 23040, 23040, 512, 2048, 0x7eec0d62 +0, 23552, 23552, 512, 2048, 0xb47bfb93 +0, 24064, 24064, 512, 2048, 0x87b8f7a3 +0, 24576, 24576, 512, 2048, 0xcba0fefb +0, 25088, 25088, 512, 2048, 0xa02efb77 +0, 25600, 25600, 512, 2048, 0x1030ecf1 +0, 26112, 26112, 512, 2048, 0xef7f08f4 +0, 26624, 26624, 512, 2048, 0x8d4efa1d +0, 27136, 27136, 512, 2048, 0xe88b070c +0, 27648, 27648, 512, 2048, 0x229cf957 +0, 28160, 28160, 512, 2048, 0xf7f2f3ed +0, 28672, 28
[FFmpeg-devel] [PATCH] fate: add test for asetrate
Hi there, Here is a patch for libavfilter/asetrate. From f855dbc610888acf6a36b2df16a9146a14fc22f6 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 4 Jul 2016 17:51:54 +0200 Subject: [PATCH] fate: add test for asetrate --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-asetrate | 264 + 2 files changed, 269 insertions(+) create mode 100644 tests/ref/fate/filter-asetrate diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index a40755a..95cb404 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -89,6 +89,11 @@ fate-filter-asetnsamples: tests/data/asynth-44100-2.wav fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETRATE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetrate +fate-filter-asetrate: tests/data/asynth-44100-2.wav +fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetrate: CMD = framecrc -i $(SRC) -af asetrate=2 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-asetrate b/tests/ref/fate/filter-asetrate new file mode 100644 index 000..a24d206 --- /dev/null +++ b/tests/ref/fate/filter-asetrate @@ -0,0 +1,264 @@ +#tb 0: 1/2 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 2 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x29e3eecf +0, 1024, 1024, 1024, 4096, 0x18390b96 +0, 2048, 2048, 1024, 4096, 0xc477fa99 +0, 3072, 3072, 1024, 4096, 0x3bc0f14f +0, 4096, 4096, 1024, 4096, 0x2379ed91 +0, 5120, 5120, 1024, 4096, 0xfd6a0070 +0, 6144, 6144, 1024, 4096, 0x0b01f4cf +0, 7168, 7168, 1024, 4096, 0x6716fd93 +0, 8192, 8192, 1024, 4096, 0x1840f25b +0, 9216, 9216, 1024, 4096, 0x9c1ffaf1 +0, 10240, 10240, 1024, 4096, 0xcbedefaf +0, 11264, 11264, 1024, 4096, 0x3e050390 +0, 12288, 12288, 1024, 4096, 0xb30e0090 +0, 13312, 13312, 1024, 4096, 0x26b8f75b +0, 14336, 14336, 1024, 4096, 0xd706e311 +0, 15360, 15360, 1024, 4096, 0x0c480138 +0, 16384, 16384, 1024, 4096, 0x6c9a0216 +0, 17408, 17408, 1024, 4096, 0x7abce54f +0, 18432, 18432, 1024, 4096, 0xda45f63f +0, 19456, 19456, 1024, 4096, 0x50d5ff87 +0, 20480, 20480, 1024, 4096, 0x59be0352 +0, 21504, 21504, 1024, 4096, 0xa61af077 +0, 22528, 22528, 1024, 4096, 0x84c4fc07 +0, 23552, 23552, 1024, 4096, 0x4a35f345 +0, 24576, 24576, 1024, 4096, 0xbb65fa81 +0, 25600, 25600, 1024, 4096, 0xf6c7f5e5 +0, 26624, 26624, 1024, 4096, 0xd3270138 +0, 27648, 27648, 1024, 4096, 0x4782ed53 +0, 28672, 28672, 1024, 4096, 0xe308f055 +0, 29696, 29696, 1024, 4096, 0x7d33f97d +0, 30720, 30720, 1024, 4096, 0xb8b00dd4 +0, 31744, 31744, 1024, 4096, 0x7ff7efab +0, 32768, 32768, 1024, 4096, 0x29e3eecf +0, 33792, 33792, 1024, 4096, 0x18390b96 +0, 34816, 34816, 1024, 4096, 0xc477fa99 +0, 35840, 35840, 1024, 4096, 0x3bc0f14f +0, 36864, 36864, 1024, 4096, 0x2379ed91 +0, 37888, 37888, 1024, 4096, 0xfd6a0070 +0, 38912, 38912, 1024, 4096, 0x0b01f4cf +0, 39936, 39936, 1024, 4096, 0x6716fd93 +0, 40960, 40960, 1024, 4096, 0x1840f25b +0, 41984, 41984, 1024, 4096, 0x9c1ffaf1 +0, 43008, 43008, 1024, 4096, 0xcbedefaf +0, 44032, 44032, 1024, 4096, 0xda37d691 +0, 45056, 45056, 1024, 4096, 0x7193ecbf +0, 46080, 46080, 1024, 4096, 0x6e4a0a36 +0, 47104, 47104, 1024, 4096, 0x61cfe70d +0, 48128, 48128, 1024, 4096, 0xc19ffa15 +0, 49152, 49152, 1024, 4096, 0x7b32fb3d +0, 50176, 50176, 1024, 4096, 0xdacefd3f +0, 51200, 51200, 1024, 4096, 0x3964f64d +0, 52224, 52224, 1024, 4096, 0xdcf2edad +0, 53248, 53248, 1024, 4096, 0x1367f69b +0, 54272, 54272, 1024, 4096, 0xd4c6f7b9 +0, 55296, 55296, 1024, 4096, 0x9e041186 +0, 56320, 56320, 1024, 4096, 0xe939edd7 +0, 57344, 57344, 1024, 4096, 0xa932336a +0, 58368, 58368, 1
Re: [FFmpeg-devel] [PATCH] fate: add test for asetrate
On 04/07/16 18:03, Clément Bœsch wrote: On Mon, Jul 04, 2016 at 04:01:17PM +, Petru Rares Sincraian wrote: Hi there, Here is a patch for libavfilter/asetrate. From f855dbc610888acf6a36b2df16a9146a14fc22f6 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian <mailto:psincra...@outlook.com> Date: Mon, 4 Jul 2016 17:51:54 +0200 Subject: [PATCH] fate: add test for asetrate --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-asetrate | 264 + 2 files changed, 269 insertions(+) create mode 100644 tests/ref/fate/filter-asetrate diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index a40755a..95cb404 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -89,6 +89,11 @@ fate-filter-asetnsamples: tests/data/asynth-44100-2.wav fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETRATE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetrate +fate-filter-asetrate: tests/data/asynth-44100-2.wav +fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetrate: CMD = framecrc -i $(SRC) -af asetrate=2 + This is not the first patch like this, but I don't think you need to decode the whole file. 20-30 frames should be more than enough IMO Regards, How can I do that? Thanks, Petru Rares. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org<mailto:ffmpeg-devel@ffmpeg.org> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fate: add test for asetrate
How can I do that? Thanks, Petru. From: Petru Rares Sincraian Sent: Monday, July 4, 2016 6:23:05 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for asetrate On 04/07/16 18:03, Cl?ment Boesch wrote: On Mon, Jul 04, 2016 at 04:01:17PM +, Petru Rares Sincraian wrote: Hi there, Here is a patch for libavfilter/asetrate. From f855dbc610888acf6a36b2df16a9146a14fc22f6 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian <mailto:psincra...@outlook.com> Date: Mon, 4 Jul 2016 17:51:54 +0200 Subject: [PATCH] fate: add test for asetrate --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-asetrate | 264 + 2 files changed, 269 insertions(+) create mode 100644 tests/ref/fate/filter-asetrate diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index a40755a..95cb404 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -89,6 +89,11 @@ fate-filter-asetnsamples: tests/data/asynth-44100-2.wav fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETRATE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetrate +fate-filter-asetrate: tests/data/asynth-44100-2.wav +fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetrate: CMD = framecrc -i $(SRC) -af asetrate=2 + This is not the first patch like this, but I don't think you need to decode the whole file. 20-30 frames should be more than enough IMO Regards, How can I do that? Thanks, Petru Rares. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org<mailto:ffmpeg-devel@ffmpeg.org> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] fate: add test for asetrate
Hi, Many thanks to all :) Here is the modified test with the first 20 frames only From: ffmpeg-devel on behalf of James Almer Sent: Monday, July 4, 2016 6:39:20 PM To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] fate: add test for asetrate On 7/4/2016 1:34 PM, Petru Rares Sincraian wrote: > How can I do that? Add -aframes 20 to the command line ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel From 8a2bd8c71dc18b80e36e37efb4f600e68f52b846 Mon Sep 17 00:00:00 2001 From: Petru Rares Sincraian Date: Mon, 4 Jul 2016 17:51:54 +0200 Subject: [PATCH] fate: add test for asetrate --- tests/fate/filter-audio.mak| 5 + tests/ref/fate/filter-asetrate | 25 + 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-asetrate diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index a40755a..1a52320 100644 --- a/tests/fate/filter-audio.mak +++ b/tests/fate/filter-audio.mak @@ -89,6 +89,11 @@ fate-filter-asetnsamples: tests/data/asynth-44100-2.wav fate-filter-asetnsamples: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav fate-filter-asetnsamples: CMD = framecrc -i $(SRC) -af asetnsamples=512:p=1 +FATE_AFILTER-$(call FILTERDEMDECENCMUX, ASETRATE, WAV, PCM_S16LE, PCM_S16LE, WAV) += fate-filter-asetrate +fate-filter-asetrate: tests/data/asynth-44100-2.wav +fate-filter-asetrate: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav +fate-filter-asetrate: CMD = framecrc -i $(SRC) -aframes 20 -af asetrate=2 + tests/data/hls-list.m3u8: TAG = GEN tests/data/hls-list.m3u8: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ diff --git a/tests/ref/fate/filter-asetrate b/tests/ref/fate/filter-asetrate new file mode 100644 index 000..e4487ae --- /dev/null +++ b/tests/ref/fate/filter-asetrate @@ -0,0 +1,25 @@ +#tb 0: 1/2 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 2 +#channel_layout 0: 3 +0, 0, 0, 1024, 4096, 0x29e3eecf +0, 1024, 1024, 1024, 4096, 0x18390b96 +0, 2048, 2048, 1024, 4096, 0xc477fa99 +0, 3072, 3072, 1024, 4096, 0x3bc0f14f +0, 4096, 4096, 1024, 4096, 0x2379ed91 +0, 5120, 5120, 1024, 4096, 0xfd6a0070 +0, 6144, 6144, 1024, 4096, 0x0b01f4cf +0, 7168, 7168, 1024, 4096, 0x6716fd93 +0, 8192, 8192, 1024, 4096, 0x1840f25b +0, 9216, 9216, 1024, 4096, 0x9c1ffaf1 +0, 10240, 10240, 1024, 4096, 0xcbedefaf +0, 11264, 11264, 1024, 4096, 0x3e050390 +0, 12288, 12288, 1024, 4096, 0xb30e0090 +0, 13312, 13312, 1024, 4096, 0x26b8f75b +0, 14336, 14336, 1024, 4096, 0xd706e311 +0, 15360, 15360, 1024, 4096, 0x0c480138 +0, 16384, 16384, 1024, 4096, 0x6c9a0216 +0, 17408, 17408, 1024, 4096, 0x7abce54f +0, 18432, 18432, 1024, 4096, 0xda45f63f +0, 19456, 19456, 1024, 4096, 0x50d5ff87 -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel