Re: [libav-devel] [PATCH] avutil: Add AVERROR_EXPERIMENTAL
On Sun, 21 Oct 2012 22:39:08 +0200, Luca Barbato lu_z...@gentoo.org wrote: From: Nathan Caldwell saint...@gmail.com Signed-off-by: Luca Barbato lu_z...@gentoo.org --- I used feature to describe what is experimental. Better wording welcome. doc/APIchanges | 3 +++ libavutil/error.c | 1 + libavutil/error.h | 1 + libavutil/version.h | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 0c9a455..ed479df 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2011-04-18 API changes, most recent first: +2012-10-18 - xxx - lavu 51.45.0 - error.h + Add AVERROR_EXPERIMENTAL + 2012-10-12 - xxx - lavu 51.44.0 - pixdesc.h Add functions for accessing pixel format descriptors. Accessing the av_pix_fmt_descriptors array directly is now diff --git a/libavutil/error.c b/libavutil/error.c index c335cde..6803d2d 100644 --- a/libavutil/error.c +++ b/libavutil/error.c @@ -41,6 +41,7 @@ int av_strerror(int errnum, char *errbuf, size_t errbuf_size) case AVERROR_STREAM_NOT_FOUND: errstr = Stream not found ; break; case AVERROR_BUG: errstr = Bug detected, please report the issue; break; case AVERROR_UNKNOWN: errstr = Unknown error occurred ; break; +case AVERROR_EXPERIMENTAL: errstr = Experimental feature ; break; } if (errstr) { diff --git a/libavutil/error.h b/libavutil/error.h index 61d5fb9..3dfd880 100644 --- a/libavutil/error.h +++ b/libavutil/error.h @@ -60,6 +60,7 @@ #define AVERROR_STREAM_NOT_FOUND (-0x2dabac08) /// Stream not found #define AVERROR_BUG(-0x5fb8aabe) /// Bug detected, please report the issue #define AVERROR_UNKNOWN(-0x31b4b1ab) /// Unknown error, typically from an external library +#define AVERROR_EXPERIMENTAL (-0x2bb2afa8) /// Requested feature is flagged experimental. Set strict_std_compliance if you really want to use it. I would move the commen to the error string. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc: remove stats_out from the options table.
ping -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavc: remove stats_out from the options table.
On 10/19/2012 08:42 PM, Anton Khirnov wrote: Since it is declared as a string AVOption, the generic freeing code attempts to free it on codec close. Some codecs might have already freed it elsewhere (or didn't even allocate it with av_malloc() in the first place), so this might lead to an invalid free. There is no point in having this field accessible as an AVOption, so remove it from the options table. Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Improve wording and spelling of av_log_missing_feature messages.
--- libavcodec/aacdec.c|4 ++-- libavcodec/aacsbr.c|4 ++-- libavcodec/eac3dec.c |2 +- libavcodec/flacdec.c |2 +- libavcodec/flashsv.c |2 +- libavcodec/proresdec.c |2 +- libavcodec/wmalosslessdec.c|4 ++-- libavcodec/wmavoice.c |2 +- libavformat/oggparseskeleton.c |2 +- libavformat/spdifdec.c |4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index 4a6d390..b7caecb 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2663,7 +2663,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx, // numPrograms if (get_bits(gb, 4)) { // numPrograms av_log_missing_feature(latmctx-aac_ctx.avctx, - multiple programs, 1); + Multiple programs, 1); return AVERROR_PATCHWELCOME; } @@ -2672,7 +2672,7 @@ static int read_stream_mux_config(struct LATMContext *latmctx, // for each layer (which there is only on in DVB) if (get_bits(gb, 3)) { // numLayer av_log_missing_feature(latmctx-aac_ctx.avctx, - multiple layers, 1); + Multiple layers, 1); return AVERROR_PATCHWELCOME; } diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 5eca115..b1c4e73 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -922,14 +922,14 @@ static void read_sbr_extension(AACContext *ac, SpectralBandReplication *sbr, #if 1 *num_bits_left -= ff_ps_read_data(ac-avctx, gb, sbr-ps, *num_bits_left); #else -av_log_missing_feature(ac-avctx, Parametric Stereo is, 0); +av_log_missing_feature(ac-avctx, Parametric Stereo, 0); skip_bits_long(gb, *num_bits_left); // bs_fill_bits *num_bits_left = 0; #endif } break; default: -av_log_missing_feature(ac-avctx, Reserved SBR extensions are, 1); +av_log_missing_feature(ac-avctx, Reserved SBR extensions, 1); skip_bits_long(gb, *num_bits_left); // bs_fill_bits *num_bits_left = 0; break; diff --git a/libavcodec/eac3dec.c b/libavcodec/eac3dec.c index 6266988..639e061 100644 --- a/libavcodec/eac3dec.c +++ b/libavcodec/eac3dec.c @@ -321,7 +321,7 @@ int ff_eac3_parse_header(AC3DecodeContext *s) rates in bit allocation. The best assumption would be that it is handled like AC-3 DolbyNet, but we cannot be sure until we have a sample which utilizes this feature. */ -av_log_missing_feature(s-avctx, Reduced sampling rates, 1); +av_log_missing_feature(s-avctx, Reduced sampling rate, 1); return AVERROR_PATCHWELCOME; } skip_bits(gbc, 5); // skip bitstream id diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index b39feb6..a1fdc35 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -371,7 +371,7 @@ static inline int decode_subframe(FLACContext *s, int channel) bps -= wasted; } if (bps 32) { -av_log_missing_feature(s-avctx, decorrelated bit depth 32, 0); +av_log_missing_feature(s-avctx, Decorrelated bit depth 32, 0); return AVERROR_PATCHWELCOME; } diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 6052ecd..a155bef 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -264,7 +264,7 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data, return AVERROR_PATCHWELCOME; } if (get_bits1(gb)) { -av_log_missing_feature(avctx, custom palette, 1); +av_log_missing_feature(avctx, Custom palette, 1); return AVERROR_PATCHWELCOME; } } diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index 47a5820..bbf747f 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -171,7 +171,7 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, ctx-alpha_info = buf[17] 0xf; if (ctx-alpha_info) -av_log_missing_feature(avctx, alpha channel, 0); +av_log_missing_feature(avctx, Alpha channel, 0); ctx-qmat_changed = 0; ptr = buf + 20; diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index 2d8754f..bd93013 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -189,7 +189,7 @@ static av_cold int decode_init(AVCodecContext *avctx) avctx-sample_fmt = AV_SAMPLE_FMT_S16P; else if (s-bits_per_sample == 24) { avctx-sample_fmt = AV_SAMPLE_FMT_S32P; -av_log_missing_feature(avctx, bit-depth higher than 16, 0); +av_log_missing_feature(avctx, Bit-depth higher than 16, 0); return
[libav-devel] [PATCH 1/8] APIchanges: update lavr bump date
--- doc/APIchanges |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index ed479df..eed0f81 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -6,7 +6,7 @@ libavcodec:2012-01-27 libavdevice: 2011-04-18 libavfilter: 2012-06-22 libavformat: 2012-01-27 -libavresample: 2012-04-24 +libavresample: 2012-10-05 libswscale:2011-06-20 libavutil: 2011-04-18 -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 4/8] Revert avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
This reverts commit d15c21e5fa3961f10026da1a3080a3aa3cf4cec9. After the major bump this is no longer necessary. --- libavcodec/Makefile |1 - libavcodec/mathtables.c | 11 +++ libavcodec/sqrt_tab.c | 30 -- libavutil/Makefile |1 - libavutil/sqrt_tab.c|1 - 5 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 libavcodec/sqrt_tab.c delete mode 100644 libavutil/sqrt_tab.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 2772522..d8c853a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -30,7 +30,6 @@ OBJS = allcodecs.o \ resample.o \ resample2.o \ simple_idct.o\ - sqrt_tab.o \ utils.o \ # parts needed for many different codecs diff --git a/libavcodec/mathtables.c b/libavcodec/mathtables.c index 12877b2..141aa78 100644 --- a/libavcodec/mathtables.c +++ b/libavcodec/mathtables.c @@ -56,6 +56,17 @@ const uint32_t ff_inverse[257]={ 16777216 }; +const uint8_t ff_sqrt_tab[256]={ + 0, 16, 23, 28, 32, 36, 40, 43, 46, 48, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, + 91, 92, 94, 95, 96, 98, 99,100,102,103,104,105,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127, +128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,144,145,146,147,148,149,150,151,151,152,153,154,155,156,156, +157,158,159,160,160,161,162,163,164,164,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,176,177,178,179,179,180,181, +182,182,183,184,184,185,186,186,187,188,188,189,190,190,191,192,192,193,194,194,195,196,196,197,198,198,199,200,200,201,202,202, +203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,213,214,215,215,216,216,217,218,218,219,219,220,220,221,222, +222,223,223,224,224,225,226,226,227,227,228,228,229,230,230,231,231,232,232,233,233,234,235,235,236,236,237,237,238,238,239,239, +240,240,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,254,255,255,255 +}; + const uint8_t ff_reverse[256] = { 0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0, 0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8, diff --git a/libavcodec/sqrt_tab.c b/libavcodec/sqrt_tab.c deleted file mode 100644 index 3f18d91..000 --- a/libavcodec/sqrt_tab.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include stdint.h - -const uint8_t ff_sqrt_tab[256]={ - 0, 16, 23, 28, 32, 36, 40, 43, 46, 48, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, - 91, 92, 94, 95, 96, 98, 99,100,102,103,104,105,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127, -128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,144,145,146,147,148,149,150,151,151,152,153,154,155,156,156, -157,158,159,160,160,161,162,163,164,164,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,176,177,178,179,179,180,181, -182,182,183,184,184,185,186,186,187,188,188,189,190,190,191,192,192,193,194,194,195,196,196,197,198,198,199,200,200,201,202,202, -203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,213,214,215,215,216,216,217,218,218,219,219,220,220,221,222, -222,223,223,224,224,225,226,226,227,227,228,228,229,230,230,231,231,232,232,233,233,234,235,235,236,236,237,237,238,238,239,239, -240,240,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,254,255,255,255 -}; diff --git a/libavutil/Makefile b/libavutil/Makefile index 3451a7c..227a57e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -84,7 +84,6 @@ OBJS = adler32.o \ rc4.o\ samplefmt.o
[libav-devel] [PATCH 3/8] lavu: bump major to 52
In addition to the recent tables mess, the AVOption defaults behavior changed, so an old lavc used with a new lavu will get completely messed up defaults. --- doc/APIchanges |2 +- libavutil/version.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index eed0f81..24defe4 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -8,7 +8,7 @@ libavfilter: 2012-06-22 libavformat: 2012-01-27 libavresample: 2012-10-05 libswscale:2011-06-20 -libavutil: 2011-04-18 +libavutil: 2012-10-22 API changes, most recent first: diff --git a/libavutil/version.h b/libavutil/version.h index d21f532..1bbebd9 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -36,8 +36,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 45 +#define LIBAVUTIL_VERSION_MAJOR 52 +#define LIBAVUTIL_VERSION_MINOR 0 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 5/8] Revert avutil: make some tables visible again
This reverts commit def8c94699877d015154a03d43e2b8f479cd89a0. After the major bump this is no longer necessary. --- libavutil/libavutil.v |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/libavutil.v b/libavutil/libavutil.v index c955347..e9f04cb 100644 --- a/libavutil/libavutil.v +++ b/libavutil/libavutil.v @@ -1,4 +1,4 @@ LIBAVUTIL_$MAJOR { -global: av*; ff_*_tab; +global: av*; local: *; }; -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 6/8] lavu: remove disabled FF_API_GET_BITS_PER_SAMPLE_FMT cruft
--- libavutil/samplefmt.c |8 libavutil/samplefmt.h |8 libavutil/version.h |3 --- 3 files changed, 19 deletions(-) diff --git a/libavutil/samplefmt.c b/libavutil/samplefmt.c index 4f6dfd7..389f726 100644 --- a/libavutil/samplefmt.c +++ b/libavutil/samplefmt.c @@ -98,14 +98,6 @@ int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt) 0 : sample_fmt_info[sample_fmt].bits 3; } -#if FF_API_GET_BITS_PER_SAMPLE_FMT -int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt) -{ -return sample_fmt 0 || sample_fmt = AV_SAMPLE_FMT_NB ? -0 : sample_fmt_info[sample_fmt].bits; -} -#endif - int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt) { if (sample_fmt 0 || sample_fmt = AV_SAMPLE_FMT_NB) diff --git a/libavutil/samplefmt.h b/libavutil/samplefmt.h index 0641c56..33cbded 100644 --- a/libavutil/samplefmt.h +++ b/libavutil/samplefmt.h @@ -111,14 +111,6 @@ enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt); */ char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt); -#if FF_API_GET_BITS_PER_SAMPLE_FMT -/** - * @deprecated Use av_get_bytes_per_sample() instead. - */ -attribute_deprecated -int av_get_bits_per_sample_fmt(enum AVSampleFormat sample_fmt); -#endif - /** * Return number of bytes per sample. * diff --git a/libavutil/version.h b/libavutil/version.h index 1bbebd9..be2b334 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -61,9 +61,6 @@ * @{ */ -#ifndef FF_API_GET_BITS_PER_SAMPLE_FMT -#define FF_API_GET_BITS_PER_SAMPLE_FMT (LIBAVUTIL_VERSION_MAJOR 52) -#endif #ifndef FF_API_FIND_OPT #define FF_API_FIND_OPT (LIBAVUTIL_VERSION_MAJOR 52) #endif -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 7/8] lavu: remove disabled avoptions cruft
--- libavutil/opt.c | 147 --- libavutil/opt.h | 76 -- libavutil/version.h |6 --- 3 files changed, 229 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index b1ccf9b..61a72d0 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -34,28 +34,6 @@ #include log.h #include mathematics.h -#if FF_API_FIND_OPT -//FIXME order them and do a bin search -const AVOption *av_find_opt(void *v, const char *name, const char *unit, int mask, int flags) -{ -AVClass *c= *(AVClass**)v; //FIXME silly way of storing AVClass -const AVOption *o= c-option; - -for (; o o-name; o++) { -if (!strcmp(o-name, name) (!unit || (o-unit !strcmp(o-unit, unit))) (o-flags mask) == flags) -return o; -} -return NULL; -} -#endif - -#if FF_API_OLD_AVOPTIONS -const AVOption *av_next_option(void *obj, const AVOption *last) -{ -return av_opt_next(obj, last); -} -#endif - const AVOption *av_opt_next(void *obj, const AVOption *last) { AVClass *class = *(AVClass**)obj; @@ -221,16 +199,6 @@ static int set_string_number(void *obj, const AVOption *o, const char *val, void return 0; } -#if FF_API_OLD_AVOPTIONS -int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out) -{ -const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); -if (o_out) -*o_out = o; -return av_opt_set(obj, name, val, 0); -} -#endif - int av_opt_set(void *obj, const char *name, const char *val, int search_flags) { void *dst, *target_obj; @@ -284,32 +252,6 @@ static int set_number(void *obj, const char *name, double num, int den, int64_t return write_number(obj, o, dst, num, den, intnum); } -#if FF_API_OLD_AVOPTIONS -const AVOption *av_set_double(void *obj, const char *name, double n) -{ -const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); -if (set_number(obj, name, n, 1, 1, 0) 0) -return NULL; -return o; -} - -const AVOption *av_set_q(void *obj, const char *name, AVRational n) -{ -const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); -if (set_number(obj, name, n.num, n.den, 1, 0) 0) -return NULL; -return o; -} - -const AVOption *av_set_int(void *obj, const char *name, int64_t n) -{ -const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); -if (set_number(obj, name, 1, 1, n, 0) 0) -return NULL; -return o; -} -#endif - int av_opt_set_int(void *obj, const char *name, int64_t val, int search_flags) { return set_number(obj, name, 1, 1, val, search_flags); @@ -354,46 +296,6 @@ int av_opt_set_bin(void *obj, const char *name, const uint8_t *val, int len, int return 0; } -#if FF_API_OLD_AVOPTIONS -/** - * - * @param buf a buffer which is used for returning non string values as strings, can be NULL - * @param buf_len allocated length in bytes of buf - */ -const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len) -{ -const AVOption *o = av_opt_find(obj, name, NULL, 0, 0); -void *dst; -uint8_t *bin; -int len, i; -if (!o) -return NULL; -if (o-type != AV_OPT_TYPE_STRING (!buf || !buf_len)) -return NULL; - -dst= ((uint8_t*)obj) + o-offset; -if (o_out) *o_out= o; - -switch (o-type) { -case AV_OPT_TYPE_FLAGS: snprintf(buf, buf_len, 0x%08X,*(int *)dst);break; -case AV_OPT_TYPE_INT: snprintf(buf, buf_len, %d , *(int *)dst);break; -case AV_OPT_TYPE_INT64: snprintf(buf, buf_len, %PRId64, *(int64_t*)dst);break; -case AV_OPT_TYPE_FLOAT: snprintf(buf, buf_len, %f , *(float *)dst);break; -case AV_OPT_TYPE_DOUBLE:snprintf(buf, buf_len, %f , *(double *)dst);break; -case AV_OPT_TYPE_RATIONAL: snprintf(buf, buf_len, %d/%d, ((AVRational*)dst)-num, ((AVRational*)dst)-den);break; -case AV_OPT_TYPE_STRING:return *(void**)dst; -case AV_OPT_TYPE_BINARY: -len = *(int*)(((uint8_t *)dst) + sizeof(uint8_t *)); -if (len = (buf_len + 1)/2) return NULL; -bin = *(uint8_t**)dst; -for (i = 0; i len; i++) snprintf(buf + i*2, 3, %02X, bin[i]); -break; -default: return NULL; -} -return buf; -} -#endif - int av_opt_get(void *obj, const char *name, int search_flags, uint8_t **out_val) { void *dst, *target_obj; @@ -459,44 +361,6 @@ error: return -1; } -#if FF_API_OLD_AVOPTIONS -double av_get_double(void *obj, const char *name, const AVOption **o_out) -{ -int64_t intnum=1; -double num=1; -int den=1; - -if (get_number(obj, name, o_out, num, den, intnum, 0) 0) -return NAN; -return num*intnum/den; -} - -AVRational av_get_q(void *obj, const char *name, const AVOption **o_out) -{ -int64_t intnum=1; -double num=1; -int den=1; - -if (get_number(obj, name, o_out, num, den, intnum, 0) 0) -return (AVRational){0, 0}; -if (num ==
Re: [libav-devel] [PATCH 1/8] APIchanges: update lavr bump date
On 10/22/2012 08:42 AM, Anton Khirnov wrote: --- doc/APIchanges |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index ed479df..eed0f81 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -6,7 +6,7 @@ libavcodec:2012-01-27 libavdevice: 2011-04-18 libavfilter: 2012-06-22 libavformat: 2012-01-27 -libavresample: 2012-04-24 +libavresample: 2012-10-05 libswscale:2011-06-20 libavutil: 2011-04-18 ok -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 01/16] atrac3: cosmetics: pretty-printing and renaming
On Sat, 20 Oct 2012, Justin Ruggles wrote: also does some minor refactoring. --- libavcodec/atrac3.c | 1059 +++ libavcodec/atrac3data.h | 98 +++-- 2 files changed, 572 insertions(+), 585 deletions(-) LGTM // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] libxvid: remove useless doxy comments.
--- libavcodec/libxvid.c | 27 --- 1 file changed, 27 deletions(-) diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 89021e7..dd1e3e3 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -340,14 +340,6 @@ static void xvid_correct_framerate(AVCodecContext *avctx) } } -/** - * Create the private context for the encoder. - * All buffers are allocated, settings are loaded from the user, - * and the encoder context created. - * - * @param avctx AVCodecContext pointer to context - * @return Returns 0 on success, -1 on failure - */ static av_cold int xvid_encode_init(AVCodecContext *avctx) { int xerr, i; int xvid_flags = avctx-flags; @@ -619,15 +611,6 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) { return 0; } -/** - * Encode a single frame. - * - * @param avctx AVCodecContext pointer to context - * @param frame Pointer to encoded frame buffer - * @param buf_size Size of encoded frame buffer - * @param data Pointer to AVFrame of unencoded frame - * @return Returns 0 on success, -1 on failure - */ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *picture, int *got_packet) { @@ -748,13 +731,6 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, } } -/** - * Destroy the private context for the encoder. - * All buffers are freed, and the Xvid encoder context is destroyed. - * - * @param avctx AVCodecContext pointer to context - * @return Returns 0, success guaranteed - */ static av_cold int xvid_encode_close(AVCodecContext *avctx) { struct xvid_context *x = avctx-priv_data; @@ -772,9 +748,6 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { return 0; } -/** - * Xvid codec definition for libavcodec. - */ AVCodec ff_libxvid_encoder = { .name = libxvid, .type = AVMEDIA_TYPE_VIDEO, -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] libxvid: remove useless doxy comments.
On 10/22/2012 09:20 AM, Anton Khirnov wrote: --- libavcodec/libxvid.c | 27 --- 1 file changed, 27 deletions(-) looks great -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] libxvid: remove useless doxy comments.
On Mon, Oct 22, 2012 at 03:20:49PM +0200, Anton Khirnov wrote: --- libavcodec/libxvid.c | 27 --- 1 file changed, 27 deletions(-) The changes itself do LGTM, but there is more Doxygen for purely file-internal stuff in there that should be converted to normal C comments IMO. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/4] pcmdec: use planar sample format for pcm_s16le_planar
On Sun, 14 Oct 2012 17:40:07 -0400, Justin Ruggles justin.rugg...@gmail.com wrote: --- libavcodec/pcm.c | 19 ++- 1 files changed, 10 insertions(+), 9 deletions(-) diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index c6c6bc0..da0e696 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -340,15 +340,16 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, break; case AV_CODEC_ID_PCM_S16LE_PLANAR: { -const uint8_t *src2[MAX_CHANNELS]; n /= avctx-channels; -for (c = 0; c avctx-channels; c++) -src2[c] = src[c * n * 2]; -for (; n 0; n--) -for (c = 0; c avctx-channels; c++) { -AV_WN16A(samples, bytestream_get_le16(src2[c])); -samples += 2; -} +for (c = 0; c avctx-channels; c++) { +samples = s-frame.extended_data[c]; +#if HAVE_BIGENDIAN +DECODE(16, le16, src, samples, n, 0, 0) +#else +memcpy(samples, src, n * 2); +#endif +src += n * 2; +} break; } case AV_CODEC_ID_PCM_U16LE: @@ -527,7 +528,7 @@ PCM_CODEC (AV_CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, PCM_CODEC (AV_CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, PCM signed 8-bit); PCM_CODEC (AV_CODEC_ID_PCM_S16BE,AV_SAMPLE_FMT_S16, pcm_s16be, PCM signed 16-bit big-endian); PCM_CODEC (AV_CODEC_ID_PCM_S16LE,AV_SAMPLE_FMT_S16, pcm_s16le, PCM signed 16-bit little-endian); -PCM_DECODER(AV_CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar, PCM 16-bit little-endian planar); +PCM_DECODER(AV_CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P, pcm_s16le_planar, PCM 16-bit little-endian planar); PCM_CODEC (AV_CODEC_ID_PCM_S24BE,AV_SAMPLE_FMT_S32, pcm_s24be, PCM signed 24-bit big-endian); PCM_CODEC (AV_CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, PCM D-Cinema audio signed 24-bit); PCM_CODEC (AV_CODEC_ID_PCM_S24LE,AV_SAMPLE_FMT_S32, pcm_s24le, PCM signed 24-bit little-endian); -- 1.7.1 Looks ok. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/8] lavu: bump major to 52
On Mon, Oct 22, 2012 at 2:42 PM, Anton Khirnov an...@khirnov.net wrote: In addition to the recent tables mess, the AVOption defaults behavior changed, so an old lavc used with a new lavu will get completely messed up defaults. --- doc/APIchanges |2 +- libavutil/version.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index eed0f81..24defe4 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -8,7 +8,7 @@ libavfilter: 2012-06-22 libavformat: 2012-01-27 libavresample: 2012-10-05 libswscale:2011-06-20 -libavutil: 2011-04-18 +libavutil: 2012-10-22 API changes, most recent first: diff --git a/libavutil/version.h b/libavutil/version.h index d21f532..1bbebd9 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -36,8 +36,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 45 +#define LIBAVUTIL_VERSION_MAJOR 52 +#define LIBAVUTIL_VERSION_MINOR 0 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ Justin, didn't you want to defer some FF_API removals for release 9 to release 10? Or did I misunderstand you? -- regards, Reinhard ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 4/8] Revert avutil: Add a copy of ff_sqrt_tab back into avutil to restore ABI compatibility
On Mon, Oct 22, 2012 at 2:42 PM, Anton Khirnov an...@khirnov.net wrote: This reverts commit d15c21e5fa3961f10026da1a3080a3aa3cf4cec9. After the major bump this is no longer necessary. --- libavcodec/Makefile |1 - libavcodec/mathtables.c | 11 +++ libavcodec/sqrt_tab.c | 30 -- libavutil/Makefile |1 - libavutil/sqrt_tab.c|1 - 5 files changed, 11 insertions(+), 33 deletions(-) delete mode 100644 libavcodec/sqrt_tab.c delete mode 100644 libavutil/sqrt_tab.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 2772522..d8c853a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -30,7 +30,6 @@ OBJS = allcodecs.o \ resample.o \ resample2.o \ simple_idct.o\ - sqrt_tab.o \ utils.o \ # parts needed for many different codecs diff --git a/libavcodec/mathtables.c b/libavcodec/mathtables.c index 12877b2..141aa78 100644 --- a/libavcodec/mathtables.c +++ b/libavcodec/mathtables.c @@ -56,6 +56,17 @@ const uint32_t ff_inverse[257]={ 16777216 }; +const uint8_t ff_sqrt_tab[256]={ + 0, 16, 23, 28, 32, 36, 40, 43, 46, 48, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, + 91, 92, 94, 95, 96, 98, 99,100,102,103,104,105,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127, +128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,144,145,146,147,148,149,150,151,151,152,153,154,155,156,156, +157,158,159,160,160,161,162,163,164,164,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,176,177,178,179,179,180,181, +182,182,183,184,184,185,186,186,187,188,188,189,190,190,191,192,192,193,194,194,195,196,196,197,198,198,199,200,200,201,202,202, +203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,213,214,215,215,216,216,217,218,218,219,219,220,220,221,222, +222,223,223,224,224,225,226,226,227,227,228,228,229,230,230,231,231,232,232,233,233,234,235,235,236,236,237,237,238,238,239,239, +240,240,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,254,255,255,255 +}; + const uint8_t ff_reverse[256] = { 0x00,0x80,0x40,0xC0,0x20,0xA0,0x60,0xE0,0x10,0x90,0x50,0xD0,0x30,0xB0,0x70,0xF0, 0x08,0x88,0x48,0xC8,0x28,0xA8,0x68,0xE8,0x18,0x98,0x58,0xD8,0x38,0xB8,0x78,0xF8, diff --git a/libavcodec/sqrt_tab.c b/libavcodec/sqrt_tab.c deleted file mode 100644 index 3f18d91..000 --- a/libavcodec/sqrt_tab.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include stdint.h - -const uint8_t ff_sqrt_tab[256]={ - 0, 16, 23, 28, 32, 36, 40, 43, 46, 48, 51, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 77, 79, 80, 82, 84, 85, 87, 88, 90, - 91, 92, 94, 95, 96, 98, 99,100,102,103,104,105,107,108,109,110,111,112,114,115,116,117,118,119,120,121,122,123,124,125,126,127, -128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,144,145,146,147,148,149,150,151,151,152,153,154,155,156,156, -157,158,159,160,160,161,162,163,164,164,165,166,167,168,168,169,170,171,171,172,173,174,174,175,176,176,177,178,179,179,180,181, -182,182,183,184,184,185,186,186,187,188,188,189,190,190,191,192,192,193,194,194,195,196,196,197,198,198,199,200,200,201,202,202, -203,204,204,205,205,206,207,207,208,208,209,210,210,211,212,212,213,213,214,215,215,216,216,217,218,218,219,219,220,220,221,222, -222,223,223,224,224,225,226,226,227,227,228,228,229,230,230,231,231,232,232,233,233,234,235,235,236,236,237,237,238,238,239,239, -240,240,241,242,242,243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,251,252,252,253,253,254,254,255,255,255 -}; diff --git a/libavutil/Makefile b/libavutil/Makefile index 3451a7c..227a57e 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -84,7 +84,6 @@ OBJS = adler32.o
Re: [libav-devel] [PATCH 3/8] lavu: bump major to 52
On Mon, Oct 22, 2012 at 4:10 PM, Reinhard Tartler siret...@gmail.com wrote: On Mon, Oct 22, 2012 at 2:42 PM, Anton Khirnov an...@khirnov.net wrote: In addition to the recent tables mess, the AVOption defaults behavior changed, so an old lavc used with a new lavu will get completely messed up defaults. --- doc/APIchanges |2 +- libavutil/version.h |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index eed0f81..24defe4 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -8,7 +8,7 @@ libavfilter: 2012-06-22 libavformat: 2012-01-27 libavresample: 2012-10-05 libswscale:2011-06-20 -libavutil: 2011-04-18 +libavutil: 2012-10-22 API changes, most recent first: diff --git a/libavutil/version.h b/libavutil/version.h index d21f532..1bbebd9 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -36,8 +36,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 51 -#define LIBAVUTIL_VERSION_MINOR 45 +#define LIBAVUTIL_VERSION_MAJOR 52 +#define LIBAVUTIL_VERSION_MINOR 0 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ Justin, didn't you want to defer some FF_API removals for release 9 to release 10? Or did I misunderstand you? ah, never mind, Anton did that in 2/8 of his patchset. sorry for the noise. -- regards, Reinhard ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/4] rtmppkt: Escape backslash in Doxygen comment
--- libavformat/rtmppkt.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 8932cac..cc35863 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -253,7 +253,7 @@ int ff_amf_read_number(GetByteContext *gbc, double *val); /** * Read AMF string value. * - * Appends a trailing \0 to output string in order to + * Appends a trailing \\0 to output string in order to * ease later parsing. * *@param[in,out] gbc GetByteContext initialized with AMF-formatted data -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/4] doxygen: Build Doxygen documentation in the doc/ subdirectory
--- .gitignore |2 +- Doxyfile |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8589127..3ed55b3 100644 --- a/.gitignore +++ b/.gitignore @@ -28,8 +28,8 @@ /doc/*.pod /doc/avoptions_codec.texi /doc/avoptions_format.texi +/doc/doxy/html/ /doc/print_options -/doxy/ /libavcodec/*_tablegen /libavcodec/*_tables.c /libavcodec/*_tables.h diff --git a/Doxyfile b/Doxyfile index 8e0dcf3..1b4e7d5 100644 --- a/Doxyfile +++ b/Doxyfile @@ -44,7 +44,7 @@ PROJECT_LOGO = # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. -OUTPUT_DIRECTORY = doxy +OUTPUT_DIRECTORY = doc/doxy # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/4] Move Doxyfile into the doc/ subdirectory
--- Doxyfile = doc/Doxyfile |0 1 files changed, 0 insertions(+), 0 deletions(-) rename Doxyfile = doc/Doxyfile (100%) diff --git a/Doxyfile b/doc/Doxyfile similarity index 100% rename from Doxyfile rename to doc/Doxyfile -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 4/4] doxygen: Add av_alloc_size to list of predefined macros
This avoids Doxygen believing the attribute is the function name. --- doc/Doxyfile |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/doc/Doxyfile b/doc/Doxyfile index 1b4e7d5..6fd0bd9 100644 --- a/doc/Doxyfile +++ b/doc/Doxyfile @@ -1381,7 +1381,8 @@ PREDEFINED = __attribute__(x)= \ HAVE_MMXEXT \ HAVE_AMD3DNOW \ DECLARE_ALIGNED(a,t,n)=t n \ - offsetof(x,y)=0x42 + offsetof(x,y)=0x42 \ + av_alloc_size \ # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Improve wording and spelling of av_log_missing_feature messages.
On 10/22/2012 02:36 PM, Diego Biurrun wrote: --- libavcodec/aacdec.c|4 ++-- libavcodec/aacsbr.c|4 ++-- libavcodec/eac3dec.c |2 +- libavcodec/flacdec.c |2 +- libavcodec/flashsv.c |2 +- libavcodec/proresdec.c |2 +- libavcodec/wmalosslessdec.c|4 ++-- libavcodec/wmavoice.c |2 +- libavformat/oggparseskeleton.c |2 +- libavformat/spdifdec.c |4 ++-- 10 files changed, 14 insertions(+), 14 deletions(-) Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/4] rtmppkt: Escape backslash in Doxygen comment
Diego Biurrun di...@biurrun.de writes: --- libavformat/rtmppkt.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavformat/rtmppkt.h b/libavformat/rtmppkt.h index 8932cac..cc35863 100644 --- a/libavformat/rtmppkt.h +++ b/libavformat/rtmppkt.h @@ -253,7 +253,7 @@ int ff_amf_read_number(GetByteContext *gbc, double *val); /** * Read AMF string value. * - * Appends a trailing \0 to output string in order to + * Appends a trailing \\0 to output string in order to * ease later parsing. * *@param[in,out] gbc GetByteContext initialized with AMF-formatted data -- Isn't there some flag one can give doxygen to not treat \ specially? If not, I'd prefer replacing it with null byte in the description. That comment is far more likely to be read in the code than as html, so it should be kept in a format that doesn't require mentally parsing escape sequences. With your change, a reader might think it inserts a literal backslash followed by a zero into the buffer. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] mp3dec: Propagate error code from mp_decode_layer*() in mp_decode_frame()
From: Michael Niedermayer michae...@gmx.at --- libavcodec/mpegaudiodec.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 9c5ef26..572f074 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1598,6 +1598,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, s-last_buf_size += i; } +if (nb_frames 0) +return nb_frames; + /* get output buffer */ if (!samples) { s-frame.nb_samples = s-avctx-frame_size; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3dec: Propagate error code from mp_decode_layer*() in mp_decode_frame()
On 10/22/2012 05:02 PM, Diego Biurrun wrote: From: Michael Niedermayer michae...@gmx.at --- libavcodec/mpegaudiodec.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 9c5ef26..572f074 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1598,6 +1598,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, s-last_buf_size += i; } The default case in switch(s-layer) { might enjoy an earlier return IMHO. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] mpegaudiodec: Fix buffer handling on random access
On 10/22/2012 05:02 PM, Diego Biurrun wrote: From: Michael Niedermayer michae...@gmx.at --- This fixes artifacts when seeking in http://commondatastorage.googleapis.com/dalecurtis-shared/ironman2.mp3 libavcodec/mpegaudiodec.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 572f074..f0bfcb0 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1398,6 +1398,7 @@ static int mp_decode_layer3(MPADecodeContext *s) g = s-granules[ch][gr]; s-last_buf_size += g-part2_3_length; memset(g-sb_hybrid, 0, sizeof(g-sb_hybrid)); +compute_imdct(s, g, s-sb_samples[ch][18 * gr][0], s-mdct_buf[ch]); } } skip = s-last_buf_size - 8 * main_data_begin; Looks fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] mpegaudio: Refactor mp3on4 flush function
--- libavcodec/mpegaudiodec.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 80acdad..9c5ef26 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1681,11 +1681,15 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, return buf_size; } +static void mp_flush(MPADecodeContext *ctx) +{ +memset(ctx-synth_buf, 0, sizeof(ctx-synth_buf)); +ctx-last_buf_size = 0; +} + static void flush(AVCodecContext *avctx) { -MPADecodeContext *s = avctx-priv_data; -memset(s-synth_buf, 0, sizeof(s-synth_buf)); -s-last_buf_size = 0; +mp_flush(avctx-priv_data); } #if CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER @@ -1875,11 +1879,8 @@ static void flush_mp3on4(AVCodecContext *avctx) int i; MP3On4DecodeContext *s = avctx-priv_data; -for (i = 0; i s-frames; i++) { -MPADecodeContext *m = s-mp3decctx[i]; -memset(m-synth_buf, 0, sizeof(m-synth_buf)); -m-last_buf_size = 0; -} +for (i = 0; i s-frames; i++) +mp_flush(s-mp3decctx[i]); } -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3dec: Propagate error code from mp_decode_layer*() in mp_decode_frame()
On Mon, Oct 22, 2012 at 05:08:52PM +0200, Luca Barbato wrote: On 10/22/2012 05:02 PM, Diego Biurrun wrote: From: Michael Niedermayer michae...@gmx.at --- libavcodec/mpegaudiodec.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 9c5ef26..572f074 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1598,6 +1598,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, s-last_buf_size += i; } The default case in switch(s-layer) { might enjoy an earlier return IMHO. Patches welcome :) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] fate: Declare avcodec/avformat deps in the respective Makefile snippets
--- tests/Makefile |3 --- tests/fate/libavcodec.mak |1 + tests/fate/libavformat.mak |1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 1ef7a5e..1ec9b1a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -94,9 +94,6 @@ include $(SRC_PATH)/tests/fate/wma.mak FATE_AVCONV += $(FATE_AVCONV-yes) FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV) -FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) -FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT) - FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_AVCONV-yes) FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV) FATE_SAMPLES += $(FATE_SAMPLES-yes) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index 13ceb61..cba5eed 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -12,4 +12,5 @@ fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) fate-rangecoder: CMD = run libavcodec/rangecoder-test fate-rangecoder: CMP = null +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) fate-libavcodec: $(FATE_LIBAVCODEC) diff --git a/tests/fate/libavformat.mak b/tests/fate/libavformat.mak index 9e5a9f0..b6eda42 100644 --- a/tests/fate/libavformat.mak +++ b/tests/fate/libavformat.mak @@ -2,4 +2,5 @@ FATE_LIBAVFORMAT += fate-url fate-url: libavformat/url-test$(EXESUF) fate-url: CMD = run libavformat/url-test +FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT) fate-libavformat: $(FATE_LIBAVFORMAT) -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] fate: More fine-grained dependencies for libavcodec test programs
--- tests/fate/libavcodec.mak | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index cba5eed..e0c565b 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -1,16 +1,16 @@ -FATE_LIBAVCODEC += fate-golomb +FATE_LIBAVCODEC-$(CONFIG_GOLOMB) += fate-golomb fate-golomb: libavcodec/golomb-test$(EXESUF) fate-golomb: CMD = run libavcodec/golomb-test fate-golomb: CMP = null -FATE_LIBAVCODEC += fate-iirfilter +FATE_LIBAVCODEC-yes += fate-iirfilter fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) fate-iirfilter: CMD = run libavcodec/iirfilter-test -FATE_LIBAVCODEC += fate-rangecoder +FATE_LIBAVCODEC-$(CONFIG_RANGECODER) += fate-rangecoder fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) fate-rangecoder: CMD = run libavcodec/rangecoder-test fate-rangecoder: CMP = null -FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) -fate-libavcodec: $(FATE_LIBAVCODEC) +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC-yes) +fate-libavcodec: $(FATE_LIBAVCODEC-yes) -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] fate: Declare avcodec/avformat deps in the respective Makefile snippets
Diego Biurrun di...@biurrun.de writes: --- tests/Makefile |3 --- tests/fate/libavcodec.mak |1 + tests/fate/libavformat.mak |1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 1ef7a5e..1ec9b1a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -94,9 +94,6 @@ include $(SRC_PATH)/tests/fate/wma.mak FATE_AVCONV += $(FATE_AVCONV-yes) FATE-$(CONFIG_AVCONV) += $(FATE_AVCONV) -FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) -FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT) - FATE_SAMPLES_AVCONV += $(FATE_SAMPLES_AVCONV-yes) FATE_SAMPLES-$(CONFIG_AVCONV) += $(FATE_SAMPLES_AVCONV) FATE_SAMPLES += $(FATE_SAMPLES-yes) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index 13ceb61..cba5eed 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -12,4 +12,5 @@ fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) fate-rangecoder: CMD = run libavcodec/rangecoder-test fate-rangecoder: CMP = null +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) fate-libavcodec: $(FATE_LIBAVCODEC) diff --git a/tests/fate/libavformat.mak b/tests/fate/libavformat.mak index 9e5a9f0..b6eda42 100644 --- a/tests/fate/libavformat.mak +++ b/tests/fate/libavformat.mak @@ -2,4 +2,5 @@ FATE_LIBAVFORMAT += fate-url fate-url: libavformat/url-test$(EXESUF) fate-url: CMD = run libavformat/url-test +FATE-$(CONFIG_AVFORMAT) += $(FATE_LIBAVFORMAT) fate-libavformat: $(FATE_LIBAVFORMAT) -- OK -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] fate: aac: Place LATM tests and general AAC tests in different groups
--- tests/fate/aac.mak | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 9d52dae..ddd9fe7 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -46,7 +46,7 @@ FATE_AAC += fate-aac-al_sbr_ps_06_ur fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4 fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16 -FATE_AAC += fate-aac-latm_1180bc60 +FATE_AAC_LATM += fate-aac-latm_1180bc60 fate-aac-latm_1180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_1180bc60.mpg fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16 @@ -54,7 +54,7 @@ FATE_AAC += fate-aac-ap05_48 fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16 -FATE_AAC += fate-aac-latm_stereo_to_51 +FATE_AAC_LATM += fate-aac-latm_stereo_to_51 fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1 fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16 @@ -71,7 +71,10 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp \ FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) -FATE_SAMPLES_AVCONV += $(FATE_AAC) -fate-aac: $(FATE_AAC) -$(FATE_AAC): CMP = oneoff -$(FATE_AAC): FUZZ = 2 +$(FATE_AAC) $(FATE_AAC_LATM): CMP = oneoff +$(FATE_AAC) $(FATE_AAC_LATM): FUZZ = 2 + +FATE_SAMPLES_AVCONV += $(FATE_AAC) $(FATE_AAC_LATM) + +fate-aac: $(FATE_AAC) $(FATE_AAC_LATM) +fate-aac-latm: $(FATE_AAC_LATM) -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] fate: More fine-grained dependencies for libavcodec test programs
Diego Biurrun di...@biurrun.de writes: --- tests/fate/libavcodec.mak | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fate/libavcodec.mak b/tests/fate/libavcodec.mak index cba5eed..e0c565b 100644 --- a/tests/fate/libavcodec.mak +++ b/tests/fate/libavcodec.mak @@ -1,16 +1,16 @@ -FATE_LIBAVCODEC += fate-golomb +FATE_LIBAVCODEC-$(CONFIG_GOLOMB) += fate-golomb fate-golomb: libavcodec/golomb-test$(EXESUF) fate-golomb: CMD = run libavcodec/golomb-test fate-golomb: CMP = null -FATE_LIBAVCODEC += fate-iirfilter +FATE_LIBAVCODEC-yes += fate-iirfilter fate-iirfilter: libavcodec/iirfilter-test$(EXESUF) fate-iirfilter: CMD = run libavcodec/iirfilter-test -FATE_LIBAVCODEC += fate-rangecoder +FATE_LIBAVCODEC-$(CONFIG_RANGECODER) += fate-rangecoder fate-rangecoder: libavcodec/rangecoder-test$(EXESUF) fate-rangecoder: CMD = run libavcodec/rangecoder-test fate-rangecoder: CMP = null -FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC) -fate-libavcodec: $(FATE_LIBAVCODEC) +FATE-$(CONFIG_AVCODEC) += $(FATE_LIBAVCODEC-yes) +fate-libavcodec: $(FATE_LIBAVCODEC-yes) -- OK -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] fate: aac: Place LATM tests and general AAC tests in different groups
Diego Biurrun di...@biurrun.de writes: --- tests/fate/aac.mak | 15 +-- 1 files changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 9d52dae..ddd9fe7 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -46,7 +46,7 @@ FATE_AAC += fate-aac-al_sbr_ps_06_ur fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4 fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16 -FATE_AAC += fate-aac-latm_1180bc60 +FATE_AAC_LATM += fate-aac-latm_1180bc60 fate-aac-latm_1180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_1180bc60.mpg fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16 @@ -54,7 +54,7 @@ FATE_AAC += fate-aac-ap05_48 fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16 -FATE_AAC += fate-aac-latm_stereo_to_51 +FATE_AAC_LATM += fate-aac-latm_stereo_to_51 fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1 fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16 @@ -71,7 +71,10 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp \ FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) -FATE_SAMPLES_AVCONV += $(FATE_AAC) -fate-aac: $(FATE_AAC) -$(FATE_AAC): CMP = oneoff -$(FATE_AAC): FUZZ = 2 +$(FATE_AAC) $(FATE_AAC_LATM): CMP = oneoff +$(FATE_AAC) $(FATE_AAC_LATM): FUZZ = 2 + +FATE_SAMPLES_AVCONV += $(FATE_AAC) $(FATE_AAC_LATM) + +fate-aac: $(FATE_AAC) $(FATE_AAC_LATM) +fate-aac-latm: $(FATE_AAC_LATM) -- Why not add something like FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM)? That will save some duplication. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] fate: Add dependencies for audio tests
--- tests/fate/audio.mak | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 86f78dd..7e08c2a 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -1,44 +1,44 @@ -FATE_BINKAUDIO += fate-binkaudio-dct +FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_DCT) += fate-binkaudio-dct fate-binkaudio-dct: CMD = pcm -i $(SAMPLES)/bink/binkaudio_dct.bik fate-binkaudio-dct: REF = $(SAMPLES)/bink/binkaudio_dct.pcm fate-binkaudio-dct: FUZZ = 2 -FATE_BINKAUDIO += fate-binkaudio-rdft +FATE_BINKAUDIO-$(call DEMDEC, BINK, BINKAUDIO_RDFT) += fate-binkaudio-rdft fate-binkaudio-rdft: CMD = pcm -i $(SAMPLES)/bink/binkaudio_rdft.bik fate-binkaudio-rdft: REF = $(SAMPLES)/bink/binkaudio_rdft.pcm fate-binkaudio-rdft: FUZZ = 2 -$(FATE_BINKAUDIO): CMP = oneoff +$(FATE_BINKAUDIO-yes): CMP = oneoff -FATE_SAMPLES_AVCONV += $(FATE_BINKAUDIO) -fate-binkaudio: $(FATE_BINKAUDIO) +FATE_SAMPLES_AVCONV += $(FATE_BINKAUDIO-yes) +fate-binkaudio: $(FATE_BINKAUDIO-yes) -FATE_SAMPLES_AVCONV += fate-bmv-audio +FATE_SAMPLES_AVCONV-$(call DEMDEC, BMV, BMV_AUDIO) += fate-bmv-audio fate-bmv-audio: CMD = framecrc -i $(SAMPLES)/bmv/SURFING-partial.BMV -vn -FATE_SAMPLES_AVCONV += fate-delphine-cin-audio +FATE_SAMPLES_AVCONV-$(call DEMDEC, DSICIN, DSICINAUDIO) += fate-delphine-cin-audio fate-delphine-cin-audio: CMD = framecrc -i $(SAMPLES)/delphine-cin/LOGO-partial.CIN -vn -FATE_SAMPLES_AVCONV += fate-dts +FATE_SAMPLES_AVCONV-$(call DEMDEC, MPEGTS, DCA) += fate-dts fate-dts: CMD = pcm -i $(SAMPLES)/dts/dts.ts fate-dts: CMP = oneoff fate-dts: REF = $(SAMPLES)/dts/dts.pcm -FATE_SAMPLES_AVCONV += fate-imc +FATE_SAMPLES_AVCONV-$(call DEMDEC, AVI, IMC) += fate-imc fate-imc: CMD = pcm -i $(SAMPLES)/imc/imc.avi fate-imc: CMP = oneoff fate-imc: REF = $(SAMPLES)/imc/imc.pcm -FATE_SAMPLES_AVCONV += fate-nellymoser +FATE_SAMPLES_AVCONV-$(call DEMDEC, FLV, NELLYMOSER) += fate-nellymoser fate-nellymoser: CMD = pcm -i $(SAMPLES)/nellymoser/nellymoser.flv fate-nellymoser: CMP = oneoff fate-nellymoser: REF = $(SAMPLES)/nellymoser/nellymoser.pcm -FATE_SAMPLES_AVCONV += fate-sierra-vmd-audio +FATE_SAMPLES_AVCONV-$(call DEMDEC, VMD, VMDAUDIO) += fate-sierra-vmd-audio fate-sierra-vmd-audio: CMD = framecrc -i $(SAMPLES)/vmd/12.vmd -vn -FATE_SAMPLES_AVCONV += fate-smacker-audio +FATE_SAMPLES_AVCONV-$(call DEMDEC, SMACKER, SMACKAUD) += fate-smacker-audio fate-smacker-audio: CMD = framecrc -i $(SAMPLES)/smacker/wetlogo.smk -vn -FATE_SAMPLES_AVCONV += fate-ws_snd +FATE_SAMPLES_AVCONV-$(call DEMDEC, WSVQA, WS_SND1) += fate-ws_snd fate-ws_snd: CMD = md5 -i $(SAMPLES)/vqa/ws_snd.vqa -f s16le -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] fate: Add dependencies for audio tests
Diego Biurrun di...@biurrun.de writes: --- tests/fate/audio.mak | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) LGTM, did not verify component names. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] fate: Add dependencies for aac, alac, amrnb, amrwb, atrac tests
--- tests/fate/aac.mak | 15 +-- tests/fate/alac.mak |2 +- tests/fate/amrnb.mak |2 +- tests/fate/amrwb.mak |2 +- tests/fate/atrac.mak | 12 +++- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 0368798..1ef3641 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -71,12 +71,15 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp \ FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) -FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM) +FATE_AAC-$(call DEMDEC, MOV,AAC) += $(FATE_AAC) +FATE_AAC_LATM-$(call DEMDEC, MPEGTS, AAC_LATM) += $(FATE_AAC_LATM) -$(FATE_AAC_ALL): CMP = oneoff -$(FATE_AAC_ALL): FUZZ = 2 +FATE_AAC_ALL-yes = $(FATE_AAC-yes) $(FATE_AAC_LATM-yes) -FATE_SAMPLES_AVCONV += $(FATE_AAC_ALL) +$(FATE_AAC_ALL-yes): CMP = oneoff +$(FATE_AAC_ALL-yes): FUZZ = 2 -fate-aac: $(FATE_AAC_ALL) -fate-aac-latm: $(FATE_AAC_LATM) +FATE_SAMPLES_AVCONV += $(FATE_AAC_ALL-yes) + +fate-aac: $(FATE_AAC_ALL-yes) +fate-aac-latm: $(FATE_AAC_LATM-yes) diff --git a/tests/fate/alac.mak b/tests/fate/alac.mak index b55b594..814a5b7 100644 --- a/tests/fate/alac.mak +++ b/tests/fate/alac.mak @@ -11,5 +11,5 @@ fate-alac-%: CMD = enc_dec_pcm mov wav s16le $(REF) -c alac $(OPTS) fate-alac-%: CMP = oneoff fate-alac-%: FUZZ = 0 -FATE_SAMPLES_AVCONV += $(FATE_ALAC) +FATE_SAMPLES_AVCONV-$(call ENCDEC, ALAC, MOV) += $(FATE_ALAC) fate-alac: $(FATE_ALAC) diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak index 6e3f2a4..6dbba58 100644 --- a/tests/fate/amrnb.mak +++ b/tests/fate/amrnb.mak @@ -32,5 +32,5 @@ fate-amrnb-12k2: REF = $(SAMPLES)/amrnb/12.2k.pcm $(FATE_AMRNB): CMP = stddev -FATE_SAMPLES_AVCONV += $(FATE_AMRNB) +FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRNB) += $(FATE_AMRNB) fate-amrnb: $(FATE_AMRNB) diff --git a/tests/fate/amrwb.mak b/tests/fate/amrwb.mak index 0b7be72..99c2737 100644 --- a/tests/fate/amrwb.mak +++ b/tests/fate/amrwb.mak @@ -43,5 +43,5 @@ fate-amrwb-23k85-2: REF = $(SAMPLES)/amrwb/deus-23k85.pcm $(FATE_AMRWB): CMP = stddev -FATE_SAMPLES_AVCONV += $(FATE_AMRWB) +FATE_SAMPLES_AVCONV-$(call DEMDEC, AMR, AMRWB) += $(FATE_AMRWB) fate-amrwb: $(FATE_AMRWB) diff --git a/tests/fate/atrac.mak b/tests/fate/atrac.mak index fde4647..a71c1f8 100644 --- a/tests/fate/atrac.mak +++ b/tests/fate/atrac.mak @@ -1,4 +1,4 @@ -FATE_ATRAC1 += fate-atrac1 +FATE_ATRAC1-$(call DEMDEC, AEA, ATRAC1) += fate-atrac1 fate-atrac1: CMD = pcm -i $(SAMPLES)/atrac1/test_tones_small.aea fate-atrac1: REF = $(SAMPLES)/atrac1/test_tones_small.pcm @@ -14,9 +14,11 @@ FATE_ATRAC3 += fate-atrac3-3 fate-atrac3-3: CMD = pcm -i $(SAMPLES)/atrac3/mc_sich_at3_132_small.wav fate-atrac3-3: REF = $(SAMPLES)/atrac3/mc_sich_at3_132_small.pcm -$(FATE_ATRAC1) $(FATE_ATRAC3): CMP = oneoff +FATE_ATRAC3-$(call DEMDEC, WAV, ATRAC3) += $(FATE_ATRAC3) -FATE_SAMPLES_AVCONV += $(FATE_ATRAC1) $(FATE_ATRAC3) +$(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes): CMP = oneoff -fate-atrac: $(FATE_ATRAC1) $(FATE_ATRAC3) -fate-atrac3: $(FATE_ATRAC3) +FATE_SAMPLES_AVCONV += $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) + +fate-atrac: $(FATE_ATRAC1-yes) $(FATE_ATRAC3-yes) +fate-atrac3: $(FATE_ATRAC3-yes) -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] fate: aac: Place LATM tests and general AAC tests in different groups
--- tests/fate/aac.mak | 17 +++-- 1 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 9d52dae..0368798 100644 --- a/tests/fate/aac.mak +++ b/tests/fate/aac.mak @@ -46,7 +46,7 @@ FATE_AAC += fate-aac-al_sbr_ps_06_ur fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4 fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16 -FATE_AAC += fate-aac-latm_1180bc60 +FATE_AAC_LATM += fate-aac-latm_1180bc60 fate-aac-latm_1180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_1180bc60.mpg fate-aac-latm_1180bc60: REF = $(SAMPLES)/aac/latm_1180bc60.s16 @@ -54,7 +54,7 @@ FATE_AAC += fate-aac-ap05_48 fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4 fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16 -FATE_AAC += fate-aac-latm_stereo_to_51 +FATE_AAC_LATM += fate-aac-latm_stereo_to_51 fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1 fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16 @@ -71,7 +71,12 @@ FATE_AAC_CT = sbr_bc-ps_i.3gp \ FATE_AAC += $(FATE_AAC_CT:%=fate-aac-ct-%) -FATE_SAMPLES_AVCONV += $(FATE_AAC) -fate-aac: $(FATE_AAC) -$(FATE_AAC): CMP = oneoff -$(FATE_AAC): FUZZ = 2 +FATE_AAC_ALL = $(FATE_AAC) $(FATE_AAC_LATM) + +$(FATE_AAC_ALL): CMP = oneoff +$(FATE_AAC_ALL): FUZZ = 2 + +FATE_SAMPLES_AVCONV += $(FATE_AAC_ALL) + +fate-aac: $(FATE_AAC_ALL) +fate-aac-latm: $(FATE_AAC_LATM) -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] mpegaudio: Refactor mp3on4 flush function
On 10/22/2012 11:15 AM, Diego Biurrun wrote: --- libavcodec/mpegaudiodec.c | 17 + 1 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 80acdad..9c5ef26 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1681,11 +1681,15 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, return buf_size; } +static void mp_flush(MPADecodeContext *ctx) +{ +memset(ctx-synth_buf, 0, sizeof(ctx-synth_buf)); +ctx-last_buf_size = 0; +} + static void flush(AVCodecContext *avctx) { -MPADecodeContext *s = avctx-priv_data; -memset(s-synth_buf, 0, sizeof(s-synth_buf)); -s-last_buf_size = 0; +mp_flush(avctx-priv_data); } #if CONFIG_MP3ADU_DECODER || CONFIG_MP3ADUFLOAT_DECODER @@ -1875,11 +1879,8 @@ static void flush_mp3on4(AVCodecContext *avctx) int i; MP3On4DecodeContext *s = avctx-priv_data; -for (i = 0; i s-frames; i++) { -MPADecodeContext *m = s-mp3decctx[i]; -memset(m-synth_buf, 0, sizeof(m-synth_buf)); -m-last_buf_size = 0; -} +for (i = 0; i s-frames; i++) +mp_flush(s-mp3decctx[i]); } LGTM -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] atrac3: return an error if extradata_size is not a specific known size
Also fixes 3 compiler warnings about using uninitialized variables. --- libavcodec/atrac3.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 9cf9892..5bf992f 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -912,6 +912,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) } else { av_log(NULL, AV_LOG_ERROR, Unknown extradata size %d.\n, avctx-extradata_size); +return AVERROR(EINVAL); } /* Check the extradata */ -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] atrac3: return an error if extradata_size is not a specific known size
On Mon, Oct 22, 2012 at 12:03:04PM -0400, Justin Ruggles wrote: Also fixes 3 compiler warnings about using uninitialized variables. --- libavcodec/atrac3.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 9cf9892..5bf992f 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -912,6 +912,7 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx) } else { av_log(NULL, AV_LOG_ERROR, Unknown extradata size %d.\n, avctx-extradata_size); +return AVERROR(EINVAL); } /* Check the extradata */ -- LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
From: Michael Niedermayer michae...@gmx.at Properly forward mp_decode_layer3 errors. --- libavcodec/mpegaudiodec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 80acdad..5265ff8 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; + s-last_buf_size=0; if (s-in_gb.buffer) { align_get_bits(s-gb); -- 1.7.12 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] mp3: properly forward mp_decode_frame errors
The function can return either a parsing error or a memory management error. --- libavcodec/mpegaudiodec.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 5265ff8..5282235 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1635,7 +1635,7 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, int buf_size= avpkt-size; MPADecodeContext *s = avctx-priv_data; uint32_t header; -int out_size; +int ret; if (buf_size HEADER_SIZE) return AVERROR_INVALIDDATA; @@ -1664,21 +1664,22 @@ static int decode_frame(AVCodecContext * avctx, void *data, int *got_frame_ptr, buf_size= s-frame_size; } -out_size = mp_decode_frame(s, NULL, buf, buf_size); -if (out_size = 0) { +ret = mp_decode_frame(s, NULL, buf, buf_size); +if (ret = 0) { *got_frame_ptr = 1; *(AVFrame *)data = s-frame; avctx-sample_rate = s-sample_rate; //FIXME maybe move the other codec info stuff from above here too } else { av_log(avctx, AV_LOG_ERROR, Error while decoding MPEG audio frame.\n); -/* Only return an error if the bad frame makes up the whole packet. - If there is more data in the packet, just consume the bad frame - instead of returning an error, which would discard the whole - packet. */ +/* Only return an error if the bad frame makes up the whole packet or + * the error is related to buffer management. + * If there is more data in the packet, just consume the bad frame + * instead of returning an error, which would discard the whole + * packet. */ *got_frame_ptr = 0; -if (buf_size == avpkt-size) -return out_size; +if (buf_size == avpkt-size || ret != AVERROR_INVALIDDATA) +return ret; } s-frame_size = 0; return buf_size; @@ -1699,7 +1700,7 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data, int buf_size= avpkt-size; MPADecodeContext *s = avctx-priv_data; uint32_t header; -int len, out_size; +int len, ret; len = buf_size; @@ -1730,10 +1731,10 @@ static int decode_frame_adu(AVCodecContext *avctx, void *data, s-frame_size = len; -out_size = mp_decode_frame(s, NULL, buf, buf_size); -if (out_size 0) { +ret = mp_decode_frame(s, NULL, buf, buf_size); +if (ret 0) { av_log(avctx, AV_LOG_ERROR, Error while decoding MPEG audio frame.\n); -return AVERROR_INVALIDDATA; +return ret; } *got_frame_ptr = 1; @@ -1941,7 +1942,10 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data, } ch += m-nb_channels; -out_size += mp_decode_frame(m, outptr, buf, fsize); +if ((ret = mp_decode_frame(m, outptr, buf, fsize)) 0) +return ret; + +out_size += ret; buf += fsize; len -= fsize; -- 1.7.12 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] lzo: Use AV_COPY* where appropriate
--- libavutil/lzo.c | 28 1 files changed, 8 insertions(+), 20 deletions(-) diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 0d1ec55..a7fddc5 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -23,6 +23,7 @@ #include avutil.h #include common.h +#include intreadwrite.h #include lzo.h /// Define if we may write up to 12 bytes beyond the output buffer. @@ -71,19 +72,6 @@ static inline int get_len(LZOContext *c, int x, int mask) return cnt; } -//#define UNALIGNED_LOADSTORE -#define BUILTIN_MEMCPY -#ifdef UNALIGNED_LOADSTORE -#define COPY2(d, s) *(uint16_t *)(d) = *(uint16_t *)(s); -#define COPY4(d, s) *(uint32_t *)(d) = *(uint32_t *)(s); -#elif defined(BUILTIN_MEMCPY) -#define COPY2(d, s) memcpy(d, s, 2); -#define COPY4(d, s) memcpy(d, s, 4); -#else -#define COPY2(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; -#define COPY4(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; (d)[2] = (s)[2]; (d)[3] = (s)[3]; -#endif - /** * @brief Copies bytes from input to output buffer with checking. * @param cnt number of bytes to copy, must be = 0 @@ -101,7 +89,7 @@ static inline void copy(LZOContext *c, int cnt) c-error |= AV_LZO_OUTPUT_FULL; } #if defined(INBUF_PADDED) defined(OUTBUF_PADDED) -COPY4(dst, src); +AV_COPY32(dst, src); src += 4; dst += 4; cnt -= 4; @@ -145,16 +133,16 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) memset(dst, *src, cnt); } else { #ifdef OUTBUF_PADDED -COPY2(dst, src); -COPY2(dst + 2, src + 2); +AV_COPY16(dst, src); +AV_COPY16(dst + 2, src + 2); src += 4; dst += 4; cnt -= 4; if (cnt 0) { -COPY2(dst, src); -COPY2(dst + 2, src + 2); -COPY2(dst + 4, src + 4); -COPY2(dst + 6, src + 6); +AV_COPY16(dst, src); +AV_COPY16(dst + 2, src + 2); +AV_COPY16(dst + 4, src + 4); +AV_COPY16(dst + 6, src + 6); src += 8; dst += 8; cnt -= 8; -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] avutil: Move memcpy_backptr() to mem.c
The function is used elsewhere and does not belong with the LZO code. --- libavcodec/dfa.c |3 ++- libavcodec/eatgv.c|2 +- libavcodec/g723_1.c |2 +- libavcodec/lcldec.c |1 + libavcodec/wmavoice.c |2 +- libavcodec/xan.c |3 +-- libavcodec/xxan.c |3 +-- libavutil/lzo.c | 45 ++--- libavutil/lzo.h | 11 --- libavutil/mem.c | 40 libavutil/mem.h | 12 11 files changed, 62 insertions(+), 62 deletions(-) diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 39f0f64..fb751f6 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -24,7 +24,8 @@ #include bytestream.h #include libavutil/imgutils.h -#include libavutil/lzo.h // for av_memcpy_backptr +#include libavutil/lzo.h +#include libavutil/mem.h typedef struct DfaContext { AVFrame pic; diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index b29c994..3f1bfce 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -31,8 +31,8 @@ #include avcodec.h #define BITSTREAM_READER_LE #include get_bits.h -#include libavutil/lzo.h #include libavutil/imgutils.h +#include libavutil/mem.h #define EA_PREAMBLE_SIZE8 #define kVGT_TAG MKTAG('k', 'V', 'G', 'T') diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 3d4fa46..cfdfd0f 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -27,7 +27,7 @@ #define BITSTREAM_READER_LE #include libavutil/audioconvert.h -#include libavutil/lzo.h +#include libavutil/mem.h #include libavutil/opt.h #include avcodec.h #include get_bits.h diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 0de7410..855e1b1 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -45,6 +45,7 @@ #include bytestream.h #include lcl.h #include libavutil/lzo.h +#include libavutil/mem.h #if CONFIG_ZLIB_DECODER #include zlib.h diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 2ed79a6..41ec194 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -29,6 +29,7 @@ #include math.h +#include libavutil/mem.h #include dsputil.h #include avcodec.h #include get_bits.h @@ -38,7 +39,6 @@ #include acelp_vectors.h #include acelp_filters.h #include lsp.h -#include libavutil/lzo.h #include dct.h #include rdft.h #include sinewin.h diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 586320b..e6bfc0d 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -33,12 +33,11 @@ #include string.h #include libavutil/intreadwrite.h +#include libavutil/mem.h #include avcodec.h #include bytestream.h #define BITSTREAM_READER_LE #include get_bits.h -// for av_memcpy_backptr -#include libavutil/lzo.h #define RUNTIME_GAMMA 0 diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index b06d314..2a5a8ca 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -22,11 +22,10 @@ #include avcodec.h #include libavutil/intreadwrite.h +#include libavutil/mem.h #include bytestream.h #define BITSTREAM_READER_LE #include get_bits.h -// for av_memcpy_backptr -#include libavutil/lzo.h typedef struct XanContext { AVCodecContext *avctx; diff --git a/libavutil/lzo.c b/libavutil/lzo.c index a7fddc5..cdd3624 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -19,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include stdint.h #include string.h #include avutil.h @@ -100,8 +101,6 @@ static inline void copy(LZOContext *c, int cnt) c-out = dst + cnt; } -static inline void memcpy_backptr(uint8_t *dst, int back, int cnt); - /** * @brief Copies previously decoded bytes to current position. * @param back how many bytes back we start @@ -122,50 +121,10 @@ static inline void copy_backptr(LZOContext *c, int back, int cnt) cnt = FFMAX(c-out_end - dst, 0); c-error |= AV_LZO_OUTPUT_FULL; } -memcpy_backptr(dst, back, cnt); +av_memcpy_backptr(dst, back, cnt); c-out = dst + cnt; } -static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) -{ -const uint8_t *src = dst[-back]; -if (back == 1) { -memset(dst, *src, cnt); -} else { -#ifdef OUTBUF_PADDED -AV_COPY16(dst, src); -AV_COPY16(dst + 2, src + 2); -src += 4; -dst += 4; -cnt -= 4; -if (cnt 0) { -AV_COPY16(dst, src); -AV_COPY16(dst + 2, src + 2); -AV_COPY16(dst + 4, src + 4); -AV_COPY16(dst + 6, src + 6); -src += 8; -dst += 8; -cnt -= 8; -} -#endif -if (cnt 0) { -int blocklen = back; -while (cnt blocklen) { -memcpy(dst, src, blocklen); -dst += blocklen; -cnt -= blocklen; -blocklen = 1; -} -memcpy(dst, src, cnt); -} -} -} - -void
Re: [libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
On Mon, Oct 22, 2012 at 07:13:28PM +0200, Luca Barbato wrote: Properly forward mp_decode_layer3 errors. mp3: Properly forward mp_decode_layer3 parsing errors in mp_decode_frame --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; LGTM, but this is no longer Michael's patch ... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] mp3: properly forward mp_decode_frame errors
On Mon, Oct 22, 2012 at 07:13:29PM +0200, Luca Barbato wrote: The function can return either a parsing error or a memory management error. --- libavcodec/mpegaudiodec.c | 32 ++-- 1 file changed, 18 insertions(+), 14 deletions(-) LGTM Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lzo: Use AV_COPY* where appropriate
Diego Biurrun di...@biurrun.de writes: --- libavutil/lzo.c | 28 1 files changed, 8 insertions(+), 20 deletions(-) diff --git a/libavutil/lzo.c b/libavutil/lzo.c index 0d1ec55..a7fddc5 100644 --- a/libavutil/lzo.c +++ b/libavutil/lzo.c @@ -23,6 +23,7 @@ #include avutil.h #include common.h +#include intreadwrite.h #include lzo.h /// Define if we may write up to 12 bytes beyond the output buffer. @@ -71,19 +72,6 @@ static inline int get_len(LZOContext *c, int x, int mask) return cnt; } -//#define UNALIGNED_LOADSTORE -#define BUILTIN_MEMCPY -#ifdef UNALIGNED_LOADSTORE -#define COPY2(d, s) *(uint16_t *)(d) = *(uint16_t *)(s); -#define COPY4(d, s) *(uint32_t *)(d) = *(uint32_t *)(s); -#elif defined(BUILTIN_MEMCPY) -#define COPY2(d, s) memcpy(d, s, 2); -#define COPY4(d, s) memcpy(d, s, 4); -#else -#define COPY2(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; -#define COPY4(d, s) (d)[0] = (s)[0]; (d)[1] = (s)[1]; (d)[2] = (s)[2]; (d)[3] = (s)[3]; -#endif - /** * @brief Copies bytes from input to output buffer with checking. * @param cnt number of bytes to copy, must be = 0 @@ -101,7 +89,7 @@ static inline void copy(LZOContext *c, int cnt) c-error |= AV_LZO_OUTPUT_FULL; } #if defined(INBUF_PADDED) defined(OUTBUF_PADDED) -COPY4(dst, src); +AV_COPY32(dst, src); src += 4; dst += 4; cnt -= 4; @@ -145,16 +133,16 @@ static inline void memcpy_backptr(uint8_t *dst, int back, int cnt) memset(dst, *src, cnt); } else { #ifdef OUTBUF_PADDED -COPY2(dst, src); -COPY2(dst + 2, src + 2); +AV_COPY16(dst, src); +AV_COPY16(dst + 2, src + 2); You can't use AV_COPY* here because alignment isn't guaranteed. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
On 10/22/2012 07:30 PM, Diego Biurrun wrote: On Mon, Oct 22, 2012 at 07:13:28PM +0200, Luca Barbato wrote: Properly forward mp_decode_layer3 errors. mp3: Properly forward mp_decode_layer3 parsing errors in mp_decode_frame Anything longer than 70 col makes miserable the life of those using some git tools, better be more than terse if is not _really_ necessary. --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; LGTM, but this is no longer Michael's patch ... I can rename the author and credit him for spotting the problem then. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
Luca Barbato lu_z...@gentoo.org writes: On 10/22/2012 07:30 PM, Diego Biurrun wrote: On Mon, Oct 22, 2012 at 07:13:28PM +0200, Luca Barbato wrote: Properly forward mp_decode_layer3 errors. mp3: Properly forward mp_decode_layer3 parsing errors in mp_decode_frame Anything longer than 70 col makes miserable the life of those using some git tools, better be more than terse if is not _really_ necessary. --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; LGTM, but this is no longer Michael's patch ... I can rename the author and credit him for spotting the problem then. Why not credit whatever static analysis tool did it? -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
On Mon, Oct 22, 2012 at 07:42:22PM +0200, Luca Barbato wrote: On 10/22/2012 07:30 PM, Diego Biurrun wrote: On Mon, Oct 22, 2012 at 07:13:28PM +0200, Luca Barbato wrote: Properly forward mp_decode_layer3 errors. mp3: Properly forward mp_decode_layer3 parsing errors in mp_decode_frame Anything longer than 70 col makes miserable the life of those using some git tools, better be more than terse if is not _really_ necessary. It's 72 characters, I thought that was fine ... --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; LGTM, but this is no longer Michael's patch ... I can rename the author and credit him for spotting the problem then. For example.. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] avutil: Move memcpy_backptr() to mem.c
On 22/10/2012 10:18, Diego Biurrun wrote: -#include libavutil/lzo.h // for av_memcpy_backptr +#include libavutil/lzo.h +#include libavutil/mem.h Is lzo.h still required here? -- Diego Elio Pettenò — Flameeyes flamee...@flameeyes.eu — http://blog.flameeyes.eu/ ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] avutil: Move memcpy_backptr() to mem.c
On Mon, Oct 22, 2012 at 11:43:00AM -0700, Diego Elio Pettenò wrote: On 22/10/2012 10:18, Diego Biurrun wrote: -#include libavutil/lzo.h // for av_memcpy_backptr +#include libavutil/lzo.h +#include libavutil/mem.h Is lzo.h still required here? Yes, for AV_LZO_OUTPUT_PADDING. Now I'm sure one could argue if that is (still) aptly named ... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] avutil: Move memcpy_backptr() to mem.c
Diego Biurrun di...@biurrun.de writes: On Mon, Oct 22, 2012 at 11:43:00AM -0700, Diego Elio Pettenò wrote: On 22/10/2012 10:18, Diego Biurrun wrote: -#include libavutil/lzo.h // for av_memcpy_backptr +#include libavutil/lzo.h +#include libavutil/mem.h Is lzo.h still required here? Yes, for AV_LZO_OUTPUT_PADDING. Now I'm sure one could argue if that is (still) aptly named ... Something is very wrong with this picture. -- Måns Rullgård m...@mansr.com ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Announce 0.8.4 Release
--- src/download | 22 ++--- src/news | 61 ++ 2 files changed, 72 insertions(+), 11 deletions(-) diff --git a/src/download b/src/download index 9039cbd..9a53b21 100644 --- a/src/download +++ b/src/download @@ -225,9 +225,9 @@ new Bugzilla for filing bugs: a href=releases/libav-9_beta1.releaseRelease Notes/a /p -a name=release_0.8/ah2Libav 0.8.3 Forbidden Fruit/h2 +a name=release_0.8/ah2Libav 0.8.4 Forbidden Fruit/h2 p -0.8.3 was released on 2012-06-09. It is the latest point release from +0.8.4 was released on 2012-10-22. It is the latest point release from the 0.8 branch, which was cut on 2012-01-21. Please give us feedback with your experiences with this release and use our new Bugzilla for filing bugs: @@ -235,15 +235,15 @@ filing bugs: /p p -a href=releases/libav-0.8.3.tar.xzDownload XZ tarball/anbsp;nbsp; -a href=releases/libav-0.8.3.tar.xz.md5MD5/a -a href=releases/libav-0.8.3.tar.xz.sha1SHA1/a -a href=releases/libav-0.8.3.tar.xz.ascPGP signature/abr / -a href=releases/libav-0.8.3.tar.gzDownload gzip tarball/anbsp;nbsp; -a href=releases/libav-0.8.3.tar.gz.md5MD5/a -a href=releases/libav-0.8.3.tar.gz.sha1SHA1/a -a href=releases/libav-0.8.3.tar.gz.ascPGP signature/abr / -a href=releases/libav-0.8.3.changelogChangelog/abr / +a href=releases/libav-0.8.4.tar.xzDownload XZ tarball/anbsp;nbsp; +a href=releases/libav-0.8.4.tar.xz.md5MD5/a +a href=releases/libav-0.8.4.tar.xz.sha1SHA1/a +a href=releases/libav-0.8.4.tar.xz.ascPGP signature/abr / +a href=releases/libav-0.8.4.tar.gzDownload gzip tarball/anbsp;nbsp; +a href=releases/libav-0.8.4.tar.gz.md5MD5/a +a href=releases/libav-0.8.4.tar.gz.sha1SHA1/a +a href=releases/libav-0.8.4.tar.gz.ascPGP signature/abr / +a href=releases/libav-0.8.4.changelogChangelog/abr / a href=releases/libav-0.8.releaseRelease Notes/a /p diff --git a/src/news b/src/news index c88a17a..9dd4aa0 100644 --- a/src/news +++ b/src/news @@ -1,5 +1,66 @@ h1News/h1 +a name=0.8.2/ah3October 22 2012/h3 + +p +Today, we update our latest release series 0.8 with the release +of a href=download.html#release_0.8Libav 0.8.4/a. This release +contains several security and bug fixes. +/p + +p +The following bug in our Bugzilla has been fixed: +ul +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=118;#118/a: zzufed H.261 file crashes avconv signal 11 (SIGSEGV) +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=203;#203/a: scale filter has a rounding error +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=245;#245/a: Reading already freed mem when using vfilters pad and settb +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=265;#265/a: smacker audio decode regression +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=277;#277/a: avconv ignores audio bitrate -ab parameter +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=310;#310/a: avconv hangs when transcoding .flac files +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=327;#327/a: wmaprodec: Arithmetic exception +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=352;#352/a: Pad filter pass-through problem +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=367;#367/a: Crash in bmp_decode_frame() when decoding unusual bmp file +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=373;#373/a: y4m as input results in filename.y4m: Operation not permitted +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=379;#379/a: Regression in WAV files between 52.72. 2 and 53. 35. 0 +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=380;#380/a: double free in option handling +/ul +/p + +p +These releases contain security fixes for the following CVEs: +/p + +ul +li/CVE-2012-2772 +li/CVE-2012-2775 +li/CVE-2012-2776 +li/CVE-2012-2777 +li/CVE-2012-2779 +li/CVE-2012-2784 +li/CVE-2012-2786 +li/CVE-2012-2787 +li/CVE-2012-2788 +li/CVE-2012-2789 +li/CVE-2012-2790 +li/CVE-2012-2793 +li/CVE-2012-2794 +li/CVE-2012-2796 +li/CVE-2012-2798 +li/CVE-2012-2800 +li/CVE-2012-2801 +li/CVE-2012-2802 +/ul + +p +Distributors and system integrators are encouraged to update and share their +patches against our release branches. +/p + +p +emEnjoy!/em +/p + + a name=9beta1/ah3October 11, 2012/h3 p With the next upcoming release, we change our versioning scheme to follow our -- 1.7.9.5 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Announce 0.8.4 Release
On 10/22/2012 09:58 PM, Reinhard Tartler wrote: --- src/download | 22 ++--- src/news | 61 ++ 2 files changed, 72 insertions(+), 11 deletions(-) Looks fine. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] avconv: only apply presets when we have an encoder.
Fixes a crash when using a preset with stream copy. CC: libav-sta...@libav.org --- avconv_opt.c | 55 --- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/avconv_opt.c b/avconv_opt.c index 79444eb..0eb601b 100644 --- a/avconv_opt.c +++ b/avconv_opt.c @@ -754,8 +754,6 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e char *bsf = NULL, *next, *codec_tag = NULL; AVBitStreamFilterContext *bsfc, *bsfc_prev = NULL; double qscale = -1; -char *buf = NULL, *arg = NULL, *preset = NULL; -AVIOContext *s = NULL; if (!st) { av_log(NULL, AV_LOG_FATAL, Could not alloc stream.\n); @@ -777,37 +775,40 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e st-codec-codec_type = type; choose_encoder(o, oc, ost); if (ost-enc) { +AVIOContext *s = NULL; +char *buf = NULL, *arg = NULL, *preset = NULL; + ost-opts = filter_codec_opts(codec_opts, ost-enc-id, oc, st, ost-enc); + +MATCH_PER_STREAM_OPT(presets, str, preset, oc, st); +if (preset (!(ret = get_preset_file_2(preset, ost-enc-name, s { +do { +buf = get_line(s); +if (!buf[0] || buf[0] == '#') { +av_free(buf); +continue; +} +if (!(arg = strchr(buf, '='))) { +av_log(NULL, AV_LOG_FATAL, Invalid line found in the preset file.\n); +exit(1); +} +*arg++ = 0; +av_dict_set(ost-opts, buf, arg, AV_DICT_DONT_OVERWRITE); +av_free(buf); +} while (!s-eof_reached); +avio_close(s); +} +if (ret) { +av_log(NULL, AV_LOG_FATAL, + Preset %s specified for stream %d:%d, but could not be opened.\n, + preset, ost-file_index, ost-index); +exit(1); +} } avcodec_get_context_defaults3(st-codec, ost-enc); st-codec-codec_type = type; // XXX hack, avcodec_get_context_defaults2() sets type to unknown for stream copy -MATCH_PER_STREAM_OPT(presets, str, preset, oc, st); -if (preset (!(ret = get_preset_file_2(preset, ost-enc-name, s { -do { -buf = get_line(s); -if (!buf[0] || buf[0] == '#') { -av_free(buf); -continue; -} -if (!(arg = strchr(buf, '='))) { -av_log(NULL, AV_LOG_FATAL, Invalid line found in the preset file.\n); -exit(1); -} -*arg++ = 0; -av_dict_set(ost-opts, buf, arg, AV_DICT_DONT_OVERWRITE); -av_free(buf); -} while (!s-eof_reached); -avio_close(s); -} -if (ret) { -av_log(NULL, AV_LOG_FATAL, - Preset %s specified for stream %d:%d, but could not be opened.\n, - preset, ost-file_index, ost-index); -exit(1); -} - ost-max_frames = INT64_MAX; MATCH_PER_STREAM_OPT(max_frames, i64, ost-max_frames, oc, st); -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] avconv: only apply presets when we have an encoder.
On 10/22/2012 10:42 PM, Anton Khirnov wrote: Fixes a crash when using a preset with stream copy. Ok. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] mp3: exit on parsing error in mp_decode_frame
On 10/22/2012 08:02 PM, Diego Biurrun wrote: On Mon, Oct 22, 2012 at 07:42:22PM +0200, Luca Barbato wrote: On 10/22/2012 07:30 PM, Diego Biurrun wrote: On Mon, Oct 22, 2012 at 07:13:28PM +0200, Luca Barbato wrote: Properly forward mp_decode_layer3 errors. mp3: Properly forward mp_decode_layer3 parsing errors in mp_decode_frame Anything longer than 70 col makes miserable the life of those using some git tools, better be more than terse if is not _really_ necessary. It's 72 characters, I thought that was fine ... Apparently there is at least a tool requiring 50 cols... --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -1571,6 +1571,9 @@ static int mp_decode_frame(MPADecodeContext *s, OUT_INT *samples, default: nb_frames = mp_decode_layer3(s); +if (nb_frames 0) +return nb_frames; LGTM, but this is no longer Michael's patch ... I can rename the author and credit him for spotting the problem then. For example.. mp3: exit on parsing error in mp_decode_frame Properly forward mp_decode_layer3 errors, mp_decode_layer1 and mp_decode_layer2 do not return errors. Based on a patch by Michael Niedermayer. I'd push if you are fine with that. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] ffv1.3 support - Unrecognized option 'slicecrc'
On 10/20/2012 12:25 PM, Peter B. wrote: On 10/20/2012 12:15 AM, Peter B. wrote: On 10/19/2012 08:30 PM, Luca Barbato wrote: slicecrc should be supported. The version I've compiled now does. Before it was complaining that the commandline argument slicecrc is unknown. Sorry! Mistake in my testscript. It was still using ffmpeg instead of avconv. So, here's the commandline and uncut console output, where your githead ffv1 version complains about slicecrc: Should work fine and is in master (and soon in 9beta2). avconv -v debug -i /var/tmp/ducks_take_off_420_720p50.y4m -c ffv1 -level 3 -context 0 -coder 0 -g 1 -strict experimental -slices 4 -slicecrc 0 out.nut avconv version v9_beta1-157-gee6fb9d, Copyright (c) 2000-2012 the Libav developers built on Oct 22 2012 22:22:25 with gcc 4.7.2 (Gentoo 4.7.2 p1.1, pie-0.5.5) configuration: libavutil 51. 45. 0 / 51. 45. 0 libavcodec54. 31. 0 / 54. 31. 0 libavformat 54. 19. 0 / 54. 19. 0 libavdevice 53. 2. 0 / 53. 2. 0 libavfilter3. 1. 0 / 3. 1. 0 libavresample 1. 0. 0 / 1. 0. 0 libswscale 2. 1. 1 / 2. 1. 1 [yuv4mpegpipe @ 0x1850760] Probed with size=2048 and score=100 [yuv4mpegpipe @ 0x1850760] Probe buffer size limit 500 reached [yuv4mpegpipe @ 0x1850760] Estimating duration from bitrate, this may be inaccurate Input #0, yuv4mpegpipe, from '/var/tmp/ducks_take_off_420_720p50.y4m': Duration: N/A, bitrate: N/A Stream #0.0, 4, 1/50: Video: rawvideo, yuv420p, 1280x720, 0/1, PAR 1:1 DAR 16:9, 50 fps, 50 tbr, 50 tbn File 'out.nut' already exists. Overwrite ? [y/N] y [buffer @ 0x18516a0] w:1280 h:720 pixfmt:yuv420p [buffersink @ 0x1855420] auto-inserting filter 'auto-inserted fifo 0' between the filter 'format' and the filter 'output stream 0:0' [ffv1 @ 0x1851ea0] detected 8 logical cores Output #0, nut, to 'out.nut': Metadata: encoder : Lavf54.19.0 Stream #0.0, 0, 1/50: Video: ffv1, yuv420p, 1280x720 [PAR 1:1 DAR 16:9], 1/50, q=2-31, 200 kb/s, 50 tbn, 50 tbc Stream mapping: Stream #0:0 - #0:0 (rawvideo - ffv1) Press ctrl-c to stop encoding lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Announce 0.8.4 Release
On Mon, Oct 22, 2012 at 09:58:19PM +0200, Reinhard Tartler wrote: --- a/src/news +++ b/src/news @@ -1,5 +1,66 @@ + +p +The following bug in our Bugzilla has been fixed: +ul +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=118;#118/a: zzufed H.261 file crashes avconv signal 11 (SIGSEGV) +li/a href=http://bugzilla.libav.org/show_bug.cgi?id=203;#203/a: scale filter has a rounding error have been fixed +p +These releases contain security fixes for the following CVEs: It's only one release... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] mov: Do not apply dts shift from edit lists coming from data tracks.
On Fri, Oct 12, 2012 at 4:07 AM, Måns Rullgård m...@mansr.com wrote: Alex Converse alex.conve...@gmail.com writes: Some files in the wild have time code tracks with very negative initial offsets. Do you have a sample? I can't share the samples I have. I tried to make one but I don't think I have a tool that can generate a timecode track. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH v2] build: Plan 9 support
This adds support for building on Plan 9 x86-32. The compat/plan9 directory contains these items: - replacements for the 'head' and 'printf' shell commands - wrapper for main() to disable FPU exceptions Larger required changes to the system are described in the documentation. Signed-off-by: Mans Rullgard m...@mansr.com --- Review comments addressed. Less stuff in compat/, added link to ready to use stdint.h. --- compat/plan9/head| 10 compat/plan9/main.c | 34 ++ compat/plan9/printf | 2 ++ configure| 22 - doc/platform.texi| 63 libavformat/os_support.h | 2 +- 6 files changed, 131 insertions(+), 2 deletions(-) create mode 100755 compat/plan9/head create mode 100644 compat/plan9/main.c create mode 100755 compat/plan9/printf diff --git a/compat/plan9/head b/compat/plan9/head new file mode 100755 index 000..2840b2d --- /dev/null +++ b/compat/plan9/head @@ -0,0 +1,10 @@ +#!/bin/sh + +n=10 + +case $1 in +-n) n=$2; shift 2 ;; +-n*) n=${1#-n}; shift ;; +esac + +exec sed ${n}q $@ diff --git a/compat/plan9/main.c b/compat/plan9/main.c new file mode 100644 index 000..97d7067 --- /dev/null +++ b/compat/plan9/main.c @@ -0,0 +1,34 @@ +/* + * This file is part of Libav. + * + * Libav is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * Libav is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Libav; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +int plan9_main(int argc, char **argv); + +#undef main +int main(int argc, char **argv) +{ +/* The setfcr() function in lib9 is broken, must use asm. */ +#ifdef __i386 +short fcr; +__asm__ volatile (fstcw%0 \n + or $63, %0 \n + fldcw%0 \n + : =m(fcr)); +#endif + +return plan9_main(argc, argv); +} diff --git a/compat/plan9/printf b/compat/plan9/printf new file mode 100755 index 000..1a70a9e --- /dev/null +++ b/compat/plan9/printf @@ -0,0 +1,2 @@ +#!/bin/sh +exec awk BEGIN { for (i = 2; i ARGC; i++) printf \$1\, ARGV[i] } $@ diff --git a/configure b/configure index ebbce78..0779ac7 100755 --- a/configure +++ b/configure @@ -956,7 +956,7 @@ apply(){ cp_if_changed(){ cmp -s $1 $2 echo $2 is unchanged return mkdir -p $(dirname $2) -cp -f $1 $2 +$cp_f $1 $2 } # CONFIG_LIST contains configurable options, while HAVE_LIST is for @@ -1753,6 +1753,7 @@ shlibdir_default=$libdir_default ar_default=ar cc_default=gcc host_cc_default=gcc +cp_f=cp -f ln_s=ln -sf nm_default=nm -g objformat=elf @@ -2889,6 +2890,19 @@ case $target_os in ;; minix) ;; +plan9) +add_cppflags -D_C99_SNPRINTF_EXTENSION \ + -D_REENTRANT_SOURCE\ + -D_RESEARCH_SOURCE \ + -DFD_SETSIZE=96\ + -DHAVE_SOCK_OPTS +add_compat strtod.o strtod=avpriv_strtod +network_extralibs='-lbsd' +exeobjs=compat/plan9/main.o +disable avserver +ln_s='ln -s -f' +cp_f='cp' +;; none) ;; *) @@ -3541,6 +3555,12 @@ elif enabled msvc; then enabled x86_32 disable aligned_stack fi +case $target_os in +plan9) +add_cppflags -Dmain=plan9_main +;; +esac + enabled_any $THREADS_LIST enable threads enabled asm || { arch=c; disable $ARCH_LIST $ARCH_EXT_LIST; } diff --git a/doc/platform.texi b/doc/platform.texi index d637f00..6bb7136 100644 --- a/doc/platform.texi +++ b/doc/platform.texi @@ -298,4 +298,67 @@ and for a build with shared libraries ./configure --target-os=mingw32 --enable-shared --disable-static --extra-cflags=-mno-cygwin --extra-libs=-mno-cygwin @end example +@chapter Plan 9 + +The native @uref{http://plan9.bell-labs.com/plan9/, Plan 9} compiler +does not implement all the C99 features needed by Libav so the gcc +port must be used. Furthermore, a few items missing from the C +library and shell environment need to be fixed. + +@itemize + +@item GNU awk, grep, make, and sed + +Working packages of these tools can be found at +@uref{http://code.google.com/p/ports2plan9/downloads/list, ports2plan9}. +They can be installed with @uref{http://9front.org/, 9front's} @code{pkg} +utility by setting @code{pkgpath} to
[libav-devel] [PATCH 2/2] fate: check that dependencies actually exist
This causes make to exit with an error message if a nonexistent dependency is specified rather than silently dropping the test. Signed-off-by: Mans Rullgard m...@mansr.com --- tests/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index de4d928..2678541 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -20,9 +20,11 @@ tests/data/vsynth2.yuv: tests/rotozoom$(HOSTEXESUF) | tests/data tests/data/asynth% tests/data/vsynth%.yuv tests/vsynth%/00.pgm: TAG = GEN +CHKCFG = $(if $($(1))$(!$(1)),$($(1)), $(error No such config: $(1))) + ALLYES = $(strip $(call XYES, $(1))) XYES= $(if $(strip $(1)), \ - $(if $(CONFIG_$(firstword $(1))),\ + $(if $(call CHKCFG,CONFIG_$(firstword $(1))),\ $(call XYES, $(wordlist 2, $(words $(1)), $(1, \ yes) -- 1.7.12.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/2] fate: fix ENCMUX macro
This matches how it is actually being called. Signed-off-by: Mans Rullgard m...@mansr.com --- tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile b/tests/Makefile index 93eb548..de4d928 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -34,7 +34,7 @@ ENCDEC2 = $(call ALLYES, $(firstword $(1))_ENCODER $(lastword $(1))_DECODER \ $(firstword $(3))_MUXER $(lastword $(3))_DEMUXER) DEMDEC = $(call ALLYES, $(1)_DEMUXER $(2:%=%_DECODER)) -ENCMUX = $(call ALLYES, $(2:%=%_ENCODER) $(1)_MUXER) +ENCMUX = $(call ALLYES, $(1:%=%_ENCODER) $(2)_MUXER) include $(SRC_PATH)/tests/fate/acodec.mak include $(SRC_PATH)/tests/fate/vcodec.mak -- 1.7.12.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel