Re: [libav-devel] [PATCH] x86inc: Add cpuflags_mmxext alias for cpuflags_mmx2
On Mon, 29 Oct 2012, Ronald S. Bultje wrote: > On Mon, Oct 29, 2012 at 5:15 PM, Diego Biurrun wrote: > >> This allows using "mmxext" as name in Libav while staying compatible >> with changes to the YASM macro infrastructure imported from x264. >> --- >> libavutil/x86/x86inc.asm |1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm >> index 1fe9f55..2655154 100644 >> --- a/libavutil/x86/x86inc.asm >> +++ b/libavutil/x86/x86inc.asm >> @@ -35,6 +35,7 @@ >> ; to x264-de...@videolan.org . >> >> %define program_name ff >> +%define cpuflags_mmxext cpuflags_mmx2 > > Any such a change to x86inc.asm is OK if and only if x264 accepts this > change upstream. Loren? I'll accept the addition of the synonym. (This doesn't change my objections to the name, I'm just allowing an inert line of code to live in the x264 repo if that simplifies merging.) --Loren Merritt ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 4/4] x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
Hi, On Mon, Oct 29, 2012 at 7:28 PM, Diego Biurrun wrote: > "mmxext" is a more sensible name and more common in outside projects. > --- > libavutil/x86/x86util.asm |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) No. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/4] x86: include x86inc.asm in x86util.asm
Hi, On Mon, Oct 29, 2012 at 7:28 PM, Diego Biurrun wrote: > -%include "x86inc.asm" > %include "x86util.asm" Didn't you come up with the rule that each file should contain all headers it directly takes symbols from? How do these changes fit with that scheme? Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] pixfmt: support more yuva formats
Hi, On Mon, Oct 29, 2012 at 7:14 PM, Luca Barbato wrote: > Signed-off-by: Luca Barbato > --- > libavcodec/raw.c | 19 > libavformat/nut.c | 28 + > libavutil/pixdesc.c | 234 > ++ > libavutil/pixfmt.h| 28 + > libswscale/utils.c| 18 > tests/ref/lavfi/pixdesc | 18 > tests/ref/lavfi/pixfmts_copy | 18 > tests/ref/lavfi/pixfmts_null | 18 > tests/ref/lavfi/pixfmts_scale | 18 > tests/ref/lavfi/pixfmts_vflip | 18 > 10 files changed, 417 insertions(+) OK, assuming it works without new warnings under valgrind. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] swscale: support gray to 9bit and 10bit formats
Hi, On Mon, Oct 29, 2012 at 7:14 PM, Luca Barbato wrote: > With the input of Kostya and Ronald. > --- > libswscale/swscale.c | 38 -- > libswscale/swscale_unscaled.c | 32 ++-- > 2 files changed, 66 insertions(+), 4 deletions(-) So it works now, under valgrind? LGTM then. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86inc: Add cpuflags_mmxext alias for cpuflags_mmx2
Hi, On Mon, Oct 29, 2012 at 5:56 PM, Diego Biurrun wrote: > On Mon, Oct 29, 2012 at 05:25:08PM -0700, Ronald S. Bultje wrote: >> On Mon, Oct 29, 2012 at 5:15 PM, Diego Biurrun wrote: >> > This allows using "mmxext" as name in Libav while staying compatible >> > with changes to the YASM macro infrastructure imported from x264. >> > --- >> > libavutil/x86/x86inc.asm |1 + >> > 1 files changed, 1 insertions(+), 0 deletions(-) >> > >> > --- a/libavutil/x86/x86inc.asm >> > +++ b/libavutil/x86/x86inc.asm >> > @@ -35,6 +35,7 @@ >> > ; to x264-de...@videolan.org . >> > >> > %define program_name ff >> > +%define cpuflags_mmxext cpuflags_mmx2 >> >> Any such a change to x86inc.asm is OK if and only if x264 accepts this >> change upstream. Loren? > > The x86inc.asm files from x264 and Libav are already different, x264 uses > "x264" instead of "ff" as program_name. That's the reason why I chose to > place the alias in this very spot: during upstream merges there will be > no conflicts that are not > > a) trivial to fix and > b) would have occurred anyway due to the existing difference. > > This patch is also what a room full of Libav developers accepted as a > compromise at VDD. Please don't oppose the consensus of your peers. You keep trying to push this through. No. I do the syncing, and nobody wants to take that job from me, I assure you. Every time the semantics of cglobal change by however little, someone who knows that stuff needs to go in and fix/port it. I prefer to not have to take any additional tasks on me, such as maintaining forky differences. Thus, please, no. Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/4] x86: include x86inc.asm in x86util.asm
This is necessary to allow refactoring some x86util macros with cpuflags. It also allows having custom macro definitions outside of x86inc.asm. --- libavcodec/x86/ac3dsp.asm |1 - libavcodec/x86/dct32.asm|1 - libavcodec/x86/deinterlace.asm |1 - libavcodec/x86/dsputil.asm |1 - libavcodec/x86/dsputilenc.asm |1 - libavcodec/x86/fft.asm |1 - libavcodec/x86/fmtconvert.asm |1 - libavcodec/x86/h264_chromamc.asm|1 - libavcodec/x86/h264_chromamc_10bit.asm |1 - libavcodec/x86/h264_deblock.asm |1 - libavcodec/x86/h264_deblock_10bit.asm |1 - libavcodec/x86/h264_idct.asm|1 - libavcodec/x86/h264_idct_10bit.asm |1 - libavcodec/x86/h264_intrapred.asm |1 - libavcodec/x86/h264_intrapred_10bit.asm |1 - libavcodec/x86/h264_qpel_10bit.asm |1 - libavcodec/x86/h264_weight.asm |2 +- libavcodec/x86/h264_weight_10bit.asm|1 - libavcodec/x86/imdct36.asm |1 - libavcodec/x86/pngdsp.asm |1 - libavcodec/x86/proresdsp.asm|1 - libavcodec/x86/rv34dsp.asm |1 - libavcodec/x86/rv40dsp.asm |1 - libavcodec/x86/sbrdsp.asm |1 - libavcodec/x86/vc1dsp.asm |1 - libavcodec/x86/vp3dsp.asm |1 - libavcodec/x86/vp56dsp.asm |1 - libavcodec/x86/vp8dsp.asm |1 - libavfilter/x86/hqdn3d.asm |2 +- libavresample/x86/audio_convert.asm |1 - libavresample/x86/audio_mix.asm |1 - libavutil/x86/cpuid.asm |2 +- libavutil/x86/float_dsp.asm |1 - libavutil/x86/x86util.asm |2 ++ libswscale/x86/input.asm|1 - libswscale/x86/output.asm |1 - libswscale/x86/scale.asm|1 - 37 files changed, 5 insertions(+), 36 deletions(-) diff --git a/libavcodec/x86/ac3dsp.asm b/libavcodec/x86/ac3dsp.asm index 176fd3d..01c1b8e 100644 --- a/libavcodec/x86/ac3dsp.asm +++ b/libavcodec/x86/ac3dsp.asm @@ -19,7 +19,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** -%include "x86inc.asm" %include "x86util.asm" SECTION_RODATA diff --git a/libavcodec/x86/dct32.asm b/libavcodec/x86/dct32.asm index 58ee8d3..53c2415 100644 --- a/libavcodec/x86/dct32.asm +++ b/libavcodec/x86/dct32.asm @@ -19,7 +19,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** -%include "x86inc.asm" %include "x86util.asm" SECTION_RODATA 32 diff --git a/libavcodec/x86/deinterlace.asm b/libavcodec/x86/deinterlace.asm index 8681181..f15b8ea 100644 --- a/libavcodec/x86/deinterlace.asm +++ b/libavcodec/x86/deinterlace.asm @@ -20,7 +20,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** -%include "x86inc.asm" %include "x86util.asm" SECTION_RODATA diff --git a/libavcodec/x86/dsputil.asm b/libavcodec/x86/dsputil.asm index fcb1b6d..4b36ca8 100644 --- a/libavcodec/x86/dsputil.asm +++ b/libavcodec/x86/dsputil.asm @@ -19,7 +19,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** -%include "x86inc.asm" %include "x86util.asm" SECTION_RODATA diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm index b7078f1..39031cb 100644 --- a/libavcodec/x86/dsputilenc.asm +++ b/libavcodec/x86/dsputilenc.asm @@ -21,7 +21,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;* -%include "x86inc.asm" %include "x86util.asm" SECTION .text diff --git a/libavcodec/x86/fft.asm b/libavcodec/x86/fft.asm index f054298..465c08b 100644 --- a/libavcodec/x86/fft.asm +++ b/libavcodec/x86/fft.asm @@ -28,7 +28,6 @@ ; in blocks as conventient to the vector size. ; i.e. {4x real, 4x imaginary, 4x real, ...} (or 2x respectively) -%include "x86inc.asm" %include "x86util.asm" %if ARCH_X86_64 diff --git a/libavcodec/x86/fmtconvert.asm b/libavcodec/x86/fmtconvert.asm index 46b7e85..d59c43b 100644 --- a/libavcodec/x86/fmtconvert.asm +++ b/libavcodec/x86/fmtconvert.asm @@ -19,7 +19,6 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** -%include "x86inc.asm" %include "x86util.asm" SECTION_TEXT diff --git a/libavcodec/x86/h264_chromamc.asm b/libavcodec/x86/h264_chromamc.asm index 56b8e56.
[libav-devel] [PATCH 4/4] x86util: Add cpuflags_mmxext alias for cpuflags_mmx2
"mmxext" is a more sensible name and more common in outside projects. --- libavutil/x86/x86util.asm |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 5a11171..3e0443a 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -24,6 +24,7 @@ ;** %define program_name ff +%define cpuflags_mmxext cpuflags_mmx2 %include "x86inc.asm" -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 3/4] x86inc: Set program_name outside of x86inc.asm
This reduces the local difference to the x264 upstream version. --- libavutil/x86/x86inc.asm |2 +- libavutil/x86/x86util.asm |2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index b0df2b2..52ee46a 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -35,7 +35,7 @@ ; to x264-de...@videolan.org . %ifndef program_name -%define program_name ff +%define program_name x264 %endif %define WIN64 0 diff --git a/libavutil/x86/x86util.asm b/libavutil/x86/x86util.asm index 3aac639..5a11171 100644 --- a/libavutil/x86/x86util.asm +++ b/libavutil/x86/x86util.asm @@ -23,6 +23,8 @@ ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ;** +%define program_name ff + %include "x86inc.asm" %macro SBUTTERFLY 4 -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/4] x86inc: Only define program_name if the macro is unset
This allows overriding the value from outside of the file. --- I consider this change fit for upstream. Loren? Jason? libavutil/x86/x86inc.asm |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 1fe9f55..b0df2b2 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -34,7 +34,9 @@ ; as this feature might be useful for others as well. Send patches or ideas ; to x264-de...@videolan.org . -%define program_name ff +%ifndef program_name +%define program_name ff +%endif %define WIN64 0 %define UNIX64 0 -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/2] pixfmt: support more yuva formats
Signed-off-by: Luca Barbato --- libavcodec/raw.c | 19 libavformat/nut.c | 28 + libavutil/pixdesc.c | 234 ++ libavutil/pixfmt.h| 28 + libswscale/utils.c| 18 tests/ref/lavfi/pixdesc | 18 tests/ref/lavfi/pixfmts_copy | 18 tests/ref/lavfi/pixfmts_null | 18 tests/ref/lavfi/pixfmts_scale | 18 tests/ref/lavfi/pixfmts_vflip | 18 10 files changed, 417 insertions(+) diff --git a/libavcodec/raw.c b/libavcodec/raw.c index 6f0c923..4ccc6cc 100644 --- a/libavcodec/raw.c +++ b/libavcodec/raw.c @@ -124,6 +124,25 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = { { AV_PIX_FMT_YUVA420P,MKTAG('Y', '4', 11 , 8 ) }, { AV_PIX_FMT_Y400A, MKTAG('Y', '2', 0 , 8 ) }, +{ AV_PIX_FMT_YUVA420P9LE, MKTAG('Y', '4', 11 , 9 ) }, +{ AV_PIX_FMT_YUVA420P9BE, MKTAG( 9 , 11 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA422P9LE, MKTAG('Y', '4', 10 , 9 ) }, +{ AV_PIX_FMT_YUVA422P9BE, MKTAG( 9 , 10 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA444P9LE, MKTAG('Y', '4', 0 , 9 ) }, +{ AV_PIX_FMT_YUVA444P9BE, MKTAG( 9 , 0 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA420P10LE, MKTAG('Y', '4', 11 , 10 ) }, +{ AV_PIX_FMT_YUVA420P10BE, MKTAG(10 , 11 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA422P10LE, MKTAG('Y', '4', 10 , 10 ) }, +{ AV_PIX_FMT_YUVA422P10BE, MKTAG(10 , 10 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA444P10LE, MKTAG('Y', '4', 0 , 10 ) }, +{ AV_PIX_FMT_YUVA444P10BE, MKTAG(10 , 0 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA420P16LE, MKTAG('Y', '4', 11 , 16 ) }, +{ AV_PIX_FMT_YUVA420P16BE, MKTAG(16 , 11 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA422P16LE, MKTAG('Y', '4', 10 , 16 ) }, +{ AV_PIX_FMT_YUVA422P16BE, MKTAG(16 , 10 , '4', 'Y') }, +{ AV_PIX_FMT_YUVA444P16LE, MKTAG('Y', '4', 0 , 16 ) }, +{ AV_PIX_FMT_YUVA444P16BE, MKTAG(16 , 0 , '4', 'Y') }, + /* quicktime */ { AV_PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') }, { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', 'y') }, diff --git a/libavformat/nut.c b/libavformat/nut.c index 85b126b..65fadbf 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -92,6 +92,34 @@ const AVCodecTag ff_nut_video_tags[] = { { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') }, { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) }, + +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 9 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 0 , '1', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 9 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 11 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 9 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 10 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 0 , 9 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG( 9 , 0 , '4', 'Y') }, + +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 10 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '1', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 10 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 10 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 0 , 10 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '4', 'Y') }, + +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 16 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 16 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '4', 'Y') }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 0 , 16 ) }, +{ AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '4', 'Y') }, + { AV_CODEC_ID_NONE, 0 } }; diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index b8cfabd..bc446b1 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -558,6 +558,240 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = PIX_FMT_PLANAR, }, +[AV_PIX_FMT_YUVA420P9BE] = { +.name = "yuva420p9be", +.nb_components = 4, +.log2_chroma_w = 1, +.log2_chroma_h = 1, +.comp = { +{ 0, 1, 1, 0, 8 },/* Y */ +{ 1, 1, 1, 0, 8 },/* U */ +{ 2, 1, 1, 0, 8 },/* V */ +{ 3, 1, 1, 0, 8 },/* A */ +}, +.flags = PIX_FMT_BE | PIX_FMT_PLANAR, +}, +[AV_PIX_FMT_YUVA420P9LE] = { +.name = "yuva420p9le", +.nb_components = 4, +.log2_chroma_w = 1, +.log2_chroma_h = 1, +.comp = { +{ 0, 1, 1, 0, 8 },/* Y */ +{ 1, 1, 1, 0, 8 },/* U */ +{ 2, 1, 1, 0, 8 },/* V */ +{ 3, 1, 1, 0, 8 },/* A */ +}, +.flag
[libav-devel] [PATCH 1/2] swscale: support gray to 9bit and 10bit formats
With the input of Kostya and Ronald. --- libswscale/swscale.c | 38 -- libswscale/swscale_unscaled.c | 32 ++-- 2 files changed, 66 insertions(+), 4 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 3f54e4d..c1920de 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -61,6 +61,28 @@ static av_always_inline void fillPlane(uint8_t *plane, int stride, int width, } } +static void fill_plane9or10(uint8_t *plane, int stride, int width, +int height, int y, uint8_t val, +const int dst_depth, const int big_endian) +{ +int i, j; +uint16_t *dst = (uint16_t *) (plane + stride * y); +#define FILL8TO9_OR_10(wfunc) \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < width; j++) { \ +wfunc(&dst[j], (val << (dst_depth - 8)) | \ + (val >> (16 - dst_depth))); \ +} \ +dst += stride / 2; \ +} +if (big_endian) { +FILL8TO9_OR_10(AV_WB16); +} else { +FILL8TO9_OR_10(AV_WL16); +} +} + + static void hScale16To19_c(SwsContext *c, int16_t *_dst, int dstW, const uint8_t *_src, const int16_t *filter, const int32_t *filterPos, int filterSize) @@ -658,8 +680,20 @@ static int swScale(SwsContext *c, const uint8_t *src[], } } -if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf) -fillPlane(dst[3], dstStride[3], dstW, dstY - lastDstY, lastDstY, 255); +if (isPlanar(dstFormat) && isALPHA(dstFormat) && !alpPixBuf) { +int length = dstW; +int height = dstY - lastDstY; +if (is16BPS(c->dstFormat)) +length *= 2; + +if (is9_OR_10BPS(dstFormat)) { +const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(dstFormat); +fill_plane9or10(dst[3], dstStride[3], length, height, lastDstY, +255, desc->comp[3].depth_minus1 + 1, +isBE(dstFormat)); +} else +fillPlane(dst[3], dstStride[3], length, height, lastDstY, 255); +} #if HAVE_MMXEXT_INLINE if (av_get_cpu_flags() & AV_CPU_FLAG_MMXEXT) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 5efc647..9b919f8 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -98,6 +98,27 @@ static void fillPlane(uint8_t *plane, int stride, int width, int height, int y, } } +static void fill_plane9or10(uint8_t *plane, int stride, int width, +int height, int y, uint8_t val, +const int dst_depth, const int big_endian) +{ +int i, j; +uint16_t *dst = (uint16_t *) (plane + stride * y); +#define FILL8TO9_OR_10(wfunc) \ +for (i = 0; i < height; i++) { \ +for (j = 0; j < width; j++) { \ +wfunc(&dst[j], (val << (dst_depth - 8)) | \ + (val >> (16 - dst_depth))); \ +} \ +dst += stride / 2; \ +} +if (big_endian) { +FILL8TO9_OR_10(AV_WB16); +} else { +FILL8TO9_OR_10(AV_WL16); +} +} + static void copyPlane(const uint8_t *src, int srcStride, int srcSliceY, int srcSliceH, int width, uint8_t *dst, int dstStride) @@ -677,10 +698,17 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], // ignore palette for GRAY8 if (plane == 1 && !dst[2]) continue; if (!src[plane] || (plane == 1 && !src[2])) { +int val = (plane == 3) ? 255 : 128; if (is16BPS(c->dstFormat)) length *= 2; -fillPlane(dst[plane], dstStride[plane], length, height, y, - (plane == 3) ? 255 : 128); +if (is9_OR_10BPS(c->dstFormat)) { +fill_plane9or10(dst[plane], dstStride[plane], +length, height, y, val, +desc_dst->comp[plane].depth_minus1 + 1, +isBE(c->dstFormat)); +} else +fillPlane(dst[plane], dstStride[plane], length, height, y, + val); } else { if (is9_OR_10BPS(c->srcFormat)) { const int src_depth = desc_src->comp[plane].depth_minus1 + 1; -- 1.7.12 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [RFC] rtp: generate payload type from stream id
Makes possible to support multiple video/audio streams with different fmtp. --- It isn't working yet and I'm too tired to find the bug, the concept is there anyway. libavformat/internal.h | 4 ++-- libavformat/movenc.c | 2 +- libavformat/rtp.c | 5 +++-- libavformat/rtp.h | 9 ++--- libavformat/rtpenc.c | 2 +- libavformat/sdp.c | 9 + 6 files changed, 18 insertions(+), 13 deletions(-) diff --git a/libavformat/internal.h b/libavformat/internal.h index 3ef46ea..93cfcbc 100644 --- a/libavformat/internal.h +++ b/libavformat/internal.h @@ -124,7 +124,7 @@ int ff_url_join(char *str, int size, const char *proto, * * @param buff the buffer to append the SDP fragment to * @param size the size of the buff buffer - * @param c the AVCodecContext of the media to describe + * @param st the AVStream of the media to describe * @param dest_addr the destination address of the media stream, may be NULL * @param dest_type the destination address type, may be NULL * @param port the destination port of the media stream, 0 if unknown @@ -132,7 +132,7 @@ int ff_url_join(char *str, int size, const char *proto, * @param fmt the AVFormatContext, which might contain options modifying *the generated SDP */ -void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, +void ff_sdp_write_media(char *buff, int size, AVStream *st, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt); diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 50371cd..c7cf22c 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1541,7 +1541,7 @@ static int mov_write_udta_sdp(AVIOContext *pb, AVFormatContext *ctx, int index) char buf[1000] = ""; int len; -ff_sdp_write_media(buf, sizeof(buf), ctx->streams[0]->codec, NULL, NULL, 0, 0, ctx); +ff_sdp_write_media(buf, sizeof(buf), ctx->streams[0], NULL, NULL, 0, 0, ctx); av_strlcatf(buf, sizeof(buf), "a=control:streamid=%d\r\n", index); len = strlen(buf); diff --git a/libavformat/rtp.c b/libavformat/rtp.c index 4314c46..d2f24fa 100644 --- a/libavformat/rtp.c +++ b/libavformat/rtp.c @@ -90,9 +90,10 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type) return -1; } -int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVStream *st) { int i; +AVCodecContext *codec = st->codec; AVOutputFormat *ofmt = fmt ? fmt->oformat : NULL; /* Was the payload type already specified for the RTP muxer? */ @@ -125,7 +126,7 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec) } /* dynamic payload type */ -return RTP_PT_PRIVATE + (codec->codec_type == AVMEDIA_TYPE_AUDIO); +return RTP_PT_PRIVATE + st->index; } const char *ff_rtp_enc_name(int payload_type) diff --git a/libavformat/rtp.h b/libavformat/rtp.h index 6df4ed4..5a70f71 100644 --- a/libavformat/rtp.h +++ b/libavformat/rtp.h @@ -25,13 +25,16 @@ #include "libavcodec/avcodec.h" /** - * Return the payload type for a given codec used in the given format context. + * Return the payload type for a given stream used in the given format context. + * Statid payload types are derived from the codec + * Dynamic payload type are derived from the stream index + * The format context private option payload_type overrides both. * * @param fmt The context of the format - * @param codec The context of the codec + * @param codec The context of the stream * @return The payload type (the 'PT' field in the RTP header). */ -int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec); +int ff_rtp_get_payload_type(AVFormatContext *fmt, AVStream *st); /** * Initialize a codec context based on the payload type. diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index b17c465..5013afb 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -102,7 +102,7 @@ static int rtp_write_header(AVFormatContext *s1) } if (s->payload_type < 0) -s->payload_type = ff_rtp_get_payload_type(s1, st->codec); +s->payload_type = ff_rtp_get_payload_type(s1, st); s->base_timestamp = av_get_random_seed(); s->timestamp = s->base_timestamp; s->cur_timestamp = 0; diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 0f7eb2f..01894f8 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -590,12 +590,13 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, return buff; } -void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt) +void ff_sdp_write_media(char *buff, int size, AVStream *st, const char *dest_addr, const char *dest_type, int port, int ttl, AVFormatContext *fmt) { +AVCodecContext *c = st->codec; const char *type;
Re: [libav-devel] [PATCH] x86inc: Add cpuflags_mmxext alias for cpuflags_mmx2
On Mon, Oct 29, 2012 at 05:25:08PM -0700, Ronald S. Bultje wrote: > On Mon, Oct 29, 2012 at 5:15 PM, Diego Biurrun wrote: > > This allows using "mmxext" as name in Libav while staying compatible > > with changes to the YASM macro infrastructure imported from x264. > > --- > > libavutil/x86/x86inc.asm |1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > --- a/libavutil/x86/x86inc.asm > > +++ b/libavutil/x86/x86inc.asm > > @@ -35,6 +35,7 @@ > > ; to x264-de...@videolan.org . > > > > %define program_name ff > > +%define cpuflags_mmxext cpuflags_mmx2 > > Any such a change to x86inc.asm is OK if and only if x264 accepts this > change upstream. Loren? The x86inc.asm files from x264 and Libav are already different, x264 uses "x264" instead of "ff" as program_name. That's the reason why I chose to place the alias in this very spot: during upstream merges there will be no conflicts that are not a) trivial to fix and b) would have occurred anyway due to the existing difference. This patch is also what a room full of Libav developers accepted as a compromise at VDD. Please don't oppose the consensus of your peers. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] x86inc: Add cpuflags_mmxext alias for cpuflags_mmx2
Hi, On Mon, Oct 29, 2012 at 5:15 PM, Diego Biurrun wrote: > This allows using "mmxext" as name in Libav while staying compatible > with changes to the YASM macro infrastructure imported from x264. > --- > libavutil/x86/x86inc.asm |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm > index 1fe9f55..2655154 100644 > --- a/libavutil/x86/x86inc.asm > +++ b/libavutil/x86/x86inc.asm > @@ -35,6 +35,7 @@ > ; to x264-de...@videolan.org . > > %define program_name ff > +%define cpuflags_mmxext cpuflags_mmx2 Any such a change to x86inc.asm is OK if and only if x264 accepts this change upstream. Loren? Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] x86inc: Add cpuflags_mmxext alias for cpuflags_mmx2
This allows using "mmxext" as name in Libav while staying compatible with changes to the YASM macro infrastructure imported from x264. --- libavutil/x86/x86inc.asm |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/libavutil/x86/x86inc.asm b/libavutil/x86/x86inc.asm index 1fe9f55..2655154 100644 --- a/libavutil/x86/x86inc.asm +++ b/libavutil/x86/x86inc.asm @@ -35,6 +35,7 @@ ; to x264-de...@videolan.org . %define program_name ff +%define cpuflags_mmxext cpuflags_mmx2 %define WIN64 0 %define UNIX64 0 -- 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] Use PRED4x4/8x8/8x8L/16x16 macros to declare x86 intrapred prototypes.
Hi, On Mon, Oct 29, 2012 at 10:25 AM, Luca Barbato wrote: > On 10/29/2012 04:44 AM, Ronald S. Bultje wrote: >> From: "Ronald S. Bultje" >> > > If you don't mind > > x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes > > might fit better. Will change locally. Any other comments on the code or can I commit with that modified? Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] FATE: fix (AD)PCM test dependencies broken in e519990
On Mon, Oct 29, 2012 at 09:26:46PM +0100, Anton Khirnov wrote: > --- > Not sure this is the right way, but it fixes FATE after a distclean for me > --- > tests/fate/acodec.mak |4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) OK Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] FATE: fix (AD)PCM test dependencies broken in e519990
On Tue, Oct 30, 2012 at 12:30:41AM +0200, Martin Storsjö wrote: > On Mon, 29 Oct 2012, Diego Biurrun wrote: > > >On Mon, Oct 29, 2012 at 09:26:46PM +0100, Anton Khirnov wrote: > >>--- > >>Not sure this is the right way, but it fixes FATE after a distclean for me > > > >I wonder what FATE failure you are seeing > > Most probably the issue that makes half of the instances at > http://fate.libav.org fail some adpcm/pcm tests. OK, I can reproduce the issue now - my fast and massively parallel build host was masking the problem by just generating the dependency in time w/o an explicit requirement to do so... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] FATE: fix (AD)PCM test dependencies broken in e519990
On Mon, 29 Oct 2012, Diego Biurrun wrote: On Mon, Oct 29, 2012 at 09:26:46PM +0100, Anton Khirnov wrote: --- Not sure this is the right way, but it fixes FATE after a distclean for me I wonder what FATE failure you are seeing Most probably the issue that makes half of the instances at http://fate.libav.org fail some adpcm/pcm tests. // Martin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] FATE: fix (AD)PCM test dependencies broken in e519990
On Mon, Oct 29, 2012 at 09:26:46PM +0100, Anton Khirnov wrote: > --- > Not sure this is the right way, but it fixes FATE after a distclean for me I wonder what FATE failure you are seeing - while after your patch the PCM tests are part of the fate-acodec target, which is probably better than not running them as part of that target, dependencies for the avconv tests or the individual (AD)PCM tests are not affected ... Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Remove INIT_AVX from x86inc.asm.
On 10/29/2012 10:51 AM, Diego Biurrun wrote: > On Sun, Oct 28, 2012 at 06:39:23PM -0700, Ronald S. Bultje wrote: >> From: "Ronald S. Bultje" >> >> --- >> libavutil/x86/x86inc.asm | 8 >> 1 file changed, 8 deletions(-) > > https://patches.libav.org/patch/25255/ both patches LGTM :) -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
On 10/29/2012 05:13 PM, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > Replace INIT_AVX by INIT_XMM avx. Port the whole file to use cpuflag > based function declarations. Remove (now unused) cputype argument in > function declaration macros. Change function prototypes to have mmx2 > instead of mmxext as suffix, since that's required by cpuflags. > --- > libavcodec/x86/h264_intrapred_10bit.asm | 306 > > libavcodec/x86/h264_intrapred_init.c| 40 ++--- > 2 files changed, 177 insertions(+), 169 deletions(-) LGTM -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
From: "Ronald S. Bultje" Replace INIT_AVX by INIT_XMM avx. Port the whole file to use cpuflag based function declarations. Remove (now unused) cputype argument in function declaration macros. Change function prototypes to have mmx2 instead of mmxext as suffix, since that's required by cpuflags. --- libavcodec/x86/h264_intrapred_10bit.asm | 306 libavcodec/x86/h264_intrapred_init.c| 40 ++--- 2 files changed, 177 insertions(+), 169 deletions(-) diff --git a/libavcodec/x86/h264_intrapred_10bit.asm b/libavcodec/x86/h264_intrapred_10bit.asm index 529134e..c3f6dc4 100644 --- a/libavcodec/x86/h264_intrapred_10bit.asm +++ b/libavcodec/x86/h264_intrapred_10bit.asm @@ -53,8 +53,8 @@ SECTION .text ;- ; void pred4x4_down_right(pixel *src, const pixel *topright, int stride) ;- -%macro PRED4x4_DR 1 -cglobal pred4x4_down_right_10_%1, 3,3 +%macro PRED4x4_DR 0 +cglobal pred4x4_down_right_10, 3, 3 sub r0, r2 lea r1, [r0+r2*2] movhpsm1, [r1-8] @@ -79,21 +79,22 @@ cglobal pred4x4_down_right_10_%1, 3,3 RET %endmacro -INIT_XMM +INIT_XMM sse2 %define PALIGNR PALIGNR_MMX -PRED4x4_DR sse2 +PRED4x4_DR +INIT_XMM ssse3 %define PALIGNR PALIGNR_SSSE3 -PRED4x4_DR ssse3 +PRED4x4_DR %if HAVE_AVX_EXTERNAL -INIT_AVX -PRED4x4_DR avx +INIT_XMM avx +PRED4x4_DR %endif ;- ; void pred4x4_vertical_right(pixel *src, const pixel *topright, int stride) ;- -%macro PRED4x4_VR 1 -cglobal pred4x4_vertical_right_10_%1, 3,3,6 +%macro PRED4x4_VR 0 +cglobal pred4x4_vertical_right_10, 3, 3, 6 sub r0, r2 lea r1, [r0+r2*2] movqm5, [r0]; t3t2t1t0 @@ -119,21 +120,22 @@ cglobal pred4x4_vertical_right_10_%1, 3,3,6 RET %endmacro -INIT_XMM +INIT_XMM sse2 %define PALIGNR PALIGNR_MMX -PRED4x4_VR sse2 +PRED4x4_VR +INIT_XMM ssse3 %define PALIGNR PALIGNR_SSSE3 -PRED4x4_VR ssse3 +PRED4x4_VR %if HAVE_AVX_EXTERNAL -INIT_AVX -PRED4x4_VR avx +INIT_XMM avx +PRED4x4_VR %endif ;- ; void pred4x4_horizontal_down(pixel *src, const pixel *topright, int stride) ;- -%macro PRED4x4_HD 1 -cglobal pred4x4_horizontal_down_10_%1, 3,3 +%macro PRED4x4_HD 0 +cglobal pred4x4_horizontal_down_10, 3, 3 subr0, r2 lear1, [r0+r2*2] movq m0, [r0-8] ; lt .. @@ -162,14 +164,15 @@ cglobal pred4x4_horizontal_down_10_%1, 3,3 RET %endmacro -INIT_XMM +INIT_XMM sse2 %define PALIGNR PALIGNR_MMX -PRED4x4_HD sse2 +PRED4x4_HD +INIT_XMM ssse3 %define PALIGNR PALIGNR_SSSE3 -PRED4x4_HD ssse3 +PRED4x4_HD %if HAVE_AVX_EXTERNAL -INIT_AVX -PRED4x4_HD avx +INIT_XMM avx +PRED4x4_HD %endif ;- @@ -192,8 +195,8 @@ PRED4x4_HD avx HADDD %1, %2 %endmacro -INIT_MMX -cglobal pred4x4_dc_10_mmxext, 3,3 +INIT_MMX mmx2 +cglobal pred4x4_dc_10, 3, 3 subr0, r2 lear1, [r0+r2*2] movq m2, [r0+r2*1-8] @@ -216,8 +219,8 @@ cglobal pred4x4_dc_10_mmxext, 3,3 ;- ; void pred4x4_down_left(pixel *src, const pixel *topright, int stride) ;- -%macro PRED4x4_DL 1 -cglobal pred4x4_down_left_10_%1, 3,3 +%macro PRED4x4_DL 0 +cglobal pred4x4_down_left_10, 3, 3 subr0, r2 movq m0, [r0] movhps m0, [r1] @@ -236,18 +239,18 @@ cglobal pred4x4_down_left_10_%1, 3,3 RET %endmacro -INIT_XMM -PRED4x4_DL sse2 +INIT_XMM sse2 +PRED4x4_DL %if HAVE_AVX_EXTERNAL -INIT_AVX -PRED4x4_DL avx +INIT_XMM avx +PRED4x4_DL %endif ;- ; void pred4x4_vertical_left(pixel *src, const pixel *topright, int stride) ;- -%macro PRED4x4_VL 1 -cglobal pred4x4_vertical_left_10_%1, 3,3 +%macro PRED4x4_VL 0 +cglobal pred4x4_vertical_left_10, 3, 3 subr0, r2 movu m1, [r0] movhps m1, [r1] @@ -265,18 +268,18 @@ cglobal pred4x4_vertical_left_10_%1, 3,3 RET %endmacro -INIT_XMM -PRED4x4_VL sse2 +INIT_XMM sse2 +PRED4x4_VL %if HAVE_AVX_EXTERNAL -INIT_AVX -PRED4x4_VL avx +INIT_XMM avx +PRED4x4_VL %endif ;- ; void pred4x4_horizontal_up(pixel *src, const pixel *topright, int stride) ;- -INIT_MMX -
[libav-devel] [PATCH] x86: lavr: fix stack allocation for 7 and 8 channel downmixing on x86-32
From: Ronald S. Bultje Fixes crashes on Win32 and stack overruns on x86-32 in general. --- libavresample/x86/audio_mix.asm |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/libavresample/x86/audio_mix.asm b/libavresample/x86/audio_mix.asm index 0c4a9bd..cdc787d 100644 --- a/libavresample/x86/audio_mix.asm +++ b/libavresample/x86/audio_mix.asm @@ -280,6 +280,13 @@ cglobal mix_%1_to_%2_%3_flt, 3,in_channels+2,needed_mmregs+matrix_elements_mm, s sub rsp, matrix_elements_stack * mmsize %else %assign pad matrix_elements_stack * mmsize + (mmsize - gprsize) - (stack_offset & (mmsize - gprsize)) +; on x86-32 for 7 and 8 channels we need more stack space for src pointers +%if ARCH_X86_32 && in_channels >= 7 +%assign pad pad + 0x10 +%define src5m [rsp+0xc0] +%define src6m [rsp+0xc4] +%define src7m [rsp+0xc8] +%endif SUB rsp, pad %endif %endif -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] FATE: fix (AD)PCM test dependencies broken in e519990
--- Not sure this is the right way, but it fixes FATE after a distclean for me --- tests/fate/acodec.mak |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak index 531f2f3..71521ab 100644 --- a/tests/fate/acodec.mak +++ b/tests/fate/acodec.mak @@ -19,7 +19,7 @@ FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64BE, AU) += f64be FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64LE, WAV) += f64le FATE_ACODEC_PCM := $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%) -FATE_AVCONV += $(FATE_ACODEC_PCM) +FATE_ACODEC += $(FATE_ACODEC_PCM) fate-acodec-pcm: $(FATE_ACODEC_PCM) fate-acodec-pcm-%: FMT = wav @@ -37,7 +37,7 @@ FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_SWF, FLV) += swf FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_YAMAHA, WAV) += yamaha FATE_ACODEC_ADPCM := $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%) -FATE_AVCONV += $(FATE_ACODEC_ADPCM) +FATE_ACODEC += $(FATE_ACODEC_ADPCM) fate-acodec-adpcm: $(FATE_ACODEC_ADPCM) fate-acodec-adpcm-%: CODEC = adpcm_$(@:fate-acodec-adpcm-%=%) -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] avcodec: Add a RFC 3389 comfort noise codec
On Mon, 29 Oct 2012, Anton Khirnov wrote: On Sat, 27 Oct 2012 23:34:17 +0300, Martin Storsjö wrote: This isn't too useful as a normal codec, but can be used in voip style applications. The decoder updates the noise generator parameters when a packet is given to it for decoding, but if called with an empty packet, it generates more noise according to the last parameters. --- References: https://tools.ietf.org/html/rfc3389 http://www.itu.int/rec/T-REC-G.711-22-I!AppII/en http://webrtc.googlecode.com/svn/trunk/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c --- configure |1 + libavcodec/Makefile |2 + libavcodec/allcodecs.c |1 + libavcodec/avcodec.h|1 + libavcodec/cngdec.c | 162 +++ libavcodec/cngenc.c | 116 + libavcodec/codec_desc.c |7 ++ libavcodec/version.h|2 +- 8 files changed, 291 insertions(+), 1 deletion(-) create mode 100644 libavcodec/cngdec.c create mode 100644 libavcodec/cngenc.c diff --git a/configure b/configure index 81f945f..30c17a6 100755 --- a/configure +++ b/configure @@ -1440,6 +1440,7 @@ atrac3_decoder_select="mdct" binkaudio_dct_decoder_select="mdct rdft dct sinewin" binkaudio_rdft_decoder_select="mdct rdft sinewin" cavs_decoder_select="golomb mpegvideo" +comfortnoise_encoder_select="lpc" cook_decoder_select="mdct sinewin" cscd_decoder_select="lzo" cscd_decoder_suggest="zlib" diff --git a/libavcodec/Makefile b/libavcodec/Makefile index d8c853a..4d14aea 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -129,6 +129,8 @@ OBJS-$(CONFIG_CLJR_DECODER)+= cljr.o OBJS-$(CONFIG_CLJR_ENCODER)+= cljr.o OBJS-$(CONFIG_CLLC_DECODER)+= cllc.o OBJS-$(CONFIG_COOK_DECODER)+= cook.o +OBJS-$(CONFIG_COMFORTNOISE_DECODER)+= cngdec.o celp_filters.o +OBJS-$(CONFIG_COMFORTNOISE_ENCODER)+= cngenc.o OBJS-$(CONFIG_CSCD_DECODER)+= cscd.o OBJS-$(CONFIG_CYUV_DECODER)+= cyuv.o OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadsp.o \ diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index b175fbb..e5fb351 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -91,6 +91,7 @@ void avcodec_register_all(void) REGISTER_DECODER (CINEPAK, cinepak); REGISTER_ENCDEC (CLJR, cljr); REGISTER_DECODER (CLLC, cllc); +REGISTER_ENCDEC (COMFORTNOISE, comfortnoise); REGISTER_DECODER (CSCD, cscd); REGISTER_DECODER (CYUV, cyuv); REGISTER_DECODER (DFA, dfa); diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index c505a92..d6a4e4d 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -406,6 +406,7 @@ enum AVCodecID { AV_CODEC_ID_IAC, AV_CODEC_ID_ILBC, AV_CODEC_ID_OPUS, +AV_CODEC_ID_COMFORT_NOISE, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c new file mode 100644 index 000..8e3abd2 --- /dev/null +++ b/libavcodec/cngdec.c + +AVCodec ff_comfortnoise_decoder = { +.name = "comfortnoise", +.type = AVMEDIA_TYPE_AUDIO, +.id = AV_CODEC_ID_COMFORT_NOISE, +.priv_data_size = sizeof(CNGContext), +.init = cng_decode_init, +.decode = cng_decode_frame, +.close = cng_decode_close, +.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise generator"), +.sample_fmts= (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, + AV_SAMPLE_FMT_NONE }, +.capabilities = CODEC_CAP_DELAY, CODEC_CAP_DR1? Amended locally // Martin___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/6] float_dsp: add vector_dmul_scalar() to multiply a vector of doubles
On 09/29/2012 01:17 AM, Justin Ruggles wrote: > Include x86-optimized versions for SSE2 and AVX. > --- > libavutil/float_dsp.c |9 + > libavutil/float_dsp.h | 15 +++ > libavutil/x86/float_dsp.asm| 40 > > libavutil/x86/float_dsp_init.c |9 + > libavutil/x86/x86util.asm | 11 +++ > 5 files changed, 84 insertions(+), 0 deletions(-) > > diff --git a/libavutil/float_dsp.c b/libavutil/float_dsp.c > index b6b1181..22139de 100644 > --- a/libavutil/float_dsp.c > +++ b/libavutil/float_dsp.c > @@ -44,11 +44,20 @@ static void vector_fmul_scalar_c(float *dst, const float > *src, float mul, > dst[i] = src[i] * mul; > } > > +static void vector_dmul_scalar_c(double *dst, const double *src, double mul, > + int len) > +{ > +int i; > +for (i = 0; i < len; i++) > +dst[i] = src[i] * mul; > +} > + > void avpriv_float_dsp_init(AVFloatDSPContext *fdsp, int bit_exact) > { > fdsp->vector_fmul = vector_fmul_c; > fdsp->vector_fmac_scalar = vector_fmac_scalar_c; > fdsp->vector_fmul_scalar = vector_fmul_scalar_c; > +fdsp->vector_dmul_scalar = vector_dmul_scalar_c; > > #if ARCH_ARM > ff_float_dsp_init_arm(fdsp); > diff --git a/libavutil/float_dsp.h b/libavutil/float_dsp.h > index cb4b28f..41b73c5 100644 > --- a/libavutil/float_dsp.h > +++ b/libavutil/float_dsp.h > @@ -66,6 +66,21 @@ typedef struct AVFloatDSPContext { > */ > void (*vector_fmul_scalar)(float *dst, const float *src, float mul, > int len); > + > +/** > + * Multiply a vector of double by a scalar double. Source and > + * destination vectors must overlap exactly or not at all. > + * > + * @param dst result vector > + *constraints: 32-byte aligned > + * @param src input vector > + *constraints: 32-byte aligned > + * @param mul scalar value > + * @param len length of vector > + *constraints: multiple of 8 > + */ > +void (*vector_dmul_scalar)(double *dst, const double *src, double mul, > + int len); > } AVFloatDSPContext; > > /** > diff --git a/libavutil/x86/float_dsp.asm b/libavutil/x86/float_dsp.asm > index 7201ded..e2e023c 100644 > --- a/libavutil/x86/float_dsp.asm > +++ b/libavutil/x86/float_dsp.asm > @@ -119,3 +119,43 @@ cglobal vector_fmul_scalar, 4,4,3, dst, src, mul, len > > INIT_XMM sse > VECTOR_FMUL_SCALAR > + > +;-- > +; void ff_vector_dmul_scalar(double *dst, const double *src, double mul, > +;int len) > +;-- > + > +%macro VECTOR_DMUL_SCALAR 0 > +%if UNIX64 > +cglobal vector_dmul_scalar, 3,3,3, dst, src, len > +%else > +cglobal vector_dmul_scalar, 4,4,3, dst, src, mul, len > +%endif > +%if ARCH_X86_32 > +VBROADCASTSD xmm0, mulm > +%else > +%if WIN64 > +movsdxmm0, xmm2 > +%endif > +movlhps xmm0, xmm0 > +%if cpuflag(avx) > +vinsertf128 ymm0, ymm0, xmm0, 1 > +%endif > +%endif > +lea lenq, [lend*8-2*mmsize] > +.loop: > +mulpd m1, m0, [srcq+lenq ] > +mulpd m2, m0, [srcq+lenq+mmsize] > +mova [dstq+lenq ], m1 > +mova [dstq+lenq+mmsize], m2 > +sub lenq, 2*mmsize > +jge .loop > +REP_RET > +%endmacro > + > +INIT_XMM sse2 > +VECTOR_DMUL_SCALAR > +%if HAVE_AVX_EXTERNAL > +INIT_YMM avx > +VECTOR_DMUL_SCALAR > +%endif > diff --git a/libavutil/x86/float_dsp_init.c b/libavutil/x86/float_dsp_init.c > index d14ec6a..b3b7ff4 100644 > --- a/libavutil/x86/float_dsp_init.c > +++ b/libavutil/x86/float_dsp_init.c > @@ -35,6 +35,11 @@ extern void ff_vector_fmac_scalar_avx(float *dst, const > float *src, float mul, > extern void ff_vector_fmul_scalar_sse(float *dst, const float *src, float > mul, >int len); > > +extern void ff_vector_dmul_scalar_sse2(double *dst, const double *src, > + double mul, int len); > +extern void ff_vector_dmul_scalar_avx(double *dst, const double *src, > + double mul, int len); > + > void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) > { > int mm_flags = av_get_cpu_flags(); > @@ -44,8 +49,12 @@ void ff_float_dsp_init_x86(AVFloatDSPContext *fdsp) > fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_sse; > fdsp->vector_fmul_scalar = ff_vector_fmul_scalar_sse; > } > +if (EXTERNAL_SSE2(mm_flags)) { > +fdsp->vector_dmul_scalar = ff_vector_dmul_scalar_sse2; > +} > if (EXTERNAL_AVX(mm_flags)) { > fdsp->vector_fmul = ff_vector_fmul_avx; > fdsp->vector_fmac_scalar = ff_vector_fmac_scalar_avx; > +fdsp->vector_dmul_scala
Re: [libav-devel] [PATCH 1/2] Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
On 10/28/2012 09:39 PM, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/x86/h264_intrapred_10bit.asm | 306 > > libavcodec/x86/h264_intrapred_init.c| 40 ++--- > 2 files changed, 177 insertions(+), 169 deletions(-) The patch itself looks good. But yeah, it does do more than just change "INIT_AVX" to "INIT_XMM avx". Thanks, Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavfi: add ashowinfo filter
On 10/23/2012 03:40 PM, Anton Khirnov wrote: > It can be useful for debugging. > > Based on a patch by Stefano Sabatini > --- > Changelog |1 + > doc/filters.texi | 41 ++ > libavfilter/Makefile |1 + > libavfilter/af_ashowinfo.c | 135 > > libavfilter/allfilters.c |1 + > libavfilter/version.h |2 +- > 6 files changed, 180 insertions(+), 1 deletion(-) > create mode 100644 libavfilter/af_ashowinfo.c LGTM with the changes Diego pointed out. -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 3/3] avcodec: Add a RFC 3389 comfort noise codec
On Sat, 27 Oct 2012 23:34:17 +0300, Martin Storsjö wrote: > This isn't too useful as a normal codec, but can be used in > voip style applications. The decoder updates the noise > generator parameters when a packet is given to it for decoding, > but if called with an empty packet, it generates more noise > according to the last parameters. > > --- > References: > https://tools.ietf.org/html/rfc3389 > http://www.itu.int/rec/T-REC-G.711-22-I!AppII/en > http://webrtc.googlecode.com/svn/trunk/webrtc/modules/audio_coding/codecs/cng/webrtc_cng.c > --- > configure |1 + > libavcodec/Makefile |2 + > libavcodec/allcodecs.c |1 + > libavcodec/avcodec.h|1 + > libavcodec/cngdec.c | 162 > +++ > libavcodec/cngenc.c | 116 + > libavcodec/codec_desc.c |7 ++ > libavcodec/version.h|2 +- > 8 files changed, 291 insertions(+), 1 deletion(-) > create mode 100644 libavcodec/cngdec.c > create mode 100644 libavcodec/cngenc.c > > diff --git a/configure b/configure > index 81f945f..30c17a6 100755 > --- a/configure > +++ b/configure > @@ -1440,6 +1440,7 @@ atrac3_decoder_select="mdct" > binkaudio_dct_decoder_select="mdct rdft dct sinewin" > binkaudio_rdft_decoder_select="mdct rdft sinewin" > cavs_decoder_select="golomb mpegvideo" > +comfortnoise_encoder_select="lpc" > cook_decoder_select="mdct sinewin" > cscd_decoder_select="lzo" > cscd_decoder_suggest="zlib" > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index d8c853a..4d14aea 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -129,6 +129,8 @@ OBJS-$(CONFIG_CLJR_DECODER)+= cljr.o > OBJS-$(CONFIG_CLJR_ENCODER)+= cljr.o > OBJS-$(CONFIG_CLLC_DECODER)+= cllc.o > OBJS-$(CONFIG_COOK_DECODER)+= cook.o > +OBJS-$(CONFIG_COMFORTNOISE_DECODER)+= cngdec.o celp_filters.o > +OBJS-$(CONFIG_COMFORTNOISE_ENCODER)+= cngenc.o > OBJS-$(CONFIG_CSCD_DECODER)+= cscd.o > OBJS-$(CONFIG_CYUV_DECODER)+= cyuv.o > OBJS-$(CONFIG_DCA_DECODER) += dcadec.o dca.o dcadsp.o \ > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c > index b175fbb..e5fb351 100644 > --- a/libavcodec/allcodecs.c > +++ b/libavcodec/allcodecs.c > @@ -91,6 +91,7 @@ void avcodec_register_all(void) > REGISTER_DECODER (CINEPAK, cinepak); > REGISTER_ENCDEC (CLJR, cljr); > REGISTER_DECODER (CLLC, cllc); > +REGISTER_ENCDEC (COMFORTNOISE, comfortnoise); > REGISTER_DECODER (CSCD, cscd); > REGISTER_DECODER (CYUV, cyuv); > REGISTER_DECODER (DFA, dfa); > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h > index c505a92..d6a4e4d 100644 > --- a/libavcodec/avcodec.h > +++ b/libavcodec/avcodec.h > @@ -406,6 +406,7 @@ enum AVCodecID { > AV_CODEC_ID_IAC, > AV_CODEC_ID_ILBC, > AV_CODEC_ID_OPUS, > +AV_CODEC_ID_COMFORT_NOISE, > > /* subtitle codecs */ > AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing > at the start of subtitle codecs. > diff --git a/libavcodec/cngdec.c b/libavcodec/cngdec.c > new file mode 100644 > index 000..8e3abd2 > --- /dev/null > +++ b/libavcodec/cngdec.c > + > +AVCodec ff_comfortnoise_decoder = { > +.name = "comfortnoise", > +.type = AVMEDIA_TYPE_AUDIO, > +.id = AV_CODEC_ID_COMFORT_NOISE, > +.priv_data_size = sizeof(CNGContext), > +.init = cng_decode_init, > +.decode = cng_decode_frame, > +.close = cng_decode_close, > +.long_name = NULL_IF_CONFIG_SMALL("RFC 3389 comfort noise > generator"), > +.sample_fmts= (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16, > + AV_SAMPLE_FMT_NONE }, > +.capabilities = CODEC_CAP_DELAY, CODEC_CAP_DR1? -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] lavfi: add ashowinfo filter
On Mon, 29 Oct 2012 15:07:59 +0100, Diego Biurrun wrote: > On Sun, Oct 28, 2012 at 11:02:26PM +0100, Anton Khirnov wrote: > > > > On Tue, 23 Oct 2012 21:55:13 +0200, Diego Biurrun wrote: > > > On Tue, Oct 23, 2012 at 09:40:08PM +0200, Anton Khirnov wrote: > > > > --- a/doc/filters.texi > > > > +++ b/doc/filters.texi > > > > @@ -175,6 +175,47 @@ stream ends. The default value is 2 seconds. > > > > + > > > > +@item pts > > > > +presentation timestamp of the input frame, in time base units. The > > > > time base > > > > +depends on the filter input pad, and is usually 1/@var{sample_rate}. > > > > > > Start capitalized and replace the period by a semicolon. > > > > ?? > > > > Doing both conflicts with all that I consider to be good and just. > > > > Either it is a proper sentence, then it starts capitalized and ends with a > > period. Or it is not a proper sentence, just a short description or > > whatever. In > > which case there is no need for it to start capitalized. > > And that's why I'm telling you to merge the non-sentence into the proper > sentence following it by means of a semicolon. Having a paragraph consist > of a non-sentence and a proper sentence is bad style IMO. > hmm...ok, changed locally. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/3] lpc: Add a function for calculating reflection coefficients from samples
On Sat, 27 Oct 2012, Martin Storsjö wrote: --- Is there any point in having this function, or should the caller just call these three functions manually? --- libavcodec/lpc.c | 12 libavcodec/lpc.h |3 +++ 2 files changed, 15 insertions(+) This (and 1/3) ok'd by Justin on irc, 3/3 was previously ok'd by Kostya, will push in a little while. // Martin___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/4] aacdec: use float planar sample format for output
--- libavcodec/aac.h|7 ++- libavcodec/aacdec.c | 102 ++ libavcodec/aacsbr.c |6 +-- 3 files changed, 67 insertions(+), 48 deletions(-) diff --git a/libavcodec/aac.h b/libavcodec/aac.h index 9c6ac27..6c5d962 100644 --- a/libavcodec/aac.h +++ b/libavcodec/aac.h @@ -236,9 +236,10 @@ typedef struct SingleChannelElement { uint8_t zeroes[128];///< band is not coded (used by encoder) DECLARE_ALIGNED(32, float, coeffs)[1024]; ///< coefficients for IMDCT DECLARE_ALIGNED(32, float, saved)[1024]; ///< overlap -DECLARE_ALIGNED(32, float, ret)[2048];///< PCM output +DECLARE_ALIGNED(32, float, ret_buf)[2048];///< PCM output buffer DECLARE_ALIGNED(16, float, ltp_state)[3072]; ///< time signal for LTP PredictorState predictor_state[MAX_PREDICTORS]; +float *ret; ///< PCM output } SingleChannelElement; /** @@ -297,10 +298,10 @@ typedef struct AACContext { /** @} */ /** - * @name Members used for output interleaving + * @name Members used for output * @{ */ -float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output). +SingleChannelElement *output_element[MAX_CHANNELS]; ///< Points to each SingleChannelElement /** @} */ DECLARE_ALIGNED(32, float, temp)[128]; diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index b7caecb..70a3b45 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -149,10 +149,10 @@ static av_cold int che_configure(AACContext *ac, ff_aac_sbr_ctx_init(ac, &ac->che[type][id]->sbr); } if (type != TYPE_CCE) { -ac->output_data[(*channels)++] = ac->che[type][id]->ch[0].ret; +ac->output_element[(*channels)++] = &ac->che[type][id]->ch[0]; if (type == TYPE_CPE || (type == TYPE_SCE && ac->oc[1].m4ac.ps == 1)) { -ac->output_data[(*channels)++] = ac->che[type][id]->ch[1].ret; +ac->output_element[(*channels)++] = &ac->che[type][id]->ch[1]; } } } else { @@ -163,6 +163,38 @@ static av_cold int che_configure(AACContext *ac, return 0; } +static int frame_configure_elements(AVCodecContext *avctx) +{ +AACContext *ac = avctx->priv_data; +int type, id, ch, ret; + +/* set channel pointers to internal buffers by default */ +for (type = 0; type < 4; type++) { +for (id = 0; id < MAX_ELEM_ID; id++) { +ChannelElement *che = ac->che[type][id]; +if (che) { +che->ch[0].ret = che->ch[0].ret_buf; +che->ch[1].ret = che->ch[1].ret_buf; +} +} +} + +/* get output buffer */ +ac->frame.nb_samples = 2048; +if ((ret = avctx->get_buffer(avctx, &ac->frame)) < 0) { +av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); +return ret; +} + +/* map output channel pointers to AVFrame data */ +for (ch = 0; ch < avctx->channels; ch++) { +if (ac->output_element[ch]) +ac->output_element[ch]->ret = (float *)ac->frame.extended_data[ch]; +} + +return 0; +} + struct elem_to_channel { uint64_t av_position; uint8_t syn_ele; @@ -378,8 +410,9 @@ static void pop_output_configuration(AACContext *ac) { * @return Returns error status. 0 - OK, !0 - error */ static int output_configure(AACContext *ac, -uint8_t layout_map[MAX_ELEM_ID*4][3], int tags, -int channel_config, enum OCStatus oc_type) +uint8_t layout_map[MAX_ELEM_ID*4][3], int tags, +int channel_config, enum OCStatus oc_type, +int get_new_frame) { AVCodecContext *avctx = ac->avctx; int i, channels = 0, ret; @@ -417,6 +450,11 @@ static int output_configure(AACContext *ac, avctx->channels = ac->oc[1].channels = channels; ac->oc[1].status = oc_type; +if (get_new_frame) { +if ((ret = frame_configure_elements(ac->avctx)) < 0) +return ret; +} + return 0; } @@ -457,7 +495,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) 2) < 0) return NULL; if (output_configure(ac, layout_map, layout_map_tags, - 2, OC_TRIAL_FRAME) < 0) + 2, OC_TRIAL_FRAME, 1) < 0) return NULL; ac->oc[1].m4ac.chan_config = 2; @@ -473,7 +511,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id) 1) < 0) return NULL; if (output_configure(ac, layout_map, layout_map_tags, - 1, OC_TRIAL_FRAME) < 0) +
Re: [libav-devel] [PATCH 09/10] avconv: Drop unused function argument from do_video_stats()
On Fri, Oct 26, 2012 at 01:15:59PM +0200, Diego Biurrun wrote: > --- > avconv.c |5 ++--- > 1 files changed, 2 insertions(+), 3 deletions(-) OKed by Anton on IRC. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] fate: Add shorthands for acodec PCM and ADPCM tests
On 10/20/2012 09:46 AM, Diego Biurrun wrote: > --- > tests/fate/acodec.mak |8 ++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak > index 609559c..531f2f3 100644 > --- a/tests/fate/acodec.mak > +++ b/tests/fate/acodec.mak > @@ -18,7 +18,9 @@ FATE_ACODEC_PCM-$(call ENCDEC, PCM_F32LE, WAV) += f32le > FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64BE, AU) += f64be > FATE_ACODEC_PCM-$(call ENCDEC, PCM_F64LE, WAV) += f64le > > -FATE_ACODEC += $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%) > +FATE_ACODEC_PCM := $(FATE_ACODEC_PCM-yes:%=fate-acodec-pcm-%) > +FATE_AVCONV += $(FATE_ACODEC_PCM) > +fate-acodec-pcm: $(FATE_ACODEC_PCM) > > fate-acodec-pcm-%: FMT = wav > fate-acodec-pcm-%: CODEC = pcm_$(@:fate-acodec-pcm-%=%) > @@ -34,7 +36,9 @@ FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_MS, WAV) += ms > FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_SWF, FLV) += swf > FATE_ACODEC_ADPCM-$(call ENCDEC, ADPCM_YAMAHA, WAV) += yamaha > > -FATE_ACODEC += $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%) > +FATE_ACODEC_ADPCM := $(FATE_ACODEC_ADPCM-yes:%=fate-acodec-adpcm-%) > +FATE_AVCONV += $(FATE_ACODEC_ADPCM) > +fate-acodec-adpcm: $(FATE_ACODEC_ADPCM) > > fate-acodec-adpcm-%: CODEC = adpcm_$(@:fate-acodec-adpcm-%=%) > looks ok -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 06/12] fate: ac3: Place E-AC-3 tests and AC-3 tests in different groups
On 10/20/2012 12:53 PM, Diego Biurrun wrote: > --- > fate-ac3 target not split anymore. > > tests/fate/ac3.mak | 21 - > 1 files changed, 12 insertions(+), 9 deletions(-) > > diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak > index b2bfb8e..235414d 100644 > --- a/tests/fate/ac3.mak > +++ b/tests/fate/ac3.mak > @@ -26,23 +26,23 @@ FATE_AC3 += fate-ac3-5.1-downmix-stereo > fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channels 2 -i > $(SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 > fate-ac3-5.1-downmix-stereo: REF = > $(SAMPLES)/ac3/monsters_inc_5.1_448_small_stereo.pcm > > -FATE_AC3 += fate-eac3-1 > +FATE_EAC3 += fate-eac3-1 > fate-eac3-1: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.eac3 > fate-eac3-1: REF = $(SAMPLES)/eac3/csi_miami_5.1_256_spx_small.pcm > > -FATE_AC3 += fate-eac3-2 > +FATE_EAC3 += fate-eac3-2 > fate-eac3-2: CMD = pcm -i $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.eac3 > fate-eac3-2: REF = $(SAMPLES)/eac3/csi_miami_stereo_128_spx_small.pcm > > -FATE_AC3 += fate-eac3-3 > +FATE_EAC3 += fate-eac3-3 > fate-eac3-3: CMD = pcm -i > $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.eac3 > fate-eac3-3: REF = $(SAMPLES)/eac3/matrix2_commentary1_stereo_192_small.pcm > > -FATE_AC3 += fate-eac3-4 > +FATE_EAC3 += fate-eac3-4 > fate-eac3-4: CMD = pcm -i > $(SAMPLES)/eac3/serenity_english_5.1_1536_small.eac3 > fate-eac3-4: REF = $(SAMPLES)/eac3/serenity_english_5.1_1536_small.pcm > > -$(FATE_AC3): CMP = oneoff > +$(FATE_AC3) $(FATE_EAC3): CMP = oneoff > > FATE_AC3_ENCODE += fate-ac3-encode > fate-ac3-encode: CMD = enc_dec_pcm ac3 wav s16le $(REF) -c:a ac3 -b:a 128k > @@ -51,7 +51,7 @@ fate-ac3-encode: CMP_TARGET = 399.62 > fate-ac3-encode: SIZE_TOLERANCE = 488 > fate-ac3-encode: FUZZ = 3 > > -FATE_AC3_ENCODE += fate-eac3-encode > +FATE_EAC3_ENCODE += fate-eac3-encode > fate-eac3-encode: CMD = enc_dec_pcm eac3 wav s16le $(REF) -c:a eac3 -b:a 128k > fate-eac3-encode: CMP_SHIFT = -1024 > fate-eac3-encode: CMP_TARGET = 514.02 > @@ -61,12 +61,15 @@ fate-eac3-encode: FUZZ = 3 > fate-ac3-encode fate-eac3-encode: CMP = stddev > fate-ac3-encode fate-eac3-encode: REF = > $(SAMPLES)/audio-reference/luckynight_2ch_44kHz_s16.wav > > -FATE_AC3_ENCODE += fate-ac3-fixed-encode > +FATE_AC3_FIXED_ENCODE += fate-ac3-fixed-encode > fate-ac3-fixed-encode: tests/data/asynth-44100-2.wav > fate-ac3-fixed-encode: SRC = $(TARGET_PATH)/tests/data/asynth-44100-2.wav > fate-ac3-fixed-encode: CMD = md5 -i $(SRC) -c ac3_fixed -b 128k -f ac3 > -flags bitexact > fate-ac3-fixed-encode: CMP = oneline > fate-ac3-fixed-encode: REF = a1d1fc116463b771abf5aef7ed37d7b1 > > -FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) > -fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) > +FATE_SAMPLES_AVCONV += $(FATE_AC3) $(FATE_AC3_ENCODE) > $(FATE_AC3_FIXED_ENCODE) > +FATE_SAMPLES_AVCONV += $(FATE_EAC3) $(FATE_EAC3_ENCODE) > + > +fate-ac3: $(FATE_AC3) $(FATE_AC3_ENCODE) $(FATE_AC3_FIXED_ENCODE) > +fate-ac3: $(FATE_EAC3) $(FATE_EAC3_ENCODE) LGTM -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] cmdutils: Conditionally compile libswscale-related bits
On Mon, 29 Oct 2012 18:38:23 +0100, Diego Biurrun wrote: > This fixes compilation with libswscale disabled. > --- > cmdutils.c |7 ++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/cmdutils.c b/cmdutils.c > index 6570968..630301f 100644 > --- a/cmdutils.c > +++ b/cmdutils.c > @@ -371,7 +371,10 @@ int opt_default(void *optctx, const char *opt, const > char *arg) > const AVOption *o; > char opt_stripped[128]; > const char *p; > -const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc > = sws_get_class(); > +const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); > +#if CONFIG_SWSCALE > +const AVClass *sc = sws_get_class(); > +#endif > > if (!(p = strchr(opt, ':'))) > p = opt + strlen(opt); > @@ -385,6 +388,7 @@ int opt_default(void *optctx, const char *opt, const char > *arg) > else if ((o = av_opt_find(&fc, opt, NULL, 0, >AV_OPT_SEARCH_CHILDREN | > AV_OPT_SEARCH_FAKE_OBJ))) > av_dict_set(&format_opts, opt, arg, FLAGS); > +#if CONFIG_SWSCALE > else if ((o = av_opt_find(&sc, opt, NULL, 0, >AV_OPT_SEARCH_CHILDREN | > AV_OPT_SEARCH_FAKE_OBJ))) { > // XXX we only support sws_flags, not arbitrary sws options > @@ -394,6 +398,7 @@ int opt_default(void *optctx, const char *opt, const char > *arg) > return ret; > } > } > +#endif > > if (o) > return 0; > -- > 1.7.1 > SureWhyNot -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] cmdutils: Conditionally compile libswscale-related bits
This fixes compilation with libswscale disabled. --- cmdutils.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/cmdutils.c b/cmdutils.c index 6570968..630301f 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -371,7 +371,10 @@ int opt_default(void *optctx, const char *opt, const char *arg) const AVOption *o; char opt_stripped[128]; const char *p; -const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(), *sc = sws_get_class(); +const AVClass *cc = avcodec_get_class(), *fc = avformat_get_class(); +#if CONFIG_SWSCALE +const AVClass *sc = sws_get_class(); +#endif if (!(p = strchr(opt, ':'))) p = opt + strlen(opt); @@ -385,6 +388,7 @@ int opt_default(void *optctx, const char *opt, const char *arg) else if ((o = av_opt_find(&fc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) av_dict_set(&format_opts, opt, arg, FLAGS); +#if CONFIG_SWSCALE else if ((o = av_opt_find(&sc, opt, NULL, 0, AV_OPT_SEARCH_CHILDREN | AV_OPT_SEARCH_FAKE_OBJ))) { // XXX we only support sws_flags, not arbitrary sws options @@ -394,6 +398,7 @@ int opt_default(void *optctx, const char *opt, const char *arg) return ret; } } +#endif if (o) return 0; -- 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] Use PRED4x4/8x8/8x8L/16x16 macros to declare x86 intrapred prototypes.
On Sun, Oct 28, 2012 at 08:44:53PM -0700, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/x86/h264_intrapred.asm| 80 +- > libavcodec/x86/h264_intrapred_init.c | 296 > ++- > 2 files changed, 190 insertions(+), 186 deletions(-) This massively conflicts with https://patches.libav.org/patch/25249/ Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] configure: Simplify check_64bit() invocation through a default test
--- configure | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 1a006be..1aae7d6 100755 --- a/configure +++ b/configure @@ -2664,7 +2664,7 @@ check_host_cflags -Wall check_64bit(){ arch32=$1 arch64=$2 -expr=$3 +expr=${3:-'sizeof(void *) > 4'} check_code cc "" "int test[2*($expr) - 1]" && subarch=$arch64 || subarch=$arch32 } @@ -2678,18 +2678,18 @@ case "$arch" in spic=$shared ;; parisc) -check_64bit parisc parisc64 'sizeof(void *) > 4' +check_64bit parisc parisc64 spic=$shared ;; ppc) -check_64bit ppc ppc64 'sizeof(void *) > 4' +check_64bit ppc ppc64 ;; sparc) -check_64bit sparc sparc64 'sizeof(void *) > 4' +check_64bit sparc sparc64 spic=$shared ;; x86) -check_64bit x86_32 x86_64 'sizeof(void *) > 4' +check_64bit x86_32 x86_64 if test "$subarch" = "x86_64"; then spic=$shared fi -- 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] Use PRED4x4/8x8/8x8L/16x16 macros to declare x86 intrapred prototypes.
On 10/29/2012 04:44 AM, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > If you don't mind x86: use PRED4x4/8x8/8x8L/16x16 macros to declare intrapred prototypes might fit better. lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 02/45] lavc: check channel count after decoder init
On 10/29/2012 03:32 PM, Justin Ruggles wrote: > On 10/23/2012 05:43 PM, Justin Ruggles wrote: >> Ensures the decoder did not set channel count to an insanely high value >> during initialization, which could cause large memory usage when it tries to >> get a buffer during decoding. >> --- >> libavcodec/utils.c |5 + >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/libavcodec/utils.c b/libavcodec/utils.c >> index be6d7ae..8a37ef2 100644 >> --- a/libavcodec/utils.c >> +++ b/libavcodec/utils.c >> @@ -881,6 +881,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext >> *avctx, const AVCodec *code >> avctx->channel_layout = 0; >> } >> } >> +if (avctx->channels && avctx->channels < 0 || >> +avctx->channels > FF_SANE_NB_CHANNELS) { >> +ret = AVERROR(EINVAL); >> +goto free_and_end; >> +} >> } >> end: >> entangled_thread_counter--; > > ping I said it was ok already =) lu ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/11] mov: make enum MovChannelLayoutTag definition standards compliant
On Mon, Oct 29, 2012 at 9:20 AM, Måns Rullgård wrote: > Alex Converse writes: > >> On Fri, Oct 26, 2012 at 5:50 PM, Mans Rullgard wrote: >>> The C99 standard requires that "the expression that defines the value of >>> an enumeration constant shall be an integer constant expression that has >>> a value representable as an int." >>> >>> Signed-off-by: Mans Rullgard >>> --- >>> libavformat/mov_chan.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c >>> index 00a2a4b..d7eb528 100644 >>> --- a/libavformat/mov_chan.c >>> +++ b/libavformat/mov_chan.c >>> @@ -45,7 +45,7 @@ >>> *do not specify a particular ordering of those channels." >>> */ >>> enum MovChannelLayoutTag { >>> -MOV_CH_LAYOUT_UNKNOWN = 0x, >>> +MOV_CH_LAYOUT_UNKNOWN = ( -1 << 16), >> >> Your replacement is undefined: >> >> 6.5.7 Bitwise shift operators >> >> The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated >> bits are filled with zeros. If E1 has an unsigned type, the value of >> the result is E1 × 2^E2 , reduced modulo one more than the maximum >> value representable in the result type. If E1 has a signed type and >> nonnegative value, and E1 × 2^E2 is representable in the result type, >> then that is the resulting value; otherwise, the behavior is >> undefined. > > We shift negative values all the time. > That may be the case, but this patch does not "make enum MovChannelLayoutTag definition standards compliant". ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/11] mov: make enum MovChannelLayoutTag definition standards compliant
Alex Converse writes: > On Fri, Oct 26, 2012 at 5:50 PM, Mans Rullgard wrote: >> The C99 standard requires that "the expression that defines the value of >> an enumeration constant shall be an integer constant expression that has >> a value representable as an int." >> >> Signed-off-by: Mans Rullgard >> --- >> libavformat/mov_chan.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c >> index 00a2a4b..d7eb528 100644 >> --- a/libavformat/mov_chan.c >> +++ b/libavformat/mov_chan.c >> @@ -45,7 +45,7 @@ >> *do not specify a particular ordering of those channels." >> */ >> enum MovChannelLayoutTag { >> -MOV_CH_LAYOUT_UNKNOWN = 0x, >> +MOV_CH_LAYOUT_UNKNOWN = ( -1 << 16), > > Your replacement is undefined: > > 6.5.7 Bitwise shift operators > > The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated > bits are filled with zeros. If E1 has an unsigned type, the value of > the result is E1 × 2^E2 , reduced modulo one more than the maximum > value representable in the result type. If E1 has a signed type and > nonnegative value, and E1 × 2^E2 is representable in the result type, > then that is the resulting value; otherwise, the behavior is > undefined. We shift negative values all the time. -- 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 05/11] mov: make enum MovChannelLayoutTag definition standards compliant
On Fri, Oct 26, 2012 at 5:50 PM, Mans Rullgard wrote: > The C99 standard requires that "the expression that defines the value of > an enumeration constant shall be an integer constant expression that has > a value representable as an int." > > Signed-off-by: Mans Rullgard > --- > libavformat/mov_chan.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c > index 00a2a4b..d7eb528 100644 > --- a/libavformat/mov_chan.c > +++ b/libavformat/mov_chan.c > @@ -45,7 +45,7 @@ > *do not specify a particular ordering of those channels." > */ > enum MovChannelLayoutTag { > -MOV_CH_LAYOUT_UNKNOWN = 0x, > +MOV_CH_LAYOUT_UNKNOWN = ( -1 << 16), Your replacement is undefined: 6.5.7 Bitwise shift operators The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits are filled with zeros. If E1 has an unsigned type, the value of the result is E1 × 2^E2 , reduced modulo one more than the maximum value representable in the result type. If E1 has a signed type and nonnegative value, and E1 × 2^E2 is representable in the result type, then that is the resulting value; otherwise, the behavior is undefined. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
On Mon, Oct 29, 2012 at 04:23:37PM +0100, Janne Grunau wrote: > On 2012-10-29 15:45:43 +0100, Diego Biurrun wrote: > > On Mon, Oct 29, 2012 at 03:19:27PM +0100, Janne Grunau wrote: > > > On 2012-10-29 15:03:45 +0100, Diego Biurrun wrote: > > > > On Sun, Oct 28, 2012 at 01:34:55AM +0200, Janne Grunau wrote: > > > > > Documentation includes only the externally visible API of the > > > > > installed > > > > > headers. > > > > > > > > What about the rest? > > > > > > doxygen doc/Doxyfile > > > > > > If you prefer make support for propose a output directory and a target > > > name. > > > > We could have > > > > doc/doxy/api/ > > doc/doxy/all/ > > > > or similar. > > I'll add it. I'm a little concerned about the prerequisites for all find > $(SRC_PATH) -name *.[ch] looks ugly Alternatively, you could pass Doxygen a number of directories to search for input files. > > Note that this patch only extracts documentation from .h files. I > > suspect that some part of the documentation for the stuff declared in > > those headers is in .c files. > > if that's the case it should be moved Yes, just pointing out that what you guys want to achieve, i.e. a Doxygen target that captures external API only, probably needs a bit more work to get it to the point you wish to reach. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Use ptrdiff_t instead of int for intra pred "stride" function parameter.
On Mon, Oct 29, 2012 at 08:06:31AM -0700, Ronald S. Bultje wrote: > On Mon, Oct 29, 2012 at 7:53 AM, Diego Biurrun wrote: > > On Sun, Oct 28, 2012 at 08:44:54PM -0700, Ronald S. Bultje wrote: > >> From: "Ronald S. Bultje" > >> > >> --- > >> libavcodec/arm/h264pred_init_arm.c | 36 +++--- > >> libavcodec/h264pred.c| 79 > >> libavcodec/h264pred.h| 18 +-- > >> libavcodec/h264pred_template.c | 233 > >> +-- > >> libavcodec/x86/h264_intrapred_init.c | 15 ++- > >> 5 files changed, 264 insertions(+), 117 deletions(-) > > > > Why? > > So you don't have to sign-extend integers in simd functions (or suffer > undefined behaviour if you forget). I've done this before for several > other simd functions, use "git log". Great, so you only have to copy-paste one of those descriptions into the log message of this commit. Please don't just describe a change in the title, also give the reason why you make a change. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
> > --- a/doc/Makefile > > +++ b/doc/Makefile > > @@ -41,6 +42,9 @@ doc/%.1: doc/%.pod $(GENTEXI) > > > > $(DOCS): | doc/ > > > > +doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) | doc/ > > + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ > > Moving the order-only prerequisite to the $(DOCS) line would feel a > bit more natural to me. as you wish Janne ---8<--- Documentation includes only the externally visible API of the installed headers. Based on a patch by Anton Khirnov . --- doc/Makefile| 9 +++-- doc/doxy-wrapper.sh | 14 ++ library.mak | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 doc/doxy-wrapper.sh diff --git a/doc/Makefile b/doc/Makefile index 6353034..d22de79 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) all-$(CONFIG_DOC): documentation +apidoc: doc/doxy/html documentation: $(DOCS) TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) @@ -39,7 +40,10 @@ doc/%.1: TAG = MAN doc/%.1: doc/%.pod $(GENTEXI) $(M)pod2man --section=1 --center=" " --release=" " $< > $@ -$(DOCS): | doc/ +$(DOCS) doc/doxy/html: | doc/ + +doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ install-progs-$(CONFIG_DOC): install-man @@ -54,7 +58,8 @@ uninstall-man: clean:: $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi + $(RM) -r doc/doxy/html -include $(wildcard $(DOCS:%=%.d)) -.PHONY: documentation +.PHONY: apidoc documentation diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh new file mode 100755 index 000..6650e38 --- /dev/null +++ b/doc/doxy-wrapper.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +SRC_PATH="${1}" +DOXYFILE="${2}" + +shift 2 + +doxygen -
Re: [libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
On 2012-10-29 15:45:43 +0100, Diego Biurrun wrote: > On Mon, Oct 29, 2012 at 03:19:27PM +0100, Janne Grunau wrote: > > On 2012-10-29 15:03:45 +0100, Diego Biurrun wrote: > > > On Sun, Oct 28, 2012 at 01:34:55AM +0200, Janne Grunau wrote: > > > > Documentation includes only the externally visible API of the installed > > > > headers. > > > > > > What about the rest? > > > > doxygen doc/Doxyfile > > > > If you prefer make support for propose a output directory and a target > > name. > > We could have > > doc/doxy/api/ > doc/doxy/all/ > > or similar. I'll add it. I'm a little concerned about the prerequisites for all find $(SRC_PATH) -name *.[ch] looks ugly > Note that this patch only extracts documentation from .h files. I > suspect that some part of the documentation for the stuff declared in > those headers is in .c files. if that's the case it should be moved Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/8] lavu: add av_ctz() for trailing zero bit count
On 10/29/2012 10:44 AM, Måns Rullgård wrote: > Justin Ruggles writes: > >> +#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) >> +#ifndef ff_ctz >> +#define ff_ctz(v) (__builtin_ctz(v)) > > Note that __builtin_ctz is undefined for an input of zero. Also, no > need for the parens. > >> +#endif >> +#endif >> + >> +#ifndef ff_ctz >> +#define ff_ctz ff_ctz_c >> +static av_always_inline av_const int ff_ctz_c(int v) >> +{ >> +int c; >> + >> +if (v & 0x1) >> +return 0; >> + >> +c = 1; >> +if (!(v & 0x)) { >> +v >>= 16; >> +c += 16; >> +} >> +if (!(v & 0xff)) { >> +v >>= 8; >> +c += 8; >> +} >> +if (!(v & 0xf)) { >> +v >>= 4; >> +c += 4; >> +} >> +if (!(v & 0x3)) { >> +v >>= 2; >> +c += 2; >> +} >> +c -= v & 0x1; >> + >> +return c; >> +} >> +#endif > > Is it intentional for ff_ctz(0) to return 31? Yes. See the part of the patch that has: +/** + * Trailing zero bit count. + * + * @param v input value. If v is 0, the result is undefined. + * @return the number of trailing 0-bits + */ +int av_ctz(int v); So it doesn't matter what it returns for 0. -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Use ptrdiff_t instead of int for intra pred "stride" function parameter.
Hi, On Mon, Oct 29, 2012 at 7:53 AM, Diego Biurrun wrote: > On Sun, Oct 28, 2012 at 08:44:54PM -0700, Ronald S. Bultje wrote: >> From: "Ronald S. Bultje" >> >> --- >> libavcodec/arm/h264pred_init_arm.c | 36 +++--- >> libavcodec/h264pred.c| 79 >> libavcodec/h264pred.h| 18 +-- >> libavcodec/h264pred_template.c | 233 >> +-- >> libavcodec/x86/h264_intrapred_init.c | 15 ++- >> 5 files changed, 264 insertions(+), 117 deletions(-) > > Why? So you don't have to sign-extend integers in simd functions (or suffer undefined behaviour if you forget). I've done this before for several other simd functions, use "git log". Ronald ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Use ptrdiff_t instead of int for intra pred "stride" function parameter.
On Sun, Oct 28, 2012 at 08:44:54PM -0700, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/arm/h264pred_init_arm.c | 36 +++--- > libavcodec/h264pred.c| 79 > libavcodec/h264pred.h| 18 +-- > libavcodec/h264pred_template.c | 233 > +-- > libavcodec/x86/h264_intrapred_init.c | 15 ++- > 5 files changed, 264 insertions(+), 117 deletions(-) Why? > --- a/libavcodec/x86/h264_intrapred_init.c > +++ b/libavcodec/x86/h264_intrapred_init.c > @@ -23,7 +23,9 @@ > #include "libavcodec/h264pred.h" > > #define PRED4x4(TYPE, DEPTH, OPT) \ > -void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, const > uint8_t *topright, int stride); > +void ff_pred4x4_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \ > +const uint8_t *topright, > \ > +ptrdiff_t stride); > > @@ -52,7 +55,10 @@ PRED8x8(vertical, 10, sse2) > PRED8x8(horizontal, 10, sse2) > > #define PRED8x8L(TYPE, DEPTH, OPT)\ > -void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, int > has_topleft, int has_topright, int stride); > +void ff_pred8x8l_ ## TYPE ## _ ## DEPTH ## _ ## OPT (uint8_t *src, \ > + int has_topleft, \ > + int has_topright, \ > + ptrdiff_t stride); nit: The \ could be aligned. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] Remove INIT_AVX from x86inc.asm.
On Sun, Oct 28, 2012 at 06:39:23PM -0700, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavutil/x86/x86inc.asm | 8 > 1 file changed, 8 deletions(-) https://patches.libav.org/patch/25255/ Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
On Sun, Oct 28, 2012 at 06:39:22PM -0700, Ronald S. Bultje wrote: > From: "Ronald S. Bultje" > > --- > libavcodec/x86/h264_intrapred_10bit.asm | 306 > > libavcodec/x86/h264_intrapred_init.c| 40 ++--- > 2 files changed, 177 insertions(+), 169 deletions(-) > > --- a/libavcodec/x86/h264_intrapred_10bit.asm > +++ b/libavcodec/x86/h264_intrapred_10bit.asm > @@ -79,21 +79,22 @@ cglobal pred4x4_down_right_10_%1, 3,3 > > -INIT_XMM > +INIT_XMM sse2 > %define PALIGNR PALIGNR_MMX > -PRED4x4_DR sse2 > +PRED4x4_DR > +INIT_XMM ssse3 > %define PALIGNR PALIGNR_SSSE3 > -PRED4x4_DR ssse3 > +PRED4x4_DR > %if HAVE_AVX_EXTERNAL > -INIT_AVX > -PRED4x4_DR avx > +INIT_XMM avx > +PRED4x4_DR > %endif The changes only partly match the log message. Also, this duplicates some previous work of mine: https://patches.libav.org/patch/25248/ Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
On Mon, Oct 29, 2012 at 03:19:27PM +0100, Janne Grunau wrote: > On 2012-10-29 15:03:45 +0100, Diego Biurrun wrote: > > On Sun, Oct 28, 2012 at 01:34:55AM +0200, Janne Grunau wrote: > > > Documentation includes only the externally visible API of the installed > > > headers. > > > > What about the rest? > > doxygen doc/Doxyfile > > If you prefer make support for propose a output directory and a target > name. We could have doc/doxy/api/ doc/doxy/all/ or similar. Note that this patch only extracts documentation from .h files. I suspect that some part of the documentation for the stuff declared in those headers is in .c files. > --- a/doc/Makefile > +++ b/doc/Makefile > @@ -41,6 +42,9 @@ doc/%.1: doc/%.pod $(GENTEXI) > > $(DOCS): | doc/ > > +doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) | doc/ > + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ Moving the order-only prerequisite to the $(DOCS) line would feel a bit more natural to me. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/8] lavu: add av_ctz() for trailing zero bit count
Justin Ruggles writes: > +#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) > +#ifndef ff_ctz > +#define ff_ctz(v) (__builtin_ctz(v)) Note that __builtin_ctz is undefined for an input of zero. Also, no need for the parens. > +#endif > +#endif > + > +#ifndef ff_ctz > +#define ff_ctz ff_ctz_c > +static av_always_inline av_const int ff_ctz_c(int v) > +{ > +int c; > + > +if (v & 0x1) > +return 0; > + > +c = 1; > +if (!(v & 0x)) { > +v >>= 16; > +c += 16; > +} > +if (!(v & 0xff)) { > +v >>= 8; > +c += 8; > +} > +if (!(v & 0xf)) { > +v >>= 4; > +c += 4; > +} > +if (!(v & 0x3)) { > +v >>= 2; > +c += 2; > +} > +c -= v & 0x1; > + > +return c; > +} > +#endif Is it intentional for ff_ctz(0) to return 31? -- 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 20/45] flacdec: do not warn on sample rate change
On Mon, Oct 29, 2012 at 10:34:36AM -0400, Justin Ruggles wrote: > On 10/23/2012 05:43 PM, Justin Ruggles wrote: > > --- > > libavcodec/flacdec.c |6 +- > > 1 files changed, 1 insertions(+), 5 deletions(-) > > > > diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c > > index 20af820..10e33f2 100644 > > --- a/libavcodec/flacdec.c > > +++ b/libavcodec/flacdec.c > > @@ -460,12 +460,8 @@ static int decode_frame(FLACContext *s) > > " or frame header\n"); > > return -1; > > } > > -if (fi.samplerate == 0) { > > +if (fi.samplerate == 0) > > fi.samplerate = s->samplerate; > > -} else if (s->samplerate && fi.samplerate != s->samplerate) { > > -av_log(s->avctx, AV_LOG_WARNING, "sample rate changed from %d to > > %d\n", > > - s->samplerate, fi.samplerate); > > -} > > s->samplerate = s->avctx->sample_rate = fi.samplerate; > > > > if (!s->got_streaminfo) { > > ping LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 30/45] qcelpdec: set channel layout
On Mon, Oct 29, 2012 at 10:31:01AM -0400, Justin Ruggles wrote: > On 10/23/2012 05:43 PM, Justin Ruggles wrote: > > --- > > libavcodec/qcelpdec.c |5 - > > 1 files changed, 4 insertions(+), 1 deletions(-) > > > > diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c > > index edb1d24..9c2b354 100644 > > --- a/libavcodec/qcelpdec.c > > +++ b/libavcodec/qcelpdec.c > > @@ -29,6 +29,7 @@ > > > > #include > > > > +#include "libavutil/audioconvert.h" > > #include "avcodec.h" > > #include "internal.h" > > #include "get_bits.h" > > @@ -89,7 +90,9 @@ static av_cold int qcelp_decode_init(AVCodecContext > > *avctx) > > QCELPContext *q = avctx->priv_data; > > int i; > > > > -avctx->sample_fmt = AV_SAMPLE_FMT_FLT; > > +avctx->channels = 1; > > +avctx->channel_layout = AV_CH_LAYOUT_MONO; > > +avctx->sample_fmt = AV_SAMPLE_FMT_FLT; > > > > for (i = 0; i < 10; i++) > > q->prev_lspf[i] = (i + 1) / 11.; > > ping. LGTM ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 20/45] flacdec: do not warn on sample rate change
On 10/23/2012 05:43 PM, Justin Ruggles wrote: > --- > libavcodec/flacdec.c |6 +- > 1 files changed, 1 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c > index 20af820..10e33f2 100644 > --- a/libavcodec/flacdec.c > +++ b/libavcodec/flacdec.c > @@ -460,12 +460,8 @@ static int decode_frame(FLACContext *s) > " or frame header\n"); > return -1; > } > -if (fi.samplerate == 0) { > +if (fi.samplerate == 0) > fi.samplerate = s->samplerate; > -} else if (s->samplerate && fi.samplerate != s->samplerate) { > -av_log(s->avctx, AV_LOG_WARNING, "sample rate changed from %d to > %d\n", > - s->samplerate, fi.samplerate); > -} > s->samplerate = s->avctx->sample_rate = fi.samplerate; > > if (!s->got_streaminfo) { ping -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 19/45] flacdec: allow mid-stream channel layout change
On 10/23/2012 05:43 PM, Justin Ruggles wrote: > Although the libFLAC decoder cannot handle such a change, it is allowed by the > spec and could potentially occur with live streams. > --- > libavcodec/flac.c| 19 +++ > libavcodec/flac.h|3 +++ > libavcodec/flac_parser.c |1 + > libavcodec/flacdec.c | 27 +-- > 4 files changed, 32 insertions(+), 18 deletions(-) ping -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 02/45] lavc: check channel count after decoder init
On 10/23/2012 05:43 PM, Justin Ruggles wrote: > Ensures the decoder did not set channel count to an insanely high value > during initialization, which could cause large memory usage when it tries to > get a buffer during decoding. > --- > libavcodec/utils.c |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/libavcodec/utils.c b/libavcodec/utils.c > index be6d7ae..8a37ef2 100644 > --- a/libavcodec/utils.c > +++ b/libavcodec/utils.c > @@ -881,6 +881,11 @@ int attribute_align_arg avcodec_open2(AVCodecContext > *avctx, const AVCodec *code > avctx->channel_layout = 0; > } > } > +if (avctx->channels && avctx->channels < 0 || > +avctx->channels > FF_SANE_NB_CHANNELS) { > +ret = AVERROR(EINVAL); > +goto free_and_end; > +} > } > end: > entangled_thread_counter--; ping -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 01/45] lavc: move SANE_NB_CHANNELS to internal.h and use it in the PCM decoders
On 10/24/2012 11:25 AM, Justin Ruggles wrote: > --- > libavcodec/internal.h |2 ++ > libavcodec/pcm.c |6 ++ > libavcodec/utils.c|3 +-- > 3 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/libavcodec/internal.h b/libavcodec/internal.h > index e5b1958..231d4b6 100644 > --- a/libavcodec/internal.h > +++ b/libavcodec/internal.h > @@ -30,6 +30,8 @@ > #include "libavutil/pixfmt.h" > #include "avcodec.h" > > +#define FF_SANE_NB_CHANNELS 128U > + > typedef struct InternalBuffer { > uint8_t *base[AV_NUM_DATA_POINTERS]; > uint8_t *data[AV_NUM_DATA_POINTERS]; > diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c > index 1f8f22d..832cb43 100644 > --- a/libavcodec/pcm.c > +++ b/libavcodec/pcm.c > @@ -31,8 +31,6 @@ > #include "mathops.h" > #include "pcm_tablegen.h" > > -#define MAX_CHANNELS 64 > - > static av_cold int pcm_encode_init(AVCodecContext *avctx) > { > avctx->frame_size = 0; > @@ -210,7 +208,7 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx) > PCMDecode *s = avctx->priv_data; > int i; > > -if (avctx->channels <= 0 || avctx->channels > MAX_CHANNELS) { > +if (avctx->channels <= 0) { > av_log(avctx, AV_LOG_ERROR, "PCM channels out of bounds\n"); > return AVERROR(EINVAL); > } > @@ -340,7 +338,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void > *data, > break; > case AV_CODEC_ID_PCM_S16LE_PLANAR: > { > -const uint8_t *src2[MAX_CHANNELS]; > +const uint8_t *src2[FF_SANE_NB_CHANNELS]; > n /= avctx->channels; > for (c = 0; c < avctx->channels; c++) > src2[c] = &src[c * n * 2]; > diff --git a/libavcodec/utils.c b/libavcodec/utils.c > index 10230ca..be6d7ae 100644 > --- a/libavcodec/utils.c > +++ b/libavcodec/utils.c > @@ -758,8 +758,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext > *avctx, const AVCodec *code > if (av_codec_is_decoder(codec)) > av_freep(&avctx->subtitle_header); > > -#define SANE_NB_CHANNELS 128U > -if (avctx->channels > SANE_NB_CHANNELS) { > +if (avctx->channels > FF_SANE_NB_CHANNELS) { > ret = AVERROR(EINVAL); > goto free_and_end; > } ping -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 30/45] qcelpdec: set channel layout
On 10/23/2012 05:43 PM, Justin Ruggles wrote: > --- > libavcodec/qcelpdec.c |5 - > 1 files changed, 4 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c > index edb1d24..9c2b354 100644 > --- a/libavcodec/qcelpdec.c > +++ b/libavcodec/qcelpdec.c > @@ -29,6 +29,7 @@ > > #include > > +#include "libavutil/audioconvert.h" > #include "avcodec.h" > #include "internal.h" > #include "get_bits.h" > @@ -89,7 +90,9 @@ static av_cold int qcelp_decode_init(AVCodecContext *avctx) > QCELPContext *q = avctx->priv_data; > int i; > > -avctx->sample_fmt = AV_SAMPLE_FMT_FLT; > +avctx->channels = 1; > +avctx->channel_layout = AV_CH_LAYOUT_MONO; > +avctx->sample_fmt = AV_SAMPLE_FMT_FLT; > > for (i = 0; i < 10; i++) > q->prev_lspf[i] = (i + 1) / 11.; ping. -Justin ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH 2/8] lavu: add av_ctz() for trailing zero bit count
--- doc/APIchanges |3 ++ libavutil/Makefile |2 +- libavutil/{log2.c => intmath.c} |5 +++ libavutil/intmath.h | 55 +++ libavutil/version.h |2 +- 5 files changed, 65 insertions(+), 2 deletions(-) rename libavutil/{log2.c => intmath.c} (95%) diff --git a/doc/APIchanges b/doc/APIchanges index 24defe4..c8b8fbf 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2012-10-22 API changes, most recent first: +2012-xx-xx - xxx - lavu 52.1.0 - intmath.h + Add av_ctz() for trailing zero bit count + 2012-10-18 - xxx - lavu 51.45.0 - error.h Add AVERROR_EXPERIMENTAL diff --git a/libavutil/Makefile b/libavutil/Makefile index 227a57e..34e9020 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -66,10 +66,10 @@ OBJS = adler32.o \ float_dsp.o \ imgutils.o \ intfloat_readwrite.o \ + intmath.o\ lfg.o\ lls.o\ log.o\ - log2.o \ log2_tab.o \ lzo.o\ mathematics.o\ diff --git a/libavutil/log2.c b/libavutil/intmath.c similarity index 95% rename from libavutil/log2.c rename to libavutil/intmath.c index 18c1b40..8db425c 100644 --- a/libavutil/log2.c +++ b/libavutil/intmath.c @@ -32,3 +32,8 @@ int av_log2_16bit(unsigned v) { return ff_log2_16bit(v); } + +int av_ctz(int v) +{ +return ff_ctz(v); +} diff --git a/libavutil/intmath.h b/libavutil/intmath.h index 2cb3132..94a5589 100644 --- a/libavutil/intmath.h +++ b/libavutil/intmath.h @@ -88,4 +88,59 @@ static av_always_inline av_const int ff_log2_16bit_c(unsigned int v) /** * @} */ + +/** + * @addtogroup lavu_math + * @{ + */ + +#if HAVE_FAST_CLZ && AV_GCC_VERSION_AT_LEAST(3,4) +#ifndef ff_ctz +#define ff_ctz(v) (__builtin_ctz(v)) +#endif +#endif + +#ifndef ff_ctz +#define ff_ctz ff_ctz_c +static av_always_inline av_const int ff_ctz_c(int v) +{ +int c; + +if (v & 0x1) +return 0; + +c = 1; +if (!(v & 0x)) { +v >>= 16; +c += 16; +} +if (!(v & 0xff)) { +v >>= 8; +c += 8; +} +if (!(v & 0xf)) { +v >>= 4; +c += 4; +} +if (!(v & 0x3)) { +v >>= 2; +c += 2; +} +c -= v & 0x1; + +return c; +} +#endif + +/** + * Trailing zero bit count. + * + * @param v input value. If v is 0, the result is undefined. + * @return the number of trailing 0-bits + */ +int av_ctz(int v); + +/** + * @} + */ #endif /* AVUTIL_INTMATH_H */ diff --git a/libavutil/version.h b/libavutil/version.h index ae7fa7a..1659dbd 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -37,7 +37,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 52 -#define LIBAVUTIL_VERSION_MINOR 0 +#define LIBAVUTIL_VERSION_MINOR 1 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ -- 1.7.1 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
Janne Grunau writes: > Documentation includes only the externally visible API of the installed > headers. > > Based on a patch by Anton Khirnov . > --- > Makefile| 2 ++ > doc/Makefile| 7 ++- > doc/doxy-wrapper.sh | 14 ++ > library.mak | 2 ++ > 4 files changed, 24 insertions(+), 1 deletion(-) > create mode 100755 doc/doxy-wrapper.sh > > diff --git a/Makefile b/Makefile > index 1f73a0a..2491987 100644 > --- a/Makefile > +++ b/Makefile > @@ -81,6 +81,8 @@ FFLIBS := avutil > > DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.avpreset) > > +INSTHEADERS := > + Still not needed. -- 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/1] doc: add apidoc target for doxygen API documentation
On 2012-10-29 15:03:45 +0100, Diego Biurrun wrote: > On Sun, Oct 28, 2012 at 01:34:55AM +0200, Janne Grunau wrote: > > Documentation includes only the externally visible API of the installed > > headers. > > What about the rest? doxygen doc/Doxyfile If you prefer make support for propose a output directory and a target name. > > > --- a/doc/Makefile > > +++ b/doc/Makefile > > @@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) > > > > all-$(CONFIG_DOC): documentation > > > > +apidoc: doc/doxy/html > > documentation: $(DOCS) > > This target needs to be marked phony. updated patch attached Janne ---8<--- Documentation includes only the externally visible API of the installed headers. Based on a patch by Anton Khirnov . --- Makefile| 2 ++ doc/Makefile| 7 ++- doc/doxy-wrapper.sh | 14 ++ library.mak | 2 ++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 doc/doxy-wrapper.sh diff --git a/Makefile b/Makefile index 1f73a0a..2491987 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,8 @@ FFLIBS := avutil DATA_FILES := $(wildcard $(SRC_PATH)/presets/*.avpreset) +INSTHEADERS := + SKIPHEADERS = cmdutils_common_opts.h include $(SRC_PATH)/common.mak diff --git a/doc/Makefile b/doc/Makefile index 6353034..d9ccec6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) all-$(CONFIG_DOC): documentation +apidoc: doc/doxy/html documentation: $(DOCS) TEXIDEP = awk '/^@include/ { printf "$@: $(@D)/%s\n", $$2 }' <$< >$(@:%=%.d) @@ -41,6 +42,9 @@ doc/%.1: doc/%.pod $(GENTEXI) $(DOCS): | doc/ +doc/doxy/html: $(SRC_PATH)/doc/Doxyfile $(INSTHEADERS) | doc/ + $(M)$(SRC_PATH)/doc/doxy-wrapper.sh $(SRC_PATH) $^ + install-progs-$(CONFIG_DOC): install-man install-man: $(MANPAGES) @@ -54,7 +58,8 @@ uninstall-man: clean:: $(RM) doc/*.html doc/*.pod doc/*.1 $(CLEANSUFFIXES:%=doc/%) doc/avoptions_*.texi + $(RM) -r doc/doxy/html -include $(wildcard $(DOCS:%=%.d)) -.PHONY: documentation +.PHONY: apidoc documentation diff --git a/doc/doxy-wrapper.sh b/doc/doxy-wrapper.sh new file mode 100755 index 000..6650e38 --- /dev/null +++ b/doc/doxy-wrapper.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +SRC_PATH="${1}" +DOXYFILE="${2}" + +shift 2 + +doxygen -
Re: [libav-devel] [PATCH] lavfi: add ashowinfo filter
On Sun, Oct 28, 2012 at 11:02:26PM +0100, Anton Khirnov wrote: > > On Tue, 23 Oct 2012 21:55:13 +0200, Diego Biurrun wrote: > > On Tue, Oct 23, 2012 at 09:40:08PM +0200, Anton Khirnov wrote: > > > --- a/doc/filters.texi > > > +++ b/doc/filters.texi > > > @@ -175,6 +175,47 @@ stream ends. The default value is 2 seconds. > > > + > > > +@item pts > > > +presentation timestamp of the input frame, in time base units. The time > > > base > > > +depends on the filter input pad, and is usually 1/@var{sample_rate}. > > > > Start capitalized and replace the period by a semicolon. > > ?? > > Doing both conflicts with all that I consider to be good and just. > > Either it is a proper sentence, then it starts capitalized and ends with a > period. Or it is not a proper sentence, just a short description or whatever. > In > which case there is no need for it to start capitalized. And that's why I'm telling you to merge the non-sentence into the proper sentence following it by means of a semicolon. Having a paragraph consist of a non-sentence and a proper sentence is bad style IMO. > > > --- /dev/null > > > +++ b/libavfilter/af_ashowinfo.c > > > @@ -0,0 +1,135 @@ > > > +s->plane_checksums[i] = av_adler32_update(0, data, data_size); > > > +checksum = i ? av_adler32_update(checksum, data, data_size) : > > > + s->plane_checksums[0]; > > > > nit: : below ? is more readable > > I tend to disagree I surely won't heckle. FWIW, Kostya is on my side. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/1] doc: add apidoc target for doxygen API documentation
On Sun, Oct 28, 2012 at 01:34:55AM +0200, Janne Grunau wrote: > Documentation includes only the externally visible API of the installed > headers. What about the rest? > --- a/doc/Makefile > +++ b/doc/Makefile > @@ -14,6 +14,7 @@ DOCS = $(HTMLPAGES) $(MANPAGES) $(PODPAGES) > > all-$(CONFIG_DOC): documentation > > +apidoc: doc/doxy/html > documentation: $(DOCS) This target needs to be marked phony. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lavr: add general API usage doxy
On Mon, Oct 29, 2012 at 02:58:02PM +0100, Diego Biurrun wrote: > On Sun, Oct 28, 2012 at 10:52:54PM +0100, Anton Khirnov wrote: > > > > --- a/libavresample/avresample.h > > +++ b/libavresample/avresample.h > > @@ -23,9 +23,75 @@ > > > > + * E.g. the following code will setup conversion from planar float sample > > format > > Starting a sentence with "e.g." sounds weird to me. I'd start with > "For example,". Forgot to say, LGTM otherwise. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lavr: add general API usage doxy
On Sun, Oct 28, 2012 at 10:52:54PM +0100, Anton Khirnov wrote: > > --- a/libavresample/avresample.h > +++ b/libavresample/avresample.h > @@ -23,9 +23,75 @@ > > + * E.g. the following code will setup conversion from planar float sample > format Starting a sentence with "e.g." sounds weird to me. I'd start with "For example,". Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 05/11] mov: make enum MovChannelLayoutTag definition standards compliant
On Fri, Oct 26, 2012 at 06:29:47PM -0700, Diego Elio Pettenò wrote: > On 26/10/2012 18:18, Måns Rullgård wrote: > > Only to follow the pattern. > > Should yours do the same then, or should one Diego at random send a > patch to remove the rest? I nominate you :) Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 06/11] network: use HAVE_THREADS instead of local hack
On Sat, Oct 27, 2012 at 01:50:54AM +0100, Mans Rullgard wrote: > HAVE_THREADS is set in config.h if pthreads or w32threads is > available, which presumably the proper condition here. > > Also fixes undefined behaviour in preprocessor directives. > > Signed-off-by: Mans Rullgard > --- > libavformat/network.c | 14 ++ > 1 file changed, 6 insertions(+), 8 deletions(-) This also fixes an annoying Doxygen warning. Apparently Doxygen got tripped up by the preprocessor shenanigans previously present in the file. Diego ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] nut: support textual data
On 2012-10-29 13:16:20 +0100, Luca Barbato wrote: > Plain text (utf8 encoded) data can be muxed and demuxed in nut. > --- > > Now with a section for data in the documentation as well. > > doc/nut.texi | 6 ++ > libavformat/nut.c| 7 ++- > libavformat/nut.h| 1 + > libavformat/nutdec.c | 1 + > 4 files changed, 14 insertions(+), 1 deletion(-) > > diff --git a/doc/nut.texi b/doc/nut.texi > index 1c23934..9b84241 100644 > --- a/doc/nut.texi > +++ b/doc/nut.texi > @@ -66,6 +66,12 @@ PFD[32] would for example be signed 32 bit little-endian > IEEE float > @item DVBS @tab DVB subtitles > @end multitable > > +@section Raw Data > + > +@multitable @columnfractions .4 .4 > +@item UTF8 @tab Raw UTF-8 > +@end multitable > + > @section Codecs > > @multitable @columnfractions .4 .4 > diff --git a/libavformat/nut.c b/libavformat/nut.c > index e367d1c..85b126b 100644 > --- a/libavformat/nut.c > +++ b/libavformat/nut.c > @@ -33,6 +33,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = { > { AV_CODEC_ID_NONE, 0 } > }; > > +const AVCodecTag ff_nut_data_tags[] = { > +{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') }, > +{ AV_CODEC_ID_NONE, 0 } > +}; > + > const AVCodecTag ff_nut_video_tags[] = { > { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, > { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, > @@ -117,7 +122,7 @@ const AVCodecTag ff_nut_audio_tags[] = { > > const AVCodecTag * const ff_nut_codec_tags[] = { > ff_nut_video_tags, ff_nut_audio_tags, ff_nut_subtitle_tags, > -ff_codec_bmp_tags, ff_codec_wav_tags, 0 > +ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_data_tags, 0 > }; > > void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ > diff --git a/libavformat/nut.h b/libavformat/nut.h > index a91a109..5f624eb 100644 > --- a/libavformat/nut.h > +++ b/libavformat/nut.h > @@ -106,6 +106,7 @@ typedef struct NUTContext { > extern const AVCodecTag ff_nut_subtitle_tags[]; > extern const AVCodecTag ff_nut_video_tags[]; > extern const AVCodecTag ff_nut_audio_tags[]; > +extern const AVCodecTag ff_nut_data_tags[]; > > extern const AVCodecTag * const ff_nut_codec_tags[]; > > diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c > index 9b1891f..9ce0519 100644 > --- a/libavformat/nutdec.c > +++ b/libavformat/nutdec.c > @@ -371,6 +371,7 @@ static int decode_stream_header(NUTContext *nut) > break; > case 3: > st->codec->codec_type = AVMEDIA_TYPE_DATA; > +st->codec->codec_id = ff_codec_get_id(ff_nut_data_tags, tmp); > break; > default: > av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); ok Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] nut: support textual data
Plain text (utf8 encoded) data can be muxed and demuxed in nut. --- Now with a section for data in the documentation as well. doc/nut.texi | 6 ++ libavformat/nut.c| 7 ++- libavformat/nut.h| 1 + libavformat/nutdec.c | 1 + 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/nut.texi b/doc/nut.texi index 1c23934..9b84241 100644 --- a/doc/nut.texi +++ b/doc/nut.texi @@ -66,6 +66,12 @@ PFD[32] would for example be signed 32 bit little-endian IEEE float @item DVBS @tab DVB subtitles @end multitable +@section Raw Data + +@multitable @columnfractions .4 .4 +@item UTF8 @tab Raw UTF-8 +@end multitable + @section Codecs @multitable @columnfractions .4 .4 diff --git a/libavformat/nut.c b/libavformat/nut.c index e367d1c..85b126b 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -33,6 +33,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = { { AV_CODEC_ID_NONE, 0 } }; +const AVCodecTag ff_nut_data_tags[] = { +{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') }, +{ AV_CODEC_ID_NONE, 0 } +}; + const AVCodecTag ff_nut_video_tags[] = { { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, @@ -117,7 +122,7 @@ const AVCodecTag ff_nut_audio_tags[] = { const AVCodecTag * const ff_nut_codec_tags[] = { ff_nut_video_tags, ff_nut_audio_tags, ff_nut_subtitle_tags, -ff_codec_bmp_tags, ff_codec_wav_tags, 0 +ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_data_tags, 0 }; void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ diff --git a/libavformat/nut.h b/libavformat/nut.h index a91a109..5f624eb 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -106,6 +106,7 @@ typedef struct NUTContext { extern const AVCodecTag ff_nut_subtitle_tags[]; extern const AVCodecTag ff_nut_video_tags[]; extern const AVCodecTag ff_nut_audio_tags[]; +extern const AVCodecTag ff_nut_data_tags[]; extern const AVCodecTag * const ff_nut_codec_tags[]; diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 9b1891f..9ce0519 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -371,6 +371,7 @@ static int decode_stream_header(NUTContext *nut) break; case 3: st->codec->codec_type = AVMEDIA_TYPE_DATA; +st->codec->codec_id = ff_codec_get_id(ff_nut_data_tags, tmp); break; default: av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class); -- 1.7.12 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] indeo3: remove duplicate capabilities line.
On 2012-10-29 12:17:23 +0100, Anton Khirnov wrote: > --- > libavcodec/indeo3.c |1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c > index 322d360..fc0d2bc 100644 > --- a/libavcodec/indeo3.c > +++ b/libavcodec/indeo3.c > @@ -1114,5 +1114,4 @@ AVCodec ff_indeo3_decoder = { > .decode = decode_frame, > .capabilities = CODEC_CAP_DR1, > .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), > -.capabilities = CODEC_CAP_DR1, > }; ok Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
[libav-devel] [PATCH] indeo3: remove duplicate capabilities line.
--- libavcodec/indeo3.c |1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 322d360..fc0d2bc 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -1114,5 +1114,4 @@ AVCodec ff_indeo3_decoder = { .decode = decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), -.capabilities = CODEC_CAP_DR1, }; -- 1.7.10.4 ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [libav-commits] lavc: add CODEC_CAP_DR1 to all video decoders missing them
On Mon, 29 Oct 2012 10:37:31 +, Måns Rullgård wrote: > "Anton Khirnov " writes: > > > diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c > > index fc0d2bc..322d360 100644 > > --- a/libavcodec/indeo3.c > > +++ b/libavcodec/indeo3.c > > @@ -1114,4 +1114,5 @@ AVCodec ff_indeo3_decoder = { > > .decode = decode_frame, > > .capabilities = CODEC_CAP_DR1, >^ > > .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), > > +.capabilities = CODEC_CAP_DR1, >^ > Hmm? > Aw crap, forgot to remove this hunk. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] nut: support textual data
On 2012-10-29 10:17:14 +0100, Luca Barbato wrote: > On 10/29/12 1:09 AM, Janne Grunau wrote: > > On 2012-10-25 14:05:40 +0200, Luca Barbato wrote: > >> Plain text (utf8 encoded) data can be muxed and demuxed in nut. > >> --- > >> libavformat/nut.c| 7 ++- > >> libavformat/nut.h| 1 + > >> libavformat/nutdec.c | 1 + > >> 3 files changed, 8 insertions(+), 1 deletion(-) > >> > >> diff --git a/libavformat/nut.c b/libavformat/nut.c > >> index e367d1c..85b126b 100644 > >> --- a/libavformat/nut.c > >> +++ b/libavformat/nut.c > >> @@ -33,6 +33,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = { > >> { AV_CODEC_ID_NONE, 0 } > >> }; > >> > >> +const AVCodecTag ff_nut_data_tags[] = { > >> +{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') }, > >> +{ AV_CODEC_ID_NONE, 0 } > >> +}; > >> + > >> const AVCodecTag ff_nut_video_tags[] = { > >> { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, > >> { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, > >> @@ -117,7 +122,7 @@ const AVCodecTag ff_nut_audio_tags[] = { > >> > >> const AVCodecTag * const ff_nut_codec_tags[] = { > >> ff_nut_video_tags, ff_nut_audio_tags, ff_nut_subtitle_tags, > >> -ff_codec_bmp_tags, ff_codec_wav_tags, 0 > >> +ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_data_tags, 0 > >> }; > >> > >> void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ > >> diff --git a/libavformat/nut.h b/libavformat/nut.h > >> index a91a109..5f624eb 100644 > >> --- a/libavformat/nut.h > >> +++ b/libavformat/nut.h > >> @@ -106,6 +106,7 @@ typedef struct NUTContext { > >> extern const AVCodecTag ff_nut_subtitle_tags[]; > >> extern const AVCodecTag ff_nut_video_tags[]; > >> extern const AVCodecTag ff_nut_audio_tags[]; > >> +extern const AVCodecTag ff_nut_data_tags[]; > >> > >> extern const AVCodecTag * const ff_nut_codec_tags[]; > >> > >> diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c > >> index 9b1891f..30b82ec 100644 > >> --- a/libavformat/nutdec.c > >> +++ b/libavformat/nutdec.c > >> @@ -371,6 +371,7 @@ static int decode_stream_header(NUTContext *nut) > >> break; > >> case 3: > >> st->codec->codec_type = AVMEDIA_TYPE_DATA; > >> +st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, > >> tmp); > > > > what did you mean by stray? Did you remove the whole line or did you > > replace ff_nut_subtitle_tags with ff_nut_data_tags? > > replaced with ff_nut_data_tags probably ok but please send an updated patch > > I would also expect support for raw binary data. > > We don't have a codec tag for it and if text data is within the > underspecification of nut, binary data isn't exactly defined anyhow. forget it, totally unspecified binary data is a bad idea. I wanted to avoid seeing quoted-printable in UTF-8 data streams. Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] dv: use AVStream.index instead of abusing AVStream.id
On Mon, 29 Oct 2012 10:19:14 +0100, Luca Barbato wrote: > On 10/24/12 6:17 PM, Anton Khirnov wrote: > > --- > > libavformat/dv.c |2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavformat/dv.c b/libavformat/dv.c > > index 70786b1..17c545c 100644 > > --- a/libavformat/dv.c > > +++ b/libavformat/dv.c > > @@ -372,7 +372,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, > > AVPacket *pkt, > > pkt->data = buf; > > pkt->size = size; > > pkt->flags |= AV_PKT_FLAG_KEY; > > -pkt->stream_index = c->vst->id; > > +pkt->stream_index = c->vst->index; > > pkt->pts = c->frames; > > > > c->frames++; > > > > Seems ok, but why id is used before? Cargo cult most probably. I've seen some other demuxers do it for no reasons. -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] dv: use AVStream.index instead of abusing AVStream.id
On 2012-10-24 18:17:52 +0200, Anton Khirnov wrote: > --- > libavformat/dv.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/dv.c b/libavformat/dv.c > index 70786b1..17c545c 100644 > --- a/libavformat/dv.c > +++ b/libavformat/dv.c > @@ -372,7 +372,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket > *pkt, > pkt->data = buf; > pkt->size = size; > pkt->flags |= AV_PKT_FLAG_KEY; > -pkt->stream_index = c->vst->id; > +pkt->stream_index = c->vst->index; > pkt->pts = c->frames; > > c->frames++; ok Janne ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [libav-commits] lavc: add CODEC_CAP_DR1 to all video decoders missing them
"Anton Khirnov " writes: > diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c > index fc0d2bc..322d360 100644 > --- a/libavcodec/indeo3.c > +++ b/libavcodec/indeo3.c > @@ -1114,4 +1114,5 @@ AVCodec ff_indeo3_decoder = { > .decode = decode_frame, > .capabilities = CODEC_CAP_DR1, ^ > .long_name = NULL_IF_CONFIG_SMALL("Intel Indeo 3"), > +.capabilities = CODEC_CAP_DR1, ^ Hmm? -- 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] Remove usage of INIT_AVX in h264_intrapred_10bit.asm.
On 10/29/12 2:39 AM, Ronald S. Bultje wrote: From: "Ronald S. Bultje" --- libavcodec/x86/h264_intrapred_10bit.asm | 306 libavcodec/x86/h264_intrapred_init.c| 40 ++--- 2 files changed, 177 insertions(+), 169 deletions(-) I'd name it use INIT_XMM since you aren't just removing INIT_AVX from what I can see, the rest looks ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] dv: use AVStream.index instead of abusing AVStream.id
On 10/24/12 6:17 PM, Anton Khirnov wrote: --- libavformat/dv.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/dv.c b/libavformat/dv.c index 70786b1..17c545c 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -372,7 +372,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, pkt->data = buf; pkt->size = size; pkt->flags |= AV_PKT_FLAG_KEY; -pkt->stream_index = c->vst->id; +pkt->stream_index = c->vst->index; pkt->pts = c->frames; c->frames++; Seems ok, but why id is used before? ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 2/2] lavr: document upper bound on number of output samples.
On 10/28/12 10:52 PM, Anton Khirnov wrote: --- libavresample/avresample.h |4 1 files changed, 4 insertions(+), 0 deletions(-) Seems fine. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] lavr: add general API usage doxy
On 10/28/12 10:52 PM, Anton Khirnov wrote: --- libavresample/avresample.h | 70 libavutil/avutil.h |1 + 2 files changed, 71 insertions(+), 0 deletions(-) Ok. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH] nut: support textual data
On 10/29/12 1:09 AM, Janne Grunau wrote: On 2012-10-25 14:05:40 +0200, Luca Barbato wrote: Plain text (utf8 encoded) data can be muxed and demuxed in nut. --- libavformat/nut.c| 7 ++- libavformat/nut.h| 1 + libavformat/nutdec.c | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libavformat/nut.c b/libavformat/nut.c index e367d1c..85b126b 100644 --- a/libavformat/nut.c +++ b/libavformat/nut.c @@ -33,6 +33,11 @@ const AVCodecTag ff_nut_subtitle_tags[] = { { AV_CODEC_ID_NONE, 0 } }; +const AVCodecTag ff_nut_data_tags[] = { +{ AV_CODEC_ID_TEXT, MKTAG('U', 'T', 'F', '8') }, +{ AV_CODEC_ID_NONE, 0 } +}; + const AVCodecTag ff_nut_video_tags[] = { { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) }, { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) }, @@ -117,7 +122,7 @@ const AVCodecTag ff_nut_audio_tags[] = { const AVCodecTag * const ff_nut_codec_tags[] = { ff_nut_video_tags, ff_nut_audio_tags, ff_nut_subtitle_tags, -ff_codec_bmp_tags, ff_codec_wav_tags, 0 +ff_codec_bmp_tags, ff_codec_wav_tags, ff_nut_data_tags, 0 }; void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){ diff --git a/libavformat/nut.h b/libavformat/nut.h index a91a109..5f624eb 100644 --- a/libavformat/nut.h +++ b/libavformat/nut.h @@ -106,6 +106,7 @@ typedef struct NUTContext { extern const AVCodecTag ff_nut_subtitle_tags[]; extern const AVCodecTag ff_nut_video_tags[]; extern const AVCodecTag ff_nut_audio_tags[]; +extern const AVCodecTag ff_nut_data_tags[]; extern const AVCodecTag * const ff_nut_codec_tags[]; diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 9b1891f..30b82ec 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -371,6 +371,7 @@ static int decode_stream_header(NUTContext *nut) break; case 3: st->codec->codec_type = AVMEDIA_TYPE_DATA; +st->codec->codec_id = ff_codec_get_id(ff_nut_subtitle_tags, tmp); what did you mean by stray? Did you remove the whole line or did you replace ff_nut_subtitle_tags with ff_nut_data_tags? replaced with ff_nut_data_tags In the second case it feels a little strange to use the same codec_id for subtitles and data. The main difference is that pure text subtitles are supposed to be rendered on screen, pure text data is supposed to be otherwise processed (my specific case they are either metrics or other data fed to a completely different system) I would also expect support for raw binary data. We don't have a codec tag for it and if text data is within the underspecification of nut, binary data isn't exactly defined anyhow. Care to extend doc/nut.texi? Sure. ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel
Re: [libav-devel] [PATCH 1/2] dv: use AVStream.index instead of abusing AVStream.id
ping -- Anton Khirnov ___ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel