[FFmpeg-devel] [PATCH] avcodec: loongson3 optimized h264dsp weighted mc with mmi
>From 1d06af967f8578387fc84d4eb268d31ecba1353d Mon Sep 17 00:00:00 2001 From: ZhouXiaoyong Date: Wed, 13 May 2015 22:51:59 +0800 Subject: [PATCH] avcodec: loongson3 optimized h264dsp weighted mc with mmi Signed-off-by: ZhouXiaoyong --- libavcodec/mips/Makefile| 1 + libavcodec/mips/h264dsp_init_mips.c | 21 +++ libavcodec/mips/h264dsp_mips.h | 16 +++ libavcodec/mips/h264dsp_mmi.c | 278 4 files changed, 316 insertions(+) diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index eaedd7f..25813e7 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -22,3 +22,4 @@ OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_init_mips.o OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o +LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o diff --git a/libavcodec/mips/h264dsp_init_mips.c b/libavcodec/mips/h264dsp_init_mips.c index 8d3d760..d9182f2 100644 --- a/libavcodec/mips/h264dsp_init_mips.c +++ b/libavcodec/mips/h264dsp_init_mips.c @@ -1,5 +1,6 @@ /* * Copyright (c) 2015 Parag Salasakar (parag.salasa...@imgtec.com) + * Copyright (c) 2015 Zhou Xiaoyong * * This file is part of FFmpeg. * @@ -65,10 +66,30 @@ static av_cold void h264dsp_init_msa(H264DSPContext *c, } #endif // #if HAVE_MSA +#if HAVE_LOONGSON3 +static av_cold void h264dsp_init_mmi(H264DSPContext * c, + const int bit_depth, + const int chroma_format_idc) +{ +if (bit_depth == 8) { +c->weight_h264_pixels_tab[0] = ff_h264_weight_pixels16_8_mmi; +c->weight_h264_pixels_tab[1] = ff_h264_weight_pixels8_8_mmi; +c->weight_h264_pixels_tab[2] = ff_h264_weight_pixels4_8_mmi; + +c->biweight_h264_pixels_tab[0] = ff_h264_biweight_pixels16_8_mmi; +c->biweight_h264_pixels_tab[1] = ff_h264_biweight_pixels8_8_mmi; +c->biweight_h264_pixels_tab[2] = ff_h264_biweight_pixels4_8_mmi; +} +} +#endif /* HAVE_LOONGSON3 */ + av_cold void ff_h264dsp_init_mips(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #if HAVE_MSA h264dsp_init_msa(c, bit_depth, chroma_format_idc); #endif // #if HAVE_MSA +#if HAVE_LOONGSON3 +h264dsp_init_mmi(c, bit_depth, chroma_format_idc); +#endif /* HAVE_LOONGSON3 */ } diff --git a/libavcodec/mips/h264dsp_mips.h b/libavcodec/mips/h264dsp_mips.h index df9b0b2..319f6d3 100644 --- a/libavcodec/mips/h264dsp_mips.h +++ b/libavcodec/mips/h264dsp_mips.h @@ -68,4 +68,20 @@ void ff_weight_h264_pixels8_8_msa(uint8_t *src, int stride, int height, void ff_weight_h264_pixels4_8_msa(uint8_t *src, int stride, int height, int log2_denom, int weight, int offset); +void ff_h264_weight_pixels16_8_mmi(uint8_t *block, int stride, int height, +int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels16_8_mmi(uint8_t *dst, uint8_t *src, +int stride, int height, int log2_denom, int weightd, int weights, +int offset); +void ff_h264_weight_pixels8_8_mmi(uint8_t *block, int stride, int height, +int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels8_8_mmi(uint8_t *dst, uint8_t *src, +int stride, int height, int log2_denom, int weightd, int weights, +int offset); +void ff_h264_weight_pixels4_8_mmi(uint8_t *block, int stride, int height, +int log2_denom, int weight, int offset); +void ff_h264_biweight_pixels4_8_mmi(uint8_t *dst, uint8_t *src, +int stride, int height, int log2_denom, int weightd, int weights, +int offset); + #endif // #ifndef H264_DSP_MIPS_H diff --git a/libavcodec/mips/h264dsp_mmi.c b/libavcodec/mips/h264dsp_mmi.c new file mode 100644 index 000..5776b88 --- /dev/null +++ b/libavcodec/mips/h264dsp_mmi.c @@ -0,0 +1,278 @@ +/* + * Loongson SIMD optimized h264dsp + * + * Copyright (c) 2015 Loongson Technology Corporation Limited + * Copyright (c) 2015 Zhou Xiaoyong + *Zhang Shuangshuang + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 0
[FFmpeg-devel] [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi
>From 3e0b5c6904593e3cf3599cef579927e92cf1a2fa Mon Sep 17 00:00:00 2001 From: ZhouXiaoyong Date: Wed, 13 May 2015 23:22:49 +0800 Subject: [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi Signed-off-by: ZhouXiaoyong --- libavcodec/mips/Makefile | 2 + libavcodec/mips/mpegvideo_init_mips.c | 45 +++ libavcodec/mips/mpegvideo_mips.h | 40 +++ libavcodec/mips/mpegvideo_mmi.c | 556 ++ libavcodec/mpegvideo.c| 2 + libavcodec/mpegvideo.h| 1 + 6 files changed, 646 insertions(+) diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index 25813e7..4799757 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -20,6 +20,8 @@ MIPSDSPR1-OBJS-$(CONFIG_AAC_ENCODER) += mips/aaccoder_mips.o MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER)+= mips/iirfilter_mips.o OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_init_mips.o OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o +OBJS-$(CONFIG_MPEGVIDEO) += mips/mpegvideo_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o +LOONGSON3-OBJS-$(CONFIG_MPEGVIDEO)+= mips/mpegvideo_mmi.o diff --git a/libavcodec/mips/mpegvideo_init_mips.c b/libavcodec/mips/mpegvideo_init_mips.c new file mode 100644 index 000..7083209 --- /dev/null +++ b/libavcodec/mips/mpegvideo_init_mips.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "mpegvideo_mips.h" + +#if HAVE_LOONGSON3 +static av_cold void ff_mpv_common_init_mmi(MpegEncContext *s) +{ +s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_mmi; +s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_mmi; +s->dct_unquantize_mpeg1_intra = ff_dct_unquantize_mpeg1_intra_mmi; +s->dct_unquantize_mpeg1_inter = ff_dct_unquantize_mpeg1_inter_mmi; + +if (s->flags & CODEC_FLAG_BITEXACT) { +s->dct_unquantize_mpeg2_intra = ff_dct_unquantize_mpeg2_intra_bitexact_mmi; +} + +s->dct_unquantize_mpeg2_inter = ff_dct_unquantize_mpeg2_inter_mmi; +s->denoise_dct = ff_denoise_dct_mmi; +} +#endif /* HAVE_LOONGSON3 */ + +av_cold void ff_mpv_common_init_mips(MpegEncContext *s) +{ +#if HAVE_LOONGSON3 +ff_mpv_common_init_mmi(s); +#endif /* HAVE_LOONGSON3 */ +} diff --git a/libavcodec/mips/mpegvideo_mips.h b/libavcodec/mips/mpegvideo_mips.h new file mode 100644 index 000..d077e11 --- /dev/null +++ b/libavcodec/mips/mpegvideo_mips.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef H264_DSP_MIPS_H +#define H264_DSP_MIPS_H + +#include "libavcodec/mpegvideo.h" + +void ff_dct_unquantize_h263_intra_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_h263_inter_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg1_intra_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg1_inter_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg2_intra_bitexact_mmi(MpegEncContext *s, +int16_t *block, int n, int qscale); +void ff_dct_unquantize_mpeg2_inter_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_denoise
Re: [FFmpeg-devel] [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi
sorry, the last same patch has error in libavcodec/mips/mpegvideo_mips.h this one below is ok. --- >From 3e1a538f6c2999e31e90161cf1d90b984c405676 Mon Sep 17 00:00:00 2001 From: ZhouXiaoyong Date: Wed, 13 May 2015 23:22:49 +0800 Subject: [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi Signed-off-by: ZhouXiaoyong --- libavcodec/mips/Makefile | 2 + libavcodec/mips/mpegvideo_init_mips.c | 45 +++ libavcodec/mips/mpegvideo_mips.h | 40 +++ libavcodec/mips/mpegvideo_mmi.c | 556 ++ libavcodec/mpegvideo.c| 2 + libavcodec/mpegvideo.h| 1 + 6 files changed, 646 insertions(+) diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index 25813e7..4799757 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -20,6 +20,8 @@ MIPSDSPR1-OBJS-$(CONFIG_AAC_ENCODER) += mips/aaccoder_mips.o MIPSFPU-OBJS-$(CONFIG_AAC_ENCODER)+= mips/iirfilter_mips.o OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_init_mips.o OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o +OBJS-$(CONFIG_MPEGVIDEO) += mips/mpegvideo_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o +LOONGSON3-OBJS-$(CONFIG_MPEGVIDEO)+= mips/mpegvideo_mmi.o diff --git a/libavcodec/mips/mpegvideo_init_mips.c b/libavcodec/mips/mpegvideo_init_mips.c new file mode 100644 index 000..7083209 --- /dev/null +++ b/libavcodec/mips/mpegvideo_init_mips.c @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "mpegvideo_mips.h" + +#if HAVE_LOONGSON3 +static av_cold void ff_mpv_common_init_mmi(MpegEncContext *s) +{ +s->dct_unquantize_h263_intra = ff_dct_unquantize_h263_intra_mmi; +s->dct_unquantize_h263_inter = ff_dct_unquantize_h263_inter_mmi; +s->dct_unquantize_mpeg1_intra = ff_dct_unquantize_mpeg1_intra_mmi; +s->dct_unquantize_mpeg1_inter = ff_dct_unquantize_mpeg1_inter_mmi; + +if (s->flags & CODEC_FLAG_BITEXACT) { +s->dct_unquantize_mpeg2_intra = ff_dct_unquantize_mpeg2_intra_bitexact_mmi; +} + +s->dct_unquantize_mpeg2_inter = ff_dct_unquantize_mpeg2_inter_mmi; +s->denoise_dct = ff_denoise_dct_mmi; +} +#endif /* HAVE_LOONGSON3 */ + +av_cold void ff_mpv_common_init_mips(MpegEncContext *s) +{ +#if HAVE_LOONGSON3 +ff_mpv_common_init_mmi(s); +#endif /* HAVE_LOONGSON3 */ +} diff --git a/libavcodec/mips/mpegvideo_mips.h b/libavcodec/mips/mpegvideo_mips.h new file mode 100644 index 000..8e56eab --- /dev/null +++ b/libavcodec/mips/mpegvideo_mips.h @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Zhou Xiaoyong + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef MPEGVIDEO_MIPS_H +#define MPEGVIDEO_MIPS_H + +#include "libavcodec/mpegvideo.h" + +void ff_dct_unquantize_h263_intra_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_h263_inter_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg1_intra_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg1_inter_mmi(MpegEncContext *s, int16_t *block, +int n, int qscale); +void ff_dct_unquantize_mpeg2_intra_bitexact_mmi(MpegEncContext *s, +int16_t *block, int n, int qscale); +void ff_dct_unqua
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Michael Niedermayer gmx.at> writes: > > can someone who has ICL/MSVC setup test this please > failing that, lets apply the patch > > [...] Kodi crashes on Windows when doing 8 channel conversion. This seems to be the source of the problem. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] configure: disabled -mips64 option for loongson and remove redundant cpuflags
On Wed, May 13, 2015 at 12:50:20PM +0800, 周晓勇 wrote: > From 159cc99c2dc1cb4b68b48787cc53002cc7993c14 Mon Sep 17 00:00:00 2001 > From: ZhouXiaoyong > Date: Wed, 13 May 2015 12:33:30 +0800 > Subject: [PATCH] configure: disabled -mips64 option for loongson and remove > redundant cpuflags > > 1.Option -march=loongson3a conflicts with -mips64 or -mips64r2. > 2.Option -mhard-float has been added. > --- > configure | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Rainer Hochecker online.de> writes: > Kodi crashes on Windows when doing 8 channel conversion. > This seems to be the source of the problem. That sounds impossible since the patch was pushed as http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f7ed997a Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Carl Eugen Hoyos ag.or.at> writes: > > That sounds impossible since the patch was pushed as > http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f7ed997a > > Carl Eugen > Why exactly is that impossible? It crashes in ff_pack_8ch_float_to_int32_a_sse2 on Windows. Same code, same scenario is fine on other platforms. Rainer ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
On Wed, May 13, 2015 at 12:09 PM, Rainer Hochecker wrote: > Carl Eugen Hoyos ag.or.at> writes: > > >> >> That sounds impossible since the patch was pushed as >> http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f7ed997a >> >> Carl Eugen >> > > Why exactly is that impossible? > It crashes in ff_pack_8ch_float_to_int32_a_sse2 on Windows. > Same code, same scenario is fine on other platforms. > Kodi's build script suggests that FFmpeg is build with gcc - this crash and fix only ever applied to MSVC/ICL builds. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] ff_h[yc]scale_fast_mmext always clobbers %rbx
On Tue, May 12, 2015 at 06:12:01PM -0700, Nick Lewycky wrote: > On 11 May 2015 at 16:18, Michael Niedermayer wrote: > > > On Mon, May 11, 2015 at 03:55:40PM -0700, Nick Lewycky wrote: > > > On 8 May 2015 at 14:28, Michael Niedermayer wrote: > > > > > > > On Fri, May 08, 2015 at 12:43:20PM -0700, Nick Lewycky wrote: > > > > > On 8 May 2015 at 12:06, Michael Niedermayer > > wrote: > > > > > > > > > > > On Fri, May 08, 2015 at 10:50:49AM -0700, Nick Lewycky wrote: > > > > > > > On 6 May 2015 at 18:03, Michael Niedermayer > > > > wrote: > > > > > > > > > > > > > > > On Wed, May 06, 2015 at 04:08:09PM -0700, Nick Lewycky wrote: > > > > > > > > > On 6 May 2015 at 15:06, Michael Niedermayer < > > michae...@gmx.at> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > Hi > > > > > > > > > > > > > > > > > > > > On Wed, May 06, 2015 at 11:52:59AM -0700, Nick Lewycky > > wrote: > > > > > > > > > > > Newer versions of clang will allocate %rbx as one of the > > > > inline > > > > > > asm > > > > > > > > > > inputs, > > > > > > > > > > > > > > > > > > > > Thats great > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > even in PIC. This occurs when building ffmpeg with clang > > > > > > > > > > -fsanitize=address > > > > > > > > > > > -O1 -fPIE. Because the asm does clobber %bx whether PIC > > is > > > > on or > > > > > > off, > > > > > > > > > > just > > > > > > > > > > > include %bx in the clobber list regardless of whether > > PIC is > > > > on > > > > > > or > > > > > > > > off. > > > > > > > > > > > > > > > > > > > > you cant include *bx in the clobber list with PIC > > > > > > > > > > it breaks compilers that are less great, like gcc > > > > > > > > > > > > > > > > > > > > > > > > > > > > Doh!! I did check for this, but only tried x86-64, not > > x86-32. > > > > Sorry! > > > > > > > > > > > > > > > > > > gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 > > > > > > > > > > ../libswscale/x86/hscale_fast_bilinear_simd.c: In function > > > > > > > > > > ‘ff_hyscale_fast_mmxext’: > > > > > > > > > > ../libswscale/x86/hscale_fast_bilinear_simd.c:205:5: > > error: PIC > > > > > > > > register > > > > > > > > > > clobbered by ‘%ebx’ in ‘asm’ > > > > > > > > > > ../libswscale/x86/hscale_fast_bilinear_simd.c: In function > > > > > > > > > > ‘ff_hcscale_fast_mmxext’: > > > > > > > > > > ../libswscale/x86/hscale_fast_bilinear_simd.c:276:5: > > error: PIC > > > > > > > > register > > > > > > > > > > clobbered by ‘%ebx’ in ‘asm’ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > also what exactly are you trying to fix ? > > > > > > > > > > or rather what exactly goes how exactly wrong with the > > code as > > > > it > > > > > > is > > > > > > > > > > if rbx is used ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Ok, let's look at ff_hcscale_fast_mmext. Preprocessor > > directives > > > > > > > > evaluated > > > > > > > > > in PIC x86-64, the inline constraints work out to: > > > > > > > > > > > > > > > > > > :: "m" (src1), "m" (dst1), "m" (filter), "m" > > (filterPos), > > > > > > > > >"m" (mmxextFilterCode), "m" (src2), "m"(dst2) > > > > > > > > > ,"m" (ebxsave) > > > > > > > > > ,"m"(retsave) > > > > > > > > > : "%"REG_a, "%"REG_c, "%"REG_d, "%"REG_S, "%"REG_D > > > > > > > > > > > > > > > > > > so clang looks at that and decides that it can pick src1 = > > > > (%r10), > > > > > > dst1 = > > > > > > > > > (%r8), filter = (%r11), filterPos = (%r12), mmxextFilterCode > > = > > > > > > (%r15), > > > > > > > > src2 > > > > > > > > > = (%rbx), dst2 = (%r14), ebxsave = (%r13), retsave = (%r9). > > The > > > > > > problem > > > > > > > > > there is src2 being (%rbx). > > > > > > > > > > > > > > > > > > Now let's look at how we use them: > > > > > > > > > > > > > > > > > > "mov %0, %%"REG_c" \n\t" > > > > > > > > > "mov %1, %%"REG_D" \n\t" > > > > > > > > > "mov %2, %%"REG_d" \n\t" > > > > > > > > > "mov %3, %%"REG_b" \n\t" // > > Clobbers > > > > %rbx / > > > > > > > > src2 > > > > > > > > > / %5 here > > > > > > > > > "xor %%"REG_a", %%"REG_a" \n\t" > > > > > > > > > PREFETCH" (%%"REG_c") \n\t" > > > > > > > > > PREFETCH" 32(%%"REG_c") \n\t" > > > > > > > > > PREFETCH" 64(%%"REG_c") \n\t" > > > > > > > > > > > > > > > > > > CALL_MMXEXT_FILTER_CODE > > > > > > > > > CALL_MMXEXT_FILTER_CODE > > > > > > > > > CALL_MMXEXT_FILTER_CODE > > > > > > > > > CALL_MMXEXT_FILTER_CODE > > > > > > > > > "xor %%"REG_a", %%"REG_a" \n\t" > > > > > > > > > "mov %5, %%"REG_c" \n\t" // %5 is > > read > > > > too > > > > > > > > late, > > > > > > > > > we get %3 / filterPos instead > > > > > > > > > "mov %6, %%"REG_D" \n\t" > > > > > > > > > PREFETCH" (%%"REG_c") \n\t" > > > > > >
Re: [FFmpeg-devel] [PATCH] doc/ffprobe.xsd: remove extra sequence from streamType
On date Tuesday 2015-05-12 16:49:13 -0400, Dave Rice encoded: > I found that ffprobe.xsd could no longer validate records, this patch makes > the xsd valid once again. > Best Regards, > Dave Rice > > > From f55d5dfd3a4980f6f86efee76d18453c7b534b2a Mon Sep 17 00:00:00 2001 > From: Dave Rice > Date: Tue, 12 May 2015 16:44:52 -0400 > Subject: [PATCH] remove extra sequence from streamType > > This makes the XSD valid again. Fixes a regression from a72b61a. > --- > doc/ffprobe.xsd | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/doc/ffprobe.xsd b/doc/ffprobe.xsd > index d473c9b..dab55ee 100644 > --- a/doc/ffprobe.xsd > +++ b/doc/ffprobe.xsd > @@ -170,9 +170,6 @@ > > minOccurs="0" maxOccurs="1"/> > maxOccurs="unbounded"/> > - > - > - maxOccurs="unbounded"/> > type="ffprobe:packetSideDataListType" minOccurs="0" maxOccurs="1" /> > > > -- > 2.3.5 Applied, thanks. Next time please send a patch as attachment, or use directly git send-email so I don't have to copy&paste. -- FFmpeg = Freak and Frenzy Mere Powered Enlightened Goblin ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc/ffprobe.xsd: add build_date and build_time as optional attributes
On date Tuesday 2015-05-12 16:56:24 -0400, Dave Rice encoded: > This patch puts back two attributes that were removed in 7b35a01. If I > understand correctly the intent of patch 7b35a01 was to no longer use > build_date and build_time as attributes of programVersion, but the patch also > had the effect of making all records generated with an earlier ffprobe build > with build_date and build_time as invalid. This patch puts the two attributes > back but without mandating their use, thus older ffprobe records as backwards > compatible with the current schema and their use is no longer required. > Best Regards, > Dave Rice > > > From 7321e45ff04e5b97908c6525c929bb24363ed135 Mon Sep 17 00:00:00 2001 > From: Dave Rice > Date: Tue, 12 May 2015 16:52:55 -0400 > Subject: [PATCH] doc/ffprobe.xsd: add build_date and build_time as optional > attributes > > This partly undoes 7b35a01. > --- > doc/ffprobe.xsd | 2 ++ > 1 file changed, 2 insertions(+) Applied, thanks. -- FFmpeg = Fantastic and Faithless Magical Purposeless Ecumenical Gladiator ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Hi, On Wed, May 13, 2015 at 6:24 AM, Hendrik Leppkes wrote: > On Wed, May 13, 2015 at 12:09 PM, Rainer Hochecker > wrote: > > Carl Eugen Hoyos ag.or.at> writes: > > > > > >> > >> That sounds impossible since the patch was pushed as > >> http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f7ed997a > >> > >> Carl Eugen > >> > > > > Why exactly is that impossible? > > It crashes in ff_pack_8ch_float_to_int32_a_sse2 on Windows. > > Same code, same scenario is fine on other platforms. > > > > Kodi's build script suggests that FFmpeg is build with gcc - this > crash and fix only ever applied to MSVC/ICL builds. Is the entry point (from msvc code of kodi into ffmpeg/gcc code) marked as realigning? Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Hi, On Wed, May 13, 2015 at 7:18 AM, Ronald S. Bultje wrote: > Hi, > > On Wed, May 13, 2015 at 6:24 AM, Hendrik Leppkes > wrote: > >> On Wed, May 13, 2015 at 12:09 PM, Rainer Hochecker >> wrote: >> > Carl Eugen Hoyos ag.or.at> writes: >> > >> > >> >> >> >> That sounds impossible since the patch was pushed as >> >> http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=f7ed997a >> >> >> >> Carl Eugen >> >> >> > >> > Why exactly is that impossible? >> > It crashes in ff_pack_8ch_float_to_int32_a_sse2 on Windows. >> > Same code, same scenario is fine on other platforms. >> > >> >> Kodi's build script suggests that FFmpeg is build with gcc - this >> crash and fix only ever applied to MSVC/ICL builds. > > > Is the entry point (from msvc code of kodi into ffmpeg/gcc code) marked as > realigning? > Seems it isn't: $ grep attribute_align_arg ~/Projects/ffmpeg/libswresample/*.c $ Check other libs for usage. Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Hendrik Leppkes gmail.com> writes: > > > > Kodi's build script suggests that FFmpeg is build with gcc - this > crash and fix only ever applied to MSVC/ICL builds. > It starts crashing with this commit: https://github.com/FFmpeg/FFmpeg/commit/37b35feb64e4e0382cd5e4502dbf0f7ff9aa0 b5f Rainer ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni hv mc functions
LGTM Thanks, Nedeljko Od: ffmpeg-devel-boun...@ffmpeg.org [ffmpeg-devel-boun...@ffmpeg.org] u ime korisnika Shivraj Patil Poslato: 8. maj 2015 10:02 Za: ffmpeg-devel@ffmpeg.org Cc: Rob Isherwood; Shivraj Patil Tema: [FFmpeg-devel] [PATCH] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni hv mc functions From: Shivraj Patil Signed-off-by: Shivraj Patil --- libavcodec/mips/hevcdsp_init_mips.c | 9 + libavcodec/mips/hevcdsp_mips.h | 9 + libavcodec/mips/hevcdsp_msa.c | 512 3 files changed, 530 insertions(+) diff --git a/libavcodec/mips/hevcdsp_init_mips.c b/libavcodec/mips/hevcdsp_init_mips.c index 1e22f35..d2e3c60 100644 --- a/libavcodec/mips/hevcdsp_init_mips.c +++ b/libavcodec/mips/hevcdsp_init_mips.c @@ -87,6 +87,15 @@ static av_cold void hevc_dsp_init_msa(HEVCDSPContext *c, c->put_hevc_qpel_uni[7][1][0] = ff_hevc_put_hevc_uni_qpel_v32_8_msa; c->put_hevc_qpel_uni[8][1][0] = ff_hevc_put_hevc_uni_qpel_v48_8_msa; c->put_hevc_qpel_uni[9][1][0] = ff_hevc_put_hevc_uni_qpel_v64_8_msa; + +c->put_hevc_qpel_uni[1][1][1] = ff_hevc_put_hevc_uni_qpel_hv4_8_msa; +c->put_hevc_qpel_uni[3][1][1] = ff_hevc_put_hevc_uni_qpel_hv8_8_msa; +c->put_hevc_qpel_uni[4][1][1] = ff_hevc_put_hevc_uni_qpel_hv12_8_msa; +c->put_hevc_qpel_uni[5][1][1] = ff_hevc_put_hevc_uni_qpel_hv16_8_msa; +c->put_hevc_qpel_uni[6][1][1] = ff_hevc_put_hevc_uni_qpel_hv24_8_msa; +c->put_hevc_qpel_uni[7][1][1] = ff_hevc_put_hevc_uni_qpel_hv32_8_msa; +c->put_hevc_qpel_uni[8][1][1] = ff_hevc_put_hevc_uni_qpel_hv48_8_msa; +c->put_hevc_qpel_uni[9][1][1] = ff_hevc_put_hevc_uni_qpel_hv64_8_msa; } } #endif // #if HAVE_MSA diff --git a/libavcodec/mips/hevcdsp_mips.h b/libavcodec/mips/hevcdsp_mips.h index 76a6784..a8c8848 100644 --- a/libavcodec/mips/hevcdsp_mips.h +++ b/libavcodec/mips/hevcdsp_mips.h @@ -106,4 +106,13 @@ UNI_MC(qpel, v, 32); UNI_MC(qpel, v, 48); UNI_MC(qpel, v, 64); +UNI_MC(qpel, hv, 4); +UNI_MC(qpel, hv, 8); +UNI_MC(qpel, hv, 12); +UNI_MC(qpel, hv, 16); +UNI_MC(qpel, hv, 24); +UNI_MC(qpel, hv, 32); +UNI_MC(qpel, hv, 48); +UNI_MC(qpel, hv, 64); + #undef UNI_MC diff --git a/libavcodec/mips/hevcdsp_msa.c b/libavcodec/mips/hevcdsp_msa.c index d0e6f64..781264d 100644 --- a/libavcodec/mips/hevcdsp_msa.c +++ b/libavcodec/mips/hevcdsp_msa.c @@ -46,6 +46,24 @@ out; \ } ) +#define HEVC_RND_W_CLIP_UNSIGNED_CHAR_W_VEC2(vec0_r, vec0_l, \ + vec1_r, vec1_l, \ + out0, out1) \ +{ \ +(vec0_r) = __msa_srari_w((vec0_r), 6); \ +(vec0_l) = __msa_srari_w((vec0_l), 6); \ +(vec1_r) = __msa_srari_w((vec1_r), 6); \ +(vec1_l) = __msa_srari_w((vec1_l), 6); \ + \ +(vec0_r) = CLIP_UNSIGNED_CHAR_W((vec0_r)); \ +(vec0_l) = CLIP_UNSIGNED_CHAR_W((vec0_l)); \ +(vec1_r) = CLIP_UNSIGNED_CHAR_W((vec1_r)); \ +(vec1_l) = CLIP_UNSIGNED_CHAR_W((vec1_l)); \ + \ +out0 = (v4i32) __msa_pckev_h((v8i16) (vec0_l), (v8i16) (vec0_r)); \ +out1 = (v4i32) __msa_pckev_h((v8i16) (vec1_l), (v8i16) (vec1_r)); \ +} + static void hevc_copy_4w_msa(uint8_t * __restrict src, int32_t src_stride, int16_t * __restrict dst, int32_t dst_stride, int32_t height) @@ -2270,6 +2288,469 @@ static void hevc_hv_8t_64w_msa(uint8_t * __restrict src, int32_t src_stride, filter_x, filter_y, height, 64); } +static void hevc_hv_uni_8t_4w_msa(uint8_t * __restrict src, + int32_t src_stride, + uint8_t * __restrict dst, + int32_t dst_stride, + const int8_t * __restrict filter_x, + const int8_t * __restrict filter_y, + int32_t height) +{ +uint32_t loop_cnt; +uint32_t out0, out1; +v16i8 src0, src1, src2, src3, src4, src5, src6, src7, src8; +v8i16 filt0, filt1, filt2, filt3, filter_vec; +v4i32 filt_h0, filt_h1, filt_h2, filt_h3; +v16i8 mask1, mask2, mask3; +v8u16 const_vec; +v16i8 vec0, vec1, vec2, vec3, vec4, vec5, vec6, vec7; +v16i8 vec8, vec9, vec10, vec11, vec12, vec13, vec14, vec15; +v8i16 dst30, dst41, dst52, dst63, dst66, dst87; +v4i32 ds
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Rainer Hochecker online.de> writes: > > Kodi's build script suggests that FFmpeg is build > > with gcc - this crash and fix only ever applied to > > MSVC/ICL builds. > > It starts crashing with this commit: > https://github.com/FFmpeg/FFmpeg/commit/37b35feb So does adding attribute_align_arg to swr_convert_frame() (and friends?) fix the issue? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] x86/swr: fix pack_8ch functions on compilers without aligned stack
Carl Eugen Hoyos ag.or.at> writes: > > So does adding attribute_align_arg to swr_convert_frame() > (and friends?) fix the issue? > > Carl Eugen > I added it to swr_convert and it does fix the issue here. Rainer ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
On Tue, 12 May 2015 17:16:51 +0200 Fernandon Bautista wrote: > Dear all, > > we have some audio files that we need to convert to WAVE audio, > Microsoft PCM, 16 bit, mono 8000 Hz format. They are encoded in a > proprietary software codec that it only runs on Windows. We need to > process the audio decoding in Linux servers and thus we need to find > an alternative. > > Base on the provider, we expect the audios to be one of those codecs ( > http://www.shouldiremoveit.com/Verint-Multimedia-Support-Package-100067-program.aspx hello! thank you for saying which package had the dll. I was able to find it, and make a mirror here of the dll file required http://samples.ffmpeg.org/drivers32/new/G729DecoderDMO.dll I was then able to add it to mplayer project, by adding this to ~/.mplayer/codecs.conf: audiocodec g729dmo info "verint g729" status working format 0x83 format 0xA104 ;untested driver dmo dll "G729DecoderDMO.dll" guid 0xe1d97f0c, 0x47d0, 0x416b, 0x97, 0xc6, 0xcd, 0xf5, 0xdc, 0x30, 0xd6, 0xf4 mplayer can play your sample .wav file. but i only tested this on windows. it might work in linux for you to convert your files with 32bit mplayer compiled with dmo/dshow win32 codec support. assuming you follow those steps (download dll file to a location mplayer looks for codecs (usually /usr/local/lib/codecs) and add that info to codecs.conf). simply mplayer -ao pcm g729stereo.wav let me know if it works for you, this is an alternative until ffmpeg gets support for it. -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
compn mi.rr.com> writes: > mplayer can play your sample .wav file. but > i only tested this on windows. How did you test? (Which command line?) Crashes on Linux, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
On Wed, 13 May 2015 13:03:06 + (UTC) Carl Eugen Hoyos wrote: > compn mi.rr.com> writes: > > > mplayer can play your sample .wav file. but > > i only tested this on windows. > > How did you test? (Which command line?) > > Crashes on Linux, Carl Eugen humm, any unrecognized calls in mplayer -v on linux? maybe more stubs need to be implemented? strace reveal anything? maybe it uses a dll on windows that is not found on linux, like msvc90crt. i guess i have demuxer=lavf in my config. so mplayer -demuxer lavf g729stereo.wav D:\>mplayer g729stereo.wav MPlayer sherpya-r37368+g52f2adc-4.9.2 (C) 2000-2015 MPlayer Team 175 audio & 383 video codecs Playing g729stereo.wav. Cache fill: 0.00% (0 bytes) libavformat version 56.19.100 (internal) libavformat file format detected. [wav @ 015799e0]Could not find codec parameters for stream 0 (Audio: none ([131][0][0][0] / 0 8000 Hz, 2 channels, 16 kb/s): unknown codec Consider increasing the value for the 'analyzeduration' and 'probesize' options LAVF_header: av_find_stream_info() failed [lavf] stream 0: audio (unknown), -aid 0 == Opening audio decoder: [dmo] Win32/DMO decoders AUDIO: 8000 Hz, 2 ch, s16le, 16.0 kbit/6.25% (ratio: 2000->32000) Selected audio codec: [g729dmo] afm: dmo (verint g729) == AO: [dsound] 8000Hz 2ch s16le (2 bytes per sample) Video: no video Starting playback... A: 6.1 (06.1) of 14.1 (14.1) 0.1% 0% it did not work with mplayer -demuxer rawaudio g729stereo.wav -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
compn mi.rr.com> writes: > D:\>mplayer g729stereo.wav > MPlayer sherpya-r37368+g52f2adc-4.9.2 This is too old. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] (no subject)
>From 85ea58a3129b1766d44bf1425c6656d7a4f5624c Mon Sep 17 00:00:00 2001 From: Rainer Hochecker Date: Wed, 13 May 2015 18:21:38 +0200 Subject: [PATCH] swr: fix alignment issue caused by 8ch sse functions --- libswresample/swresample.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libswresample/swresample.c b/libswresample/swresample.c index 6d13bc5..76b7a84 100644 --- a/libswresample/swresample.c +++ b/libswresample/swresample.c @@ -23,6 +23,7 @@ #include "audioconvert.h" #include "libavutil/avassert.h" #include "libavutil/channel_layout.h" +#include "libavutil/internal.h" #include @@ -663,8 +664,8 @@ int swr_is_initialized(struct SwrContext *s) { return !!s->in_buffer.ch_count; } -int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, -const uint8_t *in_arg [SWR_CH_MAX], int in_count){ +int attribute_align_arg swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int out_count, +const uint8_t *in_arg [SWR_CH_MAX], int in_count){ AudioData * in= &s->in; AudioData *out= &s->out; -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] (no subject)
[PATCH] swr: fix alignment issue caused by 8ch sse functions Fix crash when doing 8 ch conversion from apps compiled with MSVS Thanks to Ronald for giving this hint: https://ffmpeg.org/pipermail/ffmpeg-devel/2015-May/173049.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] FFV1 specification: Add more details about the configuration record
Add more details about the configuration record Version 2+ of the format has a configuration record which is in the underlying container track definition. GlobalHeader definition is split in 2 parts: - a configuration record part, including more details about how to find it in AVI and MP4, including the algorithm for how to skip remaining bits directly in the bitstream definition, including the crc_parity, - the header part itself, which is the prveious GlobalHeader definition minus crc_parity. crc_parity definition is also split and moved in the right subsections: - configuration_record_crc_parity for the configuration record part subsection, - slice_crc_parity for the slice subsection. From 1f83b63f2554d765f98b934b199734b5c82fe721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= Date: Wed, 13 May 2015 18:43:49 +0200 Subject: [PATCH] Add more details about the configuration record Version 2+ of the format has a configuration record which is in the underlying container track definition. GlobalHeader definition is split in 2 parts: - a configuration record part, including more details about how to find it in AVI and MP4, including the algorithm for how to skip remaining bits directly in the bitstream definition, including the crc_parity, - the header part itself, which is the prveious GlobalHeader definition minus crc_parity. crc_parity definition is also split and moved in the right subsections: - configuration_record_crc_parity for the configuration record part subsection, - slice_crc_parity for the slice subsection. --- ffv1.lyx | 499 +++ 1 file changed, 437 insertions(+), 62 deletions(-) diff --git a/ffv1.lyx b/ffv1.lyx index c8bb2b7..9894a0f 100644 --- a/ffv1.lyx +++ b/ffv1.lyx @@ -893,6 +893,20 @@ Range a...b means any value starting from a to b, inclusive. \end_layout +\begin_layout Subsection +Bitstream functions +\end_layout + +\begin_layout Description +remaing_bits_in_bitstream( +\begin_inset space ~ +\end_inset + +) means the count of remaining bits after the current position in the bitstream. + It is computed from the NumBytes value multiplied by 8 minus the count + of bits already read by the bitstream parser. +\end_layout + \begin_layout Section General Description \end_layout @@ -2525,31 +2539,49 @@ The same context which is initialized to 128 is used for all fields in the header. \end_layout +\begin_layout Standard +Default values at the decoder initialization phase: +\end_layout + +\begin_layout Description +ConfigurationRecordIsPresent is set to 0. +\end_layout + \begin_layout Subsection -Frame +Configuration Record +\end_layout + +\begin_layout Standard +In the case of a bitstream with version >= 2, a configuration record is + stored in the the underlying container, at the track header level. +\begin_inset Newline newline +\end_inset + +The size of the configuration record, NumBytes, is supplied by the underlying + container. \end_layout \begin_layout Standard \begin_inset Tabular - + - + \begin_inset Text \begin_layout Plain Layout -Frame( ) { +ConfigurationRecord( NumBytes ) { \end_layout \end_inset - + \begin_inset Text \begin_layout Plain Layout -type + \end_layout \end_inset @@ -2575,7 +2607,7 @@ type \begin_inset space ~ \end_inset -keyframe +ConfigurationRecordIsPresent = 1 \end_layout \end_inset @@ -2584,7 +2616,7 @@ keyframe \begin_inset Text \begin_layout Plain Layout -br + \end_layout \end_inset @@ -2610,7 +2642,42 @@ br \begin_inset space ~ \end_inset -if( keyframe ) { +GlobalHeader( ) +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +\begin_inset space ~ +\end_inset + + +\begin_inset space ~ +\end_inset + + +\begin_inset space ~ +\end_inset + + +\begin_inset space ~ +\end_inset + +while( remaing_bits_in_bitstream( ) > 32) \end_layout \end_inset @@ -2661,7 +2728,7 @@ if( keyframe ) { \begin_inset space ~ \end_inset -if( version < 2 ) +reserved \end_layout \end_inset @@ -2670,14 +2737,14 @@ if( version < 2 ) \begin_inset Text \begin_layout Plain Layout - +u(1) \end_layout \end_inset - + \begin_inset Text \begin_layout Plain Layout @@ -2696,7 +2763,249 @@ if( version < 2 ) \begin_inset space ~ \end_inset +configuration_record_crc_parity +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout +u(32) +\end_layout + +\end_inset + + + + +\begin_inset Text + +\begin_layout Plain Layout +} +\end_layout + +\end_inset + + +\begin_inset Text + +\begin_layout Plain Layout + +\end_layout + +\end_inset + + + + +\end_inset + + +\end_layout + +\begin_layout Description +configuration_record_crc_parity 32 bits that are choosen so that the configurati +on record as a whole has a crc remainder of 0. +\begin_inset Newline newline +\end_inset + +This is equivalent to stor
Re: [FFmpeg-devel] [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi
On Wed, May 13, 2015 at 04:29:46PM +0800, 周晓勇 wrote: > sorry, the last same patch has error in libavcodec/mips/mpegvideo_mips.h > this one below is ok. > --- > > From 3e1a538f6c2999e31e90161cf1d90b984c405676 Mon Sep 17 00:00:00 2001 > From: ZhouXiaoyong > Date: Wed, 13 May 2015 23:22:49 +0800 > Subject: [PATCH] avcodec: loongson3 optimized mpegvideo dct with mmi i think before optimizing mpegvideo, mpegvideo should first work currently fate fails for 160 tests, amongth them ake: *** [fate-vsynth2-mpeg4-nr] Error 136 make: *** [fate-vsynth2-mpeg4-nsse] Error 136 make: *** [fate-vsynth2-msmpeg4] Error 136 make: *** [fate-vsynth2-rv10] Error 136 make: *** [fate-vsynth2-rv20] Error 136 make: *** [fate-vsynth2-snow-ll] Error 136 make: *** [fate-vsynth2-svq1] Error 136 make: *** [fate-vsynth2-snow] Error 136 make: *** [fate-vsynth3-flv] Error 1 make: *** [fate-vsynth3-mpeg1] Error 136 make: *** [fate-vsynth3-mpeg1b] Error 136 make: *** [fate-vsynth3-mpeg2] Error 1 make: *** [fate-vsynth3-mpeg2-ilace] Error 136 make: *** [fate-vsynth3-mpeg2-idct-int] Error 1 make: *** [fate-vsynth3-mpeg2-422] Error 136 make: *** [fate-vsynth3-mpeg2-ivlc-qprd] Error 136 make: *** [fate-vsynth3-mpeg4] Error 136 make: *** [fate-vsynth3-mpeg2-thread] Error 1 make: *** [fate-vsynth3-mpeg2-thread-ivlc] Error 1 make: *** [fate-vsynth3-mpeg4-rc] Error 136 make: *** [fate-vsynth3-mpeg4-adv] Error 136 make: *** [fate-vsynth3-mpeg4-qpel] Error 136 make: *** [fate-vsynth3-mpeg4-error] Error 136 make: *** [fate-vsynth3-mpeg4-qprd] Error 1 make: *** [fate-vsynth3-mpeg4-nr] Error 136 make: *** [fate-vsynth3-msmpeg4] Error 1 make: *** [fate-vsynth3-msmpeg4v2] Error 1 make: *** [fate-vsynth3-svq1] Error 136 make: *** [fate-vsynth3-wmv2] Error 1 make: *** [fate-lavf-asf] Error 1 make: *** [fate-lavf-avi] Error 1 make: *** [fate-lavf-ffm] Error 1 make: *** [fate-lavf-mkv] Error 136 make: *** [fate-lavf-mov] Error 136 make: *** [fate-lavf-mpg] Error 136 make: *** [fate-lavf-gxf] Error 136 make: *** [fate-lavf-ismv] Error 1 make: *** [fate-lavf-mxf] Error 1 make: *** [fate-lavf-nut] Error 1 make: *** [fate-lavf-ts] Error 1 make: *** [fate-lavf-wtv] Error 136 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
On Wed, 13 May 2015 16:21:33 + (UTC) Carl Eugen Hoyos wrote: > compn mi.rr.com> writes: > > > D:\>mplayer g729stereo.wav > > MPlayer sherpya-r37368+g52f2adc-4.9.2 > > This is too old. no one has touched the binary loader code in years, so the same codecs.conf entry will work in old mplayer. you want to see old? heres a cvs version of mplayer from 2004 playing the same clip. D:\>mplayermd g729stereo.wav MPlayer dev-CVS-040406-03:13-3.3.1 (C) 2000-2004 MPlayer Team CPU: Intel Pentium 4/Xeon/Celeron Northwood 3154 MHz (Family: 8, Stepping: 4) Detected cache-line size is 64 bytes CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1 Compiled with Runtime CPU Detection - WARNING - this is not optimal! To get best performance, recompile MPlayer with --disable-runtime-cpudetection. Using usleep() timing Playing g729stereo.wav. Cache fill: 1.60% (8192 bytes)Audio file detected. == Trying to force audio codec driver family ffmpeg... Opening audio decoder: [dmo] Win32/DMO decoders === WAVE Format === Format Tag: 131 (0x83) Channels: 2 Samplerate: 8000 avg byte/sec: 2000 Block align: 20 bits/sample: 1 cbSize: 0 === === WAVE Format === Format Tag: 1 (0x1) Channels: 2 Samplerate: 8000 avg byte/sec: 32000 Block align: 4 bits/sample: 16 cbSize: 0 === GetOutput r=0x0 size:4 align:4 StreamCount r=0x0 1 1 AUDIO: 8000 Hz, 2 ch, 16 bit (0x10), ratio: 2000->32000 (16.0 kbit) Selected audio codec: [g729dmo] afm:dmo (verint g729) == Checking audio filter chain for 8000Hz/2ch/16bit -> 8000Hz/2ch/16bit... AF_pre: af format: 2 bps, 2 ch, 8000 hz, little endian signed int AF_pre: 8000Hz 2ch Signed 16-bit (Little-Endian) AO: [win32] 8000Hz 2ch Signed 16-bit (Little-Endian) (2 bps) Building audio filter chain for 8000Hz/2ch/16bit -> 8000Hz/2ch/16bit... Video: no video Starting playback... A: 6.9 0.1% 0% Exiting... (End of file) -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
compn mi.rr.com> writes: > MPlayer dev-CVS-040406-03:13-3.3.1 (C) 2000-2004 Don't you agree that it is of (very) limited usefulness that the patch you committed would have worked ten years ago but doesn't work now? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] ffprobe: add stream_index to frame data
This patch adds the stream_index to frame data so that a frame may be associated back to the parent stream, otherwise it is difficult to associate them clearly. Dave Rice 0001-ffprobe-print-stream_index-with-frame-data.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
On Wed, 13 May 2015 17:39:01 + (UTC) Carl Eugen Hoyos wrote: > compn mi.rr.com> writes: > > > MPlayer dev-CVS-040406-03:13-3.3.1 (C) 2000-2004 > > Don't you agree that it is of (very) limited > usefulness that the patch you committed would > have worked ten years ago but doesn't work now? i just proved it worked on winxp from 2004 to jan 2015 (r37368). if its a regression that it crashes in latest mplayer, not my fault :) wheres the crash for you? gdb bt? using 32bit mplayer? also the codec does not work in windows vista. using regsvr32 G729DecoderDMO.dll fails, works on winxp though. anyone have latest win32 mplayer binaries so i can test those? -compn ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
compn mi.rr.com> writes: > i just proved it worked on winxp from 2004 to > jan 2015 (r37368). And as said, this is a completely useless proof because a user will only test current MPlayer (not ancient versions). (Note that you of course only proved that it works with two versions, one from 2004 and one from January, but this is not my point.) > if its a regression that it crashes in latest mplayer, > not my fault :) wheres the crash for you? gdb bt? > using 32bit mplayer? Sorry for the misunderstanding: I don't care that it crashes on Linux but works on Windows (with an old MPlayer binary). The issue is that it doesn't work at all (it does not crash but does not call the binary decoder) with current MPlayer, ie that you committed a patch that you did not test (and that does not work). Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Fwd: Help with codecs
Hi, On Wed, May 13, 2015 at 2:01 PM, Carl Eugen Hoyos wrote: > compn mi.rr.com> writes: > > > i just proved it worked on winxp from 2004 to > > jan 2015 (r37368). > > And as said, this is a completely useless proof > because a user will only test current MPlayer > (not ancient versions). > > (Note that you of course only proved that it > works with two versions, one from 2004 and one > from January, but this is not my point.) > > > if its a regression that it crashes in latest mplayer, > > not my fault :) wheres the crash for you? gdb bt? > > using 32bit mplayer? > > Sorry for the misunderstanding: > I don't care that it crashes on Linux but works on > Windows (with an old MPlayer binary). > > The issue is that it doesn't work at all (it does > not crash but does not call the binary decoder) with > current MPlayer, ie that you committed a patch that > you did not test (and that does not work). Would you guys mind moving the remainder of this highly interesting discussion to the appropriate mplayer mailing lists? Thank you, Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Re: [PATCH 2/2] cafdec: free extradata before allocating it
On 13.05.2015 00:47, Carl Eugen Hoyos wrote: > Andreas Cadhalpun googlemail.com> writes: > >> This fixes a memleak if read_kuki_chunk is executed more than once. > > LGTM. Pushed. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] cafdec: check avio_read return value
On 13.05.2015 00:46, Carl Eugen Hoyos wrote: > Andreas Cadhalpun googlemail.com> writes: > >> If avio_read fails, the buffer can contain uninitialized values. > > Patch ok. Pushed. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] ffserver jpg patch
So it the patch good now? It has authors and everything. On Mon, May 11, 2015 at 05:02:34PM -0600, ill wrote: That is what I sent. It is the same file. I have run the git format-patch -1 on this as well, not that the command seems to do anything to the patch file itself. you would have to attach the file generated by git format-patch also you of course first need to locally commit your changes and set the commit message and author see man git commit [...] ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >From 5b681fdaf7971f841b84cfe06412c67ba417fb00 Mon Sep 17 00:00:00 2001 From: Caligula useraccount Date: Mon, 11 May 2015 17:42:42 -0600 Subject: [PATCH] ffserver jpg patch --- ffserver.c | 4 ffserver_config.c| 6 -- ffserver_config.h| 1 + libavformat/allformats.c | 1 + libavformat/rawenc.c | 12 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ffserver.c b/ffserver.c index 4803b96..2b99241 100644 --- a/ffserver.c +++ b/ffserver.c @@ -967,6 +967,10 @@ static int handle_connection(HTTPContext *c) /* close connection if trailer sent */ if (c->state == HTTPSTATE_SEND_DATA_TRAILER) return -1; +/* Check if it is a single jpeg frame 123 */ +if (c->stream->single_frame && c->data_count > c->cur_frame_bytes && c->cur_frame_bytes > 0) { +close_connection(c); +} break; case HTTPSTATE_RECEIVE_DATA: /* no need to read if no events */ diff --git a/ffserver_config.c b/ffserver_config.c index 017af48..06bd8ac 100644 --- a/ffserver_config.c +++ b/ffserver_config.c @@ -862,8 +862,10 @@ static int ffserver_parse_config_stream(FFServerConfig *config, const char *cmd, } else { stream->stream_type = STREAM_TYPE_LIVE; /* JPEG cannot be used here, so use single frame MJPEG */ -if (!strcmp(arg, "jpeg")) -strcpy(arg, "mjpeg"); +if (!strcmp(arg, "jpeg")) { +strcpy(arg, "singlejpeg"); +stream->single_frame=1; +} stream->fmt = ffserver_guess_format(arg, NULL, NULL); if (!stream->fmt) ERROR("Unknown Format: '%s'\n", arg); diff --git a/ffserver_config.h b/ffserver_config.h index bdeb3c9..1b12194 100644 --- a/ffserver_config.h +++ b/ffserver_config.h @@ -79,6 +79,7 @@ typedef struct FFServerStream { int multicast_port; /* first port used for multicast */ int multicast_ttl; int loop; /* if true, send the stream in loops (only meaningful if file) */ +char single_frame;/* only single frame */ /* feed specific */ int feed_opened; /* true if someone is writing to the feed */ diff --git a/libavformat/allformats.c b/libavformat/allformats.c index e6a9d01..2c78e39 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -273,6 +273,7 @@ void av_register_all(void) REGISTER_MUXER (SEGMENT, stream_segment); REGISTER_DEMUXER (SHORTEN, shorten); REGISTER_DEMUXER (SIFF, siff); +REGISTER_MUXER (SINGLEJPEG, singlejpeg); REGISTER_DEMUXER (SLN, sln); REGISTER_DEMUXER (SMACKER, smacker); REGISTER_MUXDEMUX(SMJPEG, smjpeg); diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c index 9b77cdc..9f1fab7 100644 --- a/libavformat/rawenc.c +++ b/libavformat/rawenc.c @@ -250,6 +250,18 @@ AVOutputFormat ff_mjpeg_muxer = { .write_packet = ff_raw_write_packet, .flags = AVFMT_NOTIMESTAMPS, }; + +AVOutputFormat ff_singlejpeg_muxer = { +.name = "singlejpeg", +.long_name = NULL_IF_CONFIG_SMALL("JPEG single image"), +.mime_type = "image/jpeg", +.extensions= "jpg,jpeg", +.audio_codec = AV_CODEC_ID_NONE, +.video_codec = AV_CODEC_ID_MJPEG, +.write_packet = ff_raw_write_packet, +.flags = AVFMT_NOTIMESTAMPS, +.write_header = force_one_stream, +}; #endif #if CONFIG_MLP_MUXER -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] (no subject)
Hi, On Wed, May 13, 2015 at 12:31 PM, Rainer Hochecker wrote: > > From 85ea58a3129b1766d44bf1425c6656d7a4f5624c Mon Sep 17 00:00:00 2001 > From: Rainer Hochecker > Date: Wed, 13 May 2015 18:21:38 +0200 > Subject: [PATCH] swr: fix alignment issue caused by 8ch sse functions > > --- > libswresample/swresample.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libswresample/swresample.c b/libswresample/swresample.c > index 6d13bc5..76b7a84 100644 > --- a/libswresample/swresample.c > +++ b/libswresample/swresample.c > @@ -23,6 +23,7 @@ > #include "audioconvert.h" > #include "libavutil/avassert.h" > #include "libavutil/channel_layout.h" > +#include "libavutil/internal.h" > > #include > > @@ -663,8 +664,8 @@ int swr_is_initialized(struct SwrContext *s) { > return !!s->in_buffer.ch_count; > } > > -int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int > out_count, > -const uint8_t *in_arg [SWR_CH_MAX], int > in_count){ > +int attribute_align_arg swr_convert(struct SwrContext *s, uint8_t > *out_arg[SWR_CH_MAX], int out_count, > +const uint8_t *in_arg > [SWR_CH_MAX], int in_count){ > AudioData * in= &s->in; > AudioData *out= &s->out; lgtm. Micheal, could you merge? Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] FFV1 specification: Add more details about the configuration record
On Wed, May 13, 2015 at 06:47:11PM +0200, Jerome Martinez wrote: [...] > @@ -2661,7 +2728,7 @@ if( keyframe ) { > \begin_inset space ~ > \end_inset > > -if( version < 2 ) [...] > +key "AVI" > + > +\end_inset > + > + for more information about chunks. > +\end_layout > + > +\begin_layout Description > +NumBytes is defined as the size, in bytes, of the strf chunk indicated in > + the chunk header minus the size of the stream format structure. > +\end_layout > + > +\begin_layout Subsubsection > +In ISO/IEC 14496-12 (MP4 File Format) > +\end_layout > + > +\begin_layout Standard > +The Configuration Record extends the sample description box ( Does the text somewhere say why just avi and mp4 are listed as containers ? (i didnt spot that but i might have missed it) It should make it clear that these are not the only containers supported but that nearly any container can be used [...] > @@ -2728,7 +3056,7 @@ if( version < 2 ) > \begin_inset space ~ > \end_inset > > -FrameHeader01( ) > +if( keyframe && !ConfigurationRecordIsPresent) is it better to add indirection here instead of spelling out that its version < 2 ? -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] (no subject)
On Wed, May 13, 2015 at 03:15:35PM -0400, Ronald S. Bultje wrote: > Hi, > > On Wed, May 13, 2015 at 12:31 PM, Rainer Hochecker > wrote: > > > > > From 85ea58a3129b1766d44bf1425c6656d7a4f5624c Mon Sep 17 00:00:00 2001 > > From: Rainer Hochecker > > Date: Wed, 13 May 2015 18:21:38 +0200 > > Subject: [PATCH] swr: fix alignment issue caused by 8ch sse functions > > > > --- > > libswresample/swresample.c | 5 +++-- > > 1 file changed, 3 insertions(+), 2 deletions(-) > > > > diff --git a/libswresample/swresample.c b/libswresample/swresample.c > > index 6d13bc5..76b7a84 100644 > > --- a/libswresample/swresample.c > > +++ b/libswresample/swresample.c > > @@ -23,6 +23,7 @@ > > #include "audioconvert.h" > > #include "libavutil/avassert.h" > > #include "libavutil/channel_layout.h" > > +#include "libavutil/internal.h" > > > > #include > > > > @@ -663,8 +664,8 @@ int swr_is_initialized(struct SwrContext *s) { > > return !!s->in_buffer.ch_count; > > } > > > > -int swr_convert(struct SwrContext *s, uint8_t *out_arg[SWR_CH_MAX], int > > out_count, > > -const uint8_t *in_arg [SWR_CH_MAX], int > > in_count){ > > +int attribute_align_arg swr_convert(struct SwrContext *s, uint8_t > > *out_arg[SWR_CH_MAX], int out_count, > > +const uint8_t *in_arg > > [SWR_CH_MAX], int in_count){ > > AudioData * in= &s->in; > > AudioData *out= &s->out; > > > lgtm. Micheal, could you merge? merged thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] FFV1 specification: Add more details about the configuration record
Le 13/05/2015 21:58, Michael Niedermayer a écrit : Does the text somewhere say why just avi and mp4 are listed as containers ? (i didnt spot that but i might have missed it) They are the only containers I know supporting FFV1 (Matroska is not listed here because it does not support FFV1 directly: it uses the AVI compatibility layer, so currently implementation in Matroska is defined by implementation in AVI + definition of AVI compatibility layer in Matroska) It is not possible to be exhaustive, there is no standardized way to say that "if there is a configuration record, it must be at here", and e.g. for MOV the glbl box is never defined in Apple specs not in ISO specs, it is specific to FFmpeg even if it is aimed to be used for all formats requesting a configuration record. If by chance ISO accepts FFV1 in MP4, they could request that the configuration record is in a "fv1C" box or other change instead of the glbl box... Usually the file format maintainer writes rules but if I understood well what happened in the case of FFV1 in MP4/MOV, FFmpeg decided to use "home made" glbl box and I try to write such reality in the specification, not easy. So this is case per case, file format per file format, I list what I am aware of. Are you aware of another possible container for FFV1 and supported by FFmpeg? It should make it clear that these are not the only containers supported but that nearly any container can be used Agreed. Is it OK with: "This configuration record can be placed in any file format supporting configuration records, fitting as much as possible with how the file format uses to store configuration records. The configuration record storage place and NumBytes are currently defined and supported by this specification for the following container formats:" Note: when I finish to technically update the specification, I'll ask a native English speaker for reviewing the whole spec. LyX Document [...] @@ -2728,7 +3056,7 @@ if( version < 2 ) \begin_inset space ~ \end_inset -FrameHeader01( ) +if( keyframe && !ConfigurationRecordIsPresent) is it better to add indirection here instead of spelling out that its version < 2 ? at this moment of the parsing, version is not defined in the case of a bitstream conforming to version < 2 (it is defined just after). In the current FFV1 specification, it does not make sense (version is tested before being defined) I don't see how to describe correctly the bitstream with "version < 2" here. this is not an indirection for nothing, this is avoiding to use a single field for different purpose: version is for indicating the version, not for knowing if there was a configuration record. this is the reason I propose to have 2 different fields: 1 for version, 1 for knowing if there was a configuration record before the parsing of a frame. This does not prevent the decoder to use a different algorithm, but a specification is not optimized code: saying that version is < 2 before we read version from the bitstream is not correct from my point of view (we don't know the version because we did not read it, so we can not say that version is < 2). From my point of view, this is also more future proof: you may decide that version 5 can accept both cases (with or without configuration record), it would be easier to update the specification (with "version < 2", you forbids forever any new version without configuration records). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] FFV1 specification: Add more details about the configuration record
On Wed, May 13, 2015 at 11:34:45PM +0200, Jerome Martinez wrote: > Le 13/05/2015 21:58, Michael Niedermayer a écrit : > >Does the text somewhere say why just avi and mp4 are listed as > >containers ? (i didnt spot that but i might have missed it) > > They are the only containers I know supporting FFV1 (Matroska is not > listed here because it does not support FFV1 directly: it uses the > AVI compatibility layer, so currently implementation in Matroska is > defined by implementation in AVI + definition of AVI compatibility > layer in Matroska) > > It is not possible to be exhaustive, there is no standardized way to > say that "if there is a configuration record, it must be at here", > and e.g. for MOV the glbl box is never defined in Apple specs not in > ISO specs, it is specific to FFmpeg even if it is aimed to be used > for all formats requesting a configuration record. > If by chance ISO accepts FFV1 in MP4, they could request that the > configuration record is in a "fv1C" box or other change instead of > the glbl box... Usually the file format maintainer writes rules but > if I understood well what happened in the case of FFV1 in MP4/MOV, > FFmpeg decided to use "home made" glbl box and I try to write such > reality in the specification, not easy. > > So this is case per case, file format per file format, I list what I > am aware of. > Are you aware of another possible container for FFV1 and supported > by FFmpeg? nut and ffm surely work too > > > It should make it clear that these are not the only containers > >supported but that nearly any container can be used > > Agreed. > > Is it OK with: > > "This configuration record can be placed in any file format > supporting configuration records, fitting as much as possible with > how the file format uses to store configuration records. The > configuration record storage place and NumBytes are currently > defined and supported by this specification for the following > container formats:" ok > > Note: when I finish to technically update the specification, I'll > ask a native English speaker for reviewing the whole spec. good > LyX Document > > >[...] > >>@@ -2728,7 +3056,7 @@ if( version < 2 ) > >> \begin_inset space ~ > >> \end_inset > >>-FrameHeader01( ) > >>+if( keyframe && !ConfigurationRecordIsPresent) > >is it better to add indirection here instead of spelling out that > >its version < 2 ? > > at this moment of the parsing, version is not defined in the case of > a bitstream conforming to version < 2 (it is defined just after). > In the current FFV1 specification, it does not make sense (version > is tested before being defined) > I don't see how to describe correctly the bitstream with "version < 2" here. hmm ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] nutdec: Remove unused label
Added in 361702660d2c37a63b7d6381d39e1e1de8405260. Modified version that doesn't use this label merged in 55231323b0fdc84a529418d673148cf1f3157229, thus obsoleting this label. --- libavformat/nutdec.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 9c017e0..88a2d32 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -822,10 +822,8 @@ static int nut_read_header(AVFormatContext *s) ff_metadata_conv_ctx(s, NULL, ff_nut_metadata_conv); -end: -if (ret < 0) -nut_read_close(s); -return FFMIN(ret, 0); +return 0; + fail: nut_read_close(s); -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] nutdec: Remove unused label
On Wed, May 13, 2015 at 04:23:09PM -0700, Timothy Gu wrote: > Added in 361702660d2c37a63b7d6381d39e1e1de8405260. Modified version that > doesn't use this label merged in 55231323b0fdc84a529418d673148cf1f3157229, > thus obsoleting this label. > --- > libavformat/nutdec.c | 6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] [BACKPORT] tests: drop bc dependency
Hi all, I find commit a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6 [1]: commit a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6 Author: Clément Bœsch Date: Mon Jan 19 22:56:59 2015 +0100 tests: drop bc dependency We already have a dependency on awk and bc is sometimes not found in the base system. Signed-off-by: Martin Storsjö to be helpful on the release branches. I have cherry-picked that commit and pushed to branches: - no-bc/2.2 - no-bc/2.4 - no-bc/2.5 to https://github.com/TimothyGu/FFmpeg.git. I hope those branches can be considered for merging. [1]: The mentioned commit is a backport to Libav which has some additional fixes not present in the original commit. Original commit: d47eeff2741a9ad9eb4398c1d844dd4f638d6ee4 Merge commit:9b41bf5c3dcefb95c8329e699f4bdb71ad267e6f Timothy ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for HEVC uni hv mc functions
On Wed, May 13, 2015 at 11:46:32AM +, Nedeljko Babic wrote: > LGTM applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] [BACKPORT] tests: drop bc dependency
On Wed, May 13, 2015 at 05:28:32PM -0700, Timothy Gu wrote: > Hi all, > > I find commit a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6 [1]: > > commit a982c5d74fbc7ff5bd2f2f73af61ae48e9b1bcc6 > Author: Clément Bœsch > Date: Mon Jan 19 22:56:59 2015 +0100 > > tests: drop bc dependency > > We already have a dependency on awk and bc is sometimes not found in > the base system. > > Signed-off-by: Martin Storsjö > > to be helpful on the release branches. > > I have cherry-picked that commit and pushed to branches: > > - no-bc/2.2 > - no-bc/2.4 > - no-bc/2.5 > > to https://github.com/TimothyGu/FFmpeg.git. I hope those branches can be > considered for merging. pushed thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel