[FFmpeg-devel] [PATCH] h264: check frame properties for consistency before copying
Also use the frame pixel format instead of the one from the codec context, which is more robust. Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- libavcodec/h264_slice.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 0c0812f..0183b9c 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -1552,12 +1552,14 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl) * vectors. Given we are concealing a lost frame, this probably * is not noticeable by comparison, but it should be fixed. */ if (h-short_ref_count) { -if (prev) { +if (prev h-short_ref[0]-f-width == prev-f-width + h-short_ref[0]-f-height == prev-f-height + h-short_ref[0]-f-format == prev-f-format) { av_image_copy(h-short_ref[0]-f-data, h-short_ref[0]-f-linesize, (const uint8_t **)prev-f-data, prev-f-linesize, - h-avctx-pix_fmt, + prev-f-format, h-mb_width * 16, h-mb_height * 16); h-short_ref[0]-poc = prev-poc + 2; -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc: fix spelling errors
On Sat, Jun 13, 2015 at 09:46:01PM +0200, Andreas Cadhalpun wrote: Neccessary - Necessary formated - formatted thee - the eventhough - even though seperately - separately Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- doc/examples/transcoding.c | 2 +- libavcodec/ass_split.h | 2 +- libavcodec/bitstream.c | 2 +- libavformat/avio.h | 2 +- libavformat/flvenc.c | 2 +- libavutil/log.h| 2 +- libavutil/pixfmt.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) should be ok thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [libav-devel] [PATCH] h264: update avctx width/height when flushing
On 14.06.2015 13:46, Luca Barbato wrote: On 14/06/15 12:38, Andreas Cadhalpun wrote: I discussed it with Hendrik and asked him for a better way to fix the problem. It seems he hasn't found one, yet. Told you how to that, did you miss that part from the previous email? If you mean just documenting the problem, that won't fix anything in the short term. Did I just hear you volunteer to check all API users and send patches, where you find it necessary? As if hadn't been done in the past... It is not exceedingly fun but me, Anton and quite a bit of people from Libav did for the previous API migrations. Yes, that was fixing build failures with newer Libav versions. However, this issue doesn't cause build failures, but can cause runtime problems. Finding (and then fixing) problematic code is thus more difficult. Are you (or someone else here) actually going to do that? If so, I'd be fine with dropping the patch, but fixing it in libavcodec looks like a lot less effort. As you can see, it uses the pixel format from the codec context and it doesn't check for width/height/format inconsistencies. I'd say that's the opposite of hadn't happened here. ;) The codec is supposed to do whatever it wants with those fields, you have the problem not when you assemble the frame but when you output it since reordering would make the context reflect a perceived future than the present frame. The problem is calling av_image_copy with inconsistent parameters. This happens in above code just as it does in the demuxing_decoding example. The lines above mark that as a not exactly stellar solution happening as best effort solution. What I'd avoid to do again in this discussion =) Probably might be safer to check that the reference is matching and use black instead, thanks for spotting something that might be an issue. You're welcome. If that's the case, Michael's idea of moving this backup/restore into avcodec_decode_video2 and using it for codecs declaring some FF_CODEC_CAP_* (or maybe just unconditionally) looks like the way to go. Depends if you consider avcodec_decode_video2 a fastpath or a slowpath and if those load+store are impacting I guess. I think those wouldn't impact performance in a noticeable way. The least wrong way is to consider those fields as write only in both direction and keep a shadow. basically ## open Save the hint values in some internal variables avctx-internal-{*width,*height,format} = avctx-{*width,*height,format} ## decode Use the internal variables as currently is done avctx-internal-{*width,*height,format} Update the external avctx-{*width,*height,format} is updated using the avframe. Yes, that would work as well and if one would design the API from scratch this way would be preferable. I hope now it is clear how I'd fix it and why I consider it too daunting given the non-problem it supposedly solves. It would require changing a lot of code to use the internal values, but I think the same effect could be achieved by backing up/restoring the values. And that would require significantly less code changes. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] doc: fix spelling errors
On 14.06.2015 14:36, Michael Niedermayer wrote: On Sat, Jun 13, 2015 at 09:46:01PM +0200, Andreas Cadhalpun wrote: Neccessary - Necessary formated - formatted thee - the eventhough - even though seperately - separately Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- doc/examples/transcoding.c | 2 +- libavcodec/ass_split.h | 2 +- libavcodec/bitstream.c | 2 +- libavformat/avio.h | 2 +- libavformat/flvenc.c | 2 +- libavutil/log.h| 2 +- libavutil/pixfmt.h | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) should be ok Pushed. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [libav-devel] [PATCH] h264: update avctx width/height when flushing
On 14.06.2015 03:12, Luca Barbato wrote: I prefer fix bugs properly and I prefer to wait a second and listen to everybody before do something. That's a commendable ideal, but if it results in problems not getting fixed at all, it's counter-productive. Discuss with Hendrik, since he had been quite critical about it and I'd take in account his feedback. I discussed it with Hendrik and asked him for a better way to fix the problem. It seems he hasn't found one, yet. Now some explanations on how you see the problem and which codecs should be affected. You have the dimensions and the pixel format in the avcodec context. They might be updated or not by the codec, some already do not update those value nor consider them at all, so I would rather have the programs using badly the API get a patch Did I just hear you volunteer to check all API users and send patches, where you find it necessary? than perpetuate some mistakes that, again, hadn't happened here to begin with. I'd like to invite you to take a closer look at the h264 decoder, in particular the following code in libavcodec/h264_slice.c: av_image_copy(h-short_ref[0]-f-data, h-short_ref[0]-f-linesize, (const uint8_t **)prev-f-data, prev-f-linesize, h-avctx-pix_fmt, h-mb_width * 16, h-mb_height * 16); As you can see, it uses the pixel format from the codec context and it doesn't check for width/height/format inconsistencies. I'd say that's the opposite of hadn't happened here. ;) Discounting that issue, let see how those fields could be updated. The codec using them need to update them as they parse the data usually since they do use them while decoding. If you have multiple threads involved or you have any delay between outputting a frame and parsing you can have this kind of mismatch between what is in the frame and what the codec sets there. Any kind of frame reordering would get the user that kind of discrepancy. So the codec affected needs threads, b-frames (or assimilable) and frame properties changes to get the poor misguided guy to have issues randomly. You asked which other codec should have the issue, HEVC seems to me a good candidate. You parse a new set of sps while you are still outputting something using the previous set and you have the issue. If that's the case, Michael's idea of moving this backup/restore into avcodec_decode_video2 and using it for codecs declaring some FF_CODEC_CAP_* (or maybe just unconditionally) looks like the way to go. No, that kind of usage is not working at all and should not be supported. Unfortunately the API documentation hadn't mentioned this, thus I wouldn't be surprised if that usage happens in the wild. So removing that pitfall from the API is a worthwhile objective. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 5/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for pixblock functions
From: Shivraj Patil shivraj.pa...@imgtec.com This patch adds MSA (MIPS-SIMD-Arch) optimizations for pixblock functions in new file pixblockdsp_msa.c Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com --- libavcodec/mips/Makefile| 2 + libavcodec/mips/pixblockdsp_init_mips.c | 53 libavcodec/mips/pixblockdsp_mips.h | 33 libavcodec/mips/pixblockdsp_msa.c | 143 libavcodec/pixblockdsp.c| 2 + libavcodec/pixblockdsp.h| 2 + libavutil/mips/generic_macros_msa.h | 8 ++ 7 files changed, 243 insertions(+) create mode 100644 libavcodec/mips/pixblockdsp_init_mips.c create mode 100644 libavcodec/mips/pixblockdsp_mips.h create mode 100644 libavcodec/mips/pixblockdsp_msa.c diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index 823a2c5..c0ecb15 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -28,6 +28,7 @@ OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_init_mips.o OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_init_mips.o OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o OBJS-$(CONFIG_BLOCKDSP) += mips/blockdsp_init_mips.o +OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o\ mips/hevc_mc_uni_msa.o\ mips/hevc_mc_uniw_msa.o \ @@ -45,5 +46,6 @@ MSA-OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_msa.o MSA-OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_msa.o MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o MSA-OBJS-$(CONFIG_BLOCKDSP) += mips/blockdsp_msa.o +MSA-OBJS-$(CONFIG_PIXBLOCKDSP)+= mips/pixblockdsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o LOONGSON3-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_mmi.o diff --git a/libavcodec/mips/pixblockdsp_init_mips.c b/libavcodec/mips/pixblockdsp_init_mips.c new file mode 100644 index 000..0f2fb15 --- /dev/null +++ b/libavcodec/mips/pixblockdsp_init_mips.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2015 Shivraj Patil (shivraj.pa...@imgtec.com) + * + * 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 pixblockdsp_mips.h + +#if HAVE_MSA +static av_cold void pixblockdsp_init_msa(PixblockDSPContext *c, + AVCodecContext *avctx, + unsigned high_bit_depth) +{ +c-diff_pixels = ff_diff_pixels_msa; + +switch (avctx-bits_per_raw_sample) { +case 9: +case 10: +case 12: +case 14: +c-get_pixels = ff_get_pixels_16_msa; +break; +default: +if (avctx-bits_per_raw_sample = 8 || avctx-codec_type != +AVMEDIA_TYPE_VIDEO) { +c-get_pixels = ff_get_pixels_8_msa; +} +break; +} +} +#endif // #if HAVE_MSA + +void ff_pixblockdsp_init_mips(PixblockDSPContext *c, AVCodecContext *avctx, + unsigned high_bit_depth) +{ +#if HAVE_MSA +pixblockdsp_init_msa(c, avctx, high_bit_depth); +#endif // #if HAVE_MSA +} diff --git a/libavcodec/mips/pixblockdsp_mips.h b/libavcodec/mips/pixblockdsp_mips.h new file mode 100644 index 000..3eee6e0 --- /dev/null +++ b/libavcodec/mips/pixblockdsp_mips.h @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2015 Shivraj Patil (shivraj.pa...@imgtec.com) + * + * 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
[FFmpeg-devel] [PATCH 4/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for block functions
From: Shivraj Patil shivraj.pa...@imgtec.com This patch adds MSA (MIPS-SIMD-Arch) optimizations for block functions in new file blockdsp_msa.c Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com --- libavcodec/blockdsp.c| 2 + libavcodec/blockdsp.h| 1 + libavcodec/mips/Makefile | 2 + libavcodec/mips/blockdsp_init_mips.c | 40 + libavcodec/mips/blockdsp_mips.h | 31 + libavcodec/mips/blockdsp_msa.c | 86 6 files changed, 162 insertions(+) create mode 100644 libavcodec/mips/blockdsp_init_mips.c create mode 100644 libavcodec/mips/blockdsp_mips.h create mode 100644 libavcodec/mips/blockdsp_msa.c diff --git a/libavcodec/blockdsp.c b/libavcodec/blockdsp.c index f5259f6..8480f0b 100644 --- a/libavcodec/blockdsp.c +++ b/libavcodec/blockdsp.c @@ -77,4 +77,6 @@ av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx) #else ff_blockdsp_init_x86(c, high_bit_depth); #endif /* FF_API_XVMC */ +if (ARCH_MIPS) +ff_blockdsp_init_mips(c, high_bit_depth); } diff --git a/libavcodec/blockdsp.h b/libavcodec/blockdsp.h index c7ad265..32ea107 100644 --- a/libavcodec/blockdsp.h +++ b/libavcodec/blockdsp.h @@ -49,5 +49,6 @@ void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth, #else void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth); #endif /* FF_API_XVMC */ +void ff_blockdsp_init_mips(BlockDSPContext *c, unsigned high_bit_depth); #endif /* AVCODEC_BLOCKDSP_H */ diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index b2c8a7b..823a2c5 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -27,6 +27,7 @@ OBJS-$(CONFIG_H264PRED) += mips/h264pred_init_mips.o OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_init_mips.o OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_init_mips.o OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o +OBJS-$(CONFIG_BLOCKDSP) += mips/blockdsp_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o\ mips/hevc_mc_uni_msa.o\ mips/hevc_mc_uniw_msa.o \ @@ -43,5 +44,6 @@ MSA-OBJS-$(CONFIG_H264PRED) += mips/h264pred_msa.o MSA-OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_msa.o MSA-OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_msa.o MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o +MSA-OBJS-$(CONFIG_BLOCKDSP) += mips/blockdsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o LOONGSON3-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_mmi.o diff --git a/libavcodec/mips/blockdsp_init_mips.c b/libavcodec/mips/blockdsp_init_mips.c new file mode 100644 index 000..99ae316 --- /dev/null +++ b/libavcodec/mips/blockdsp_init_mips.c @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2015 Parag Salasakar (parag.salasa...@imgtec.com) + * + * 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 blockdsp_mips.h + +#if HAVE_MSA +static av_cold void blockdsp_init_msa(BlockDSPContext *c, + unsigned high_bit_depth) +{ +c-clear_block = ff_clear_block_msa; +c-clear_blocks = ff_clear_blocks_msa; + +c-fill_block_tab[0] = ff_fill_block16_msa; +c-fill_block_tab[1] = ff_fill_block8_msa; +} +#endif // #if HAVE_MSA + +void ff_blockdsp_init_mips(BlockDSPContext *c, unsigned high_bit_depth) +{ +#if HAVE_MSA +blockdsp_init_msa(c, high_bit_depth); +#endif // #if HAVE_MSA +} diff --git a/libavcodec/mips/blockdsp_mips.h b/libavcodec/mips/blockdsp_mips.h new file mode 100644 index 000..0b6bb67 --- /dev/null +++ b/libavcodec/mips/blockdsp_mips.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2015 Parag Salasakar (parag.salasa...@imgtec.com) + * + * 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-devel] [PATCH] examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
This is more robust. And only check if there is actually a frame returned. Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- doc/examples/demuxing_decoding.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/doc/examples/demuxing_decoding.c b/doc/examples/demuxing_decoding.c index feeeb96..98b3a83 100644 --- a/doc/examples/demuxing_decoding.c +++ b/doc/examples/demuxing_decoding.c @@ -81,22 +81,24 @@ static int decode_packet(int *got_frame, int cached) fprintf(stderr, Error decoding video frame (%s)\n, av_err2str(ret)); return ret; } -if (video_dec_ctx-width != width || video_dec_ctx-height != height || -video_dec_ctx-pix_fmt != pix_fmt) { -/* To handle this change, one could call av_image_alloc again and - * decode the following frames into another rawvideo file. */ -fprintf(stderr, Error: Width, height and pixel format have to be -constant in a rawvideo file, but the width, height or -pixel format of the input video changed:\n -old: width = %d, height = %d, format = %s\n -new: width = %d, height = %d, format = %s\n, -width, height, av_get_pix_fmt_name(pix_fmt), -video_dec_ctx-width, video_dec_ctx-height, -av_get_pix_fmt_name(video_dec_ctx-pix_fmt)); -return -1; -} if (*got_frame) { + +if (frame-width != width || frame-height != height || +frame-format != pix_fmt) { +/* To handle this change, one could call av_image_alloc again and + * decode the following frames into another rawvideo file. */ +fprintf(stderr, Error: Width, height and pixel format have to be +constant in a rawvideo file, but the width, height or +pixel format of the input video changed:\n +old: width = %d, height = %d, format = %s\n +new: width = %d, height = %d, format = %s\n, +width, height, av_get_pix_fmt_name(pix_fmt), +frame-width, frame-height, +av_get_pix_fmt_name(frame-format)); +return -1; +} + printf(video_frame%s n:%d coded_n:%d pts:%s\n, cached ? (cached) : , video_frame_count++, frame-coded_picture_number, -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for hpel functions
From: Shivraj Patil shivraj.pa...@imgtec.com This patch adds MSA (MIPS-SIMD-Arch) optimizations for hpel functions in new file hpeldsp_msa.c Adds new generic macros (needed for this patch) in libavutil/mips/generic_macros_msa.h Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com --- libavcodec/hpeldsp.c|2 + libavcodec/hpeldsp.h|1 + libavcodec/mips/Makefile|2 + libavcodec/mips/hpeldsp_init_mips.c | 73 ++ libavcodec/mips/hpeldsp_mips.h | 87 ++ libavcodec/mips/hpeldsp_msa.c | 1498 +++ libavutil/mips/generic_macros_msa.h | 162 7 files changed, 1825 insertions(+) create mode 100644 libavcodec/mips/hpeldsp_init_mips.c create mode 100644 libavcodec/mips/hpeldsp_mips.h create mode 100644 libavcodec/mips/hpeldsp_msa.c diff --git a/libavcodec/hpeldsp.c b/libavcodec/hpeldsp.c index 7763760..8e2fd8f 100644 --- a/libavcodec/hpeldsp.c +++ b/libavcodec/hpeldsp.c @@ -365,4 +365,6 @@ av_cold void ff_hpeldsp_init(HpelDSPContext *c, int flags) ff_hpeldsp_init_ppc(c, flags); if (ARCH_X86) ff_hpeldsp_init_x86(c, flags); +if (ARCH_MIPS) +ff_hpeldsp_init_mips(c, flags); } diff --git a/libavcodec/hpeldsp.h b/libavcodec/hpeldsp.h index 07c293a..1a3cea5 100644 --- a/libavcodec/hpeldsp.h +++ b/libavcodec/hpeldsp.h @@ -99,5 +99,6 @@ void ff_hpeldsp_init_alpha(HpelDSPContext *c, int flags); void ff_hpeldsp_init_arm(HpelDSPContext *c, int flags); void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags); void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags); +void ff_hpeldsp_init_mips(HpelDSPContext *c, int flags); #endif /* AVCODEC_HPELDSP_H */ diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index 7742eea..b2c8a7b 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -26,6 +26,7 @@ OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_init_mips.o OBJS-$(CONFIG_H264PRED) += mips/h264pred_init_mips.o OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_init_mips.o OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_init_mips.o +OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o\ mips/hevc_mc_uni_msa.o\ mips/hevc_mc_uniw_msa.o \ @@ -41,5 +42,6 @@ MSA-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_msa.o MSA-OBJS-$(CONFIG_H264PRED) += mips/h264pred_msa.o MSA-OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_msa.o MSA-OBJS-$(CONFIG_QPELDSP)+= mips/qpeldsp_msa.o +MSA-OBJS-$(CONFIG_HPELDSP)+= mips/hpeldsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o LOONGSON3-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_mmi.o diff --git a/libavcodec/mips/hpeldsp_init_mips.c b/libavcodec/mips/hpeldsp_init_mips.c new file mode 100644 index 000..82f2310 --- /dev/null +++ b/libavcodec/mips/hpeldsp_init_mips.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015 Parag Salasakar (parag.salasa...@imgtec.com) + * + * 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 ../hpeldsp.h +#include libavcodec/mips/hpeldsp_mips.h + +#if HAVE_MSA +static void ff_hpeldsp_init_msa(HpelDSPContext *c, int flags) +{ +c-put_pixels_tab[0][0] = ff_put_pixels16_msa; +c-put_pixels_tab[0][1] = ff_put_pixels16_x2_msa; +c-put_pixels_tab[0][2] = ff_put_pixels16_y2_msa; +c-put_pixels_tab[0][3] = ff_put_pixels16_xy2_msa; + +c-put_pixels_tab[1][0] = ff_put_pixels8_msa; +c-put_pixels_tab[1][1] = ff_put_pixels8_x2_msa; +c-put_pixels_tab[1][2] = ff_put_pixels8_y2_msa; +c-put_pixels_tab[1][3] = ff_put_pixels8_xy2_msa; + +c-put_pixels_tab[2][1] = ff_put_pixels4_x2_msa; +c-put_pixels_tab[2][2] = ff_put_pixels4_y2_msa; +c-put_pixels_tab[2][3] = ff_put_pixels4_xy2_msa; + +c-put_no_rnd_pixels_tab[0][0] = ff_put_pixels16_msa; +c-put_no_rnd_pixels_tab[0][1] = ff_put_no_rnd_pixels16_x2_msa; +c-put_no_rnd_pixels_tab[0][2] = ff_put_no_rnd_pixels16_y2_msa; +c-put_no_rnd_pixels_tab[0][3] =
[FFmpeg-devel] [PATCH 1/5] avcodec/mips: MSA (MIPS-SIMD-Arch) optimizations for H263 lpf functions
From: Shivraj Patil shivraj.pa...@imgtec.com This patch adds MSA (MIPS-SIMD-Arch) optimizations for H263 lpf functions in new file h263dsp_msa.c Signed-off-by: Shivraj Patil shivraj.pa...@imgtec.com --- libavcodec/h263dsp.c| 2 + libavcodec/h263dsp.h| 1 + libavcodec/mips/Makefile| 2 + libavcodec/mips/h263dsp_init_mips.c | 36 libavcodec/mips/h263dsp_mips.h | 36 libavcodec/mips/h263dsp_msa.c | 164 6 files changed, 241 insertions(+) create mode 100644 libavcodec/mips/h263dsp_init_mips.c create mode 100644 libavcodec/mips/h263dsp_mips.h create mode 100644 libavcodec/mips/h263dsp_msa.c diff --git a/libavcodec/h263dsp.c b/libavcodec/h263dsp.c index a70ff24..b3c0bcd 100644 --- a/libavcodec/h263dsp.c +++ b/libavcodec/h263dsp.c @@ -121,4 +121,6 @@ av_cold void ff_h263dsp_init(H263DSPContext *ctx) if (ARCH_X86) ff_h263dsp_init_x86(ctx); +if (ARCH_MIPS) +ff_h263dsp_init_mips(ctx); } diff --git a/libavcodec/h263dsp.h b/libavcodec/h263dsp.h index d2cc2ff..1abea3c 100644 --- a/libavcodec/h263dsp.h +++ b/libavcodec/h263dsp.h @@ -30,5 +30,6 @@ typedef struct H263DSPContext { void ff_h263dsp_init(H263DSPContext *ctx); void ff_h263dsp_init_x86(H263DSPContext *ctx); +void ff_h263dsp_init_mips(H263DSPContext *ctx); #endif /* AVCODEC_H263DSP_H */ diff --git a/libavcodec/mips/Makefile b/libavcodec/mips/Makefile index d80d4e6..63c7298 100644 --- a/libavcodec/mips/Makefile +++ b/libavcodec/mips/Makefile @@ -24,6 +24,7 @@ OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_init_mips.o OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_init_mips.o OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_init_mips.o OBJS-$(CONFIG_H264PRED) += mips/h264pred_init_mips.o +OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_init_mips.o MSA-OBJS-$(CONFIG_HEVC_DECODER) += mips/hevcdsp_msa.o\ mips/hevc_mc_uni_msa.o\ mips/hevc_mc_uniw_msa.o \ @@ -37,5 +38,6 @@ MSA-OBJS-$(CONFIG_H264DSP)+= mips/h264dsp_msa.o\ MSA-OBJS-$(CONFIG_H264QPEL) += mips/h264qpel_msa.o MSA-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_msa.o MSA-OBJS-$(CONFIG_H264PRED) += mips/h264pred_msa.o +MSA-OBJS-$(CONFIG_H263DSP)+= mips/h263dsp_msa.o LOONGSON3-OBJS-$(CONFIG_H264DSP) += mips/h264dsp_mmi.o LOONGSON3-OBJS-$(CONFIG_H264CHROMA) += mips/h264chroma_mmi.o diff --git a/libavcodec/mips/h263dsp_init_mips.c b/libavcodec/mips/h263dsp_init_mips.c new file mode 100644 index 000..09bd937 --- /dev/null +++ b/libavcodec/mips/h263dsp_init_mips.c @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com) + * + * 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 h263dsp_mips.h + +#if HAVE_MSA +static av_cold void h263dsp_init_msa(H263DSPContext *c) +{ +c-h263_h_loop_filter = ff_h263_h_loop_filter_msa; +c-h263_v_loop_filter = ff_h263_v_loop_filter_msa; +} +#endif // #if HAVE_MSA + +av_cold void ff_h263dsp_init_mips(H263DSPContext *c) +{ +#if HAVE_MSA +h263dsp_init_msa(c); +#endif // #if HAVE_MSA +} diff --git a/libavcodec/mips/h263dsp_mips.h b/libavcodec/mips/h263dsp_mips.h new file mode 100644 index 000..9b264b2 --- /dev/null +++ b/libavcodec/mips/h263dsp_mips.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2015 Manojkumar Bhosale (manojkumar.bhos...@imgtec.com) + * + * 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
Re: [FFmpeg-devel] [PATCH] doc: avoid incorrect phrase 'allows to'
Apologies for the formatting. On Sun, Jun 14, 2015, at 10:49 AM, Andreas Cadhalpun wrote: Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- Changelog | 2 +- doc/decoders.texi | 2 +- libavcodec/bitstream.c | 2 +- libavcodec/libspeexenc.c| 2 +- libavcodec/ppc/me_cmp.c | 2 +- libavcodec/vp9.c| 2 +- libavcodec/x86/vc1dsp_mmx.c | 2 +- libavdevice/alsa_dec.c | 2 +- libavdevice/alsa_enc.c | 2 +- libavdevice/avdevice.h | 2 +- libavformat/avformat.h | 6 +++--- libavutil/opt.h | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Changelog b/Changelog index 9a53286..3853978 100644 --- a/Changelog +++ b/Changelog @@ -574,7 +574,7 @@ easier to use. The changes are: all the stream in the first input file, except for the second audio stream'. * There is a new option -c (or -codec) for choosing the decoder/encoder to - use, which allows to precisely specify target stream(s) consistently with + use, which makes it possible to precisely specify target stream(s) consistently with other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0 libvorbis sets the codec for the first audio stream and -c copy copies all the streams without reencoding. Old -vcodec/-acodec/-scodec options are now diff --git a/doc/decoders.texi b/doc/decoders.texi index 68196cf..2fb533a 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -95,7 +95,7 @@ This decoder aims to implement the complete FLAC specification from Xiph. @item -use_buggy_lpc The lavc FLAC encoder used to produce buggy streams with high lpc values -(like the default value). This option allows to decode such streams +(like the default value). This option makes it possible to decode such streams correctly by using lavc's old buggy lpc logic for decoding. @end table diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 0074234..924cc51 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -265,7 +265,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, 'xxx_size' : gives the number of bytes of each entry of the 'bits' or 'codes' tables. - 'wrap' and 'size' allows to use any memory configuration and types + 'wrap' and 'size' make it possible to use any memory configuration and types (byte/word/long) to store the 'bits', 'codes', and 'symbols' tables. 'use_static' should be set to 1 for tables, which should be freed diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index 22d0d6e..fac8e72 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -76,7 +76,7 @@ * encodes them with just enough bits to reproduce the background noise. * * Discontinuous Transmission (DTX) - * DTX is an addition to VAD/VBR operation, that allows to stop transmitting + * DTX is an addition to VAD/VBR operation, that makes it possible to stop transmitting * completely when the background noise is stationary. * In file-based operation only 5 bits are used for such frames. */ diff --git a/libavcodec/ppc/me_cmp.c b/libavcodec/ppc/me_cmp.c index 38a7ba1..26755cc 100644 --- a/libavcodec/ppc/me_cmp.c +++ b/libavcodec/ppc/me_cmp.c @@ -504,7 +504,7 @@ static int hadamard8_diff8x8_altivec(MpegEncContext *s, uint8_t *dst, } /* - * 16x8 works with 16 elements; it allows to avoid replicating loads, and + * 16x8 works with 16 elements; it allows one to avoid replicating loads, and Possible alternatives: ...elements; it avoids replicating loads, and... ...elements; it can avoid replicating loads, and... * gives the compiler more room for scheduling. It's only used from * inside hadamard8_diff16_altivec. * diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index d5147e5..4e2ed53 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3286,7 +3286,7 @@ static void decode_b(AVCodecContext *ctx, int row, int col, } // emulated overhangs if the stride of the target buffer can't hold. This -// allows to support emu-edge and so on even if we have large block +// makes it possible to support emu-edge and so on even if we have large block // overhangs emu[0] = (col + w4) * 8 f-linesize[0] || (row + h4) s-rows; diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index f11170c..0c2584d 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -80,7 +80,7 @@ movq %%mm#R1, #OFF(%1) \n\t\ add %2, %0 \n\t -/** Sacrifying mm6 allows to pipeline loads from src */ +/** Sacrifying mm6 makes it possible to pipeline loads from src */ Sacrifying looks like a typo for Sacrificing, or it's a
Re: [FFmpeg-devel] [libav-devel] [PATCH] h264: update avctx width/height when flushing
On 14.06.2015 18:48, Luca Barbato wrote: On 14/06/15 17:31, Andreas Cadhalpun wrote: On 14.06.2015 16:46, Luca Barbato wrote: Sadly some codecs such as vdpau (thanks to wm4 for spotting) would possibly break if those parameters aren't set to the current decoding decoding set, so setting avctx-{those} to the last outputted frame could probably cause more problems. That'd be unfortunate. What issues could it cause for vdpau? They coded dimension seem to be used for allocation so I guess would be quite problematic. So if I understood that correctly the API user has to allocate a buffer for the vdpau decoder based on coded_with/coded_height. So the values have to be for the next frame and can't be for the last, if there is any difference between these two. That unfortunately makes completely fixing the problem in libavcodec rather impossible... Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] doc: avoid incorrect phrase 'allows to'
Signed-off-by: Andreas Cadhalpun andreas.cadhal...@googlemail.com --- Changelog | 2 +- doc/decoders.texi | 2 +- libavcodec/bitstream.c | 2 +- libavcodec/libspeexenc.c| 2 +- libavcodec/ppc/me_cmp.c | 2 +- libavcodec/vp9.c| 2 +- libavcodec/x86/vc1dsp_mmx.c | 2 +- libavdevice/alsa_dec.c | 2 +- libavdevice/alsa_enc.c | 2 +- libavdevice/avdevice.h | 2 +- libavformat/avformat.h | 6 +++--- libavutil/opt.h | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Changelog b/Changelog index 9a53286..3853978 100644 --- a/Changelog +++ b/Changelog @@ -574,7 +574,7 @@ easier to use. The changes are: all the stream in the first input file, except for the second audio stream'. * There is a new option -c (or -codec) for choosing the decoder/encoder to - use, which allows to precisely specify target stream(s) consistently with + use, which makes it possible to precisely specify target stream(s) consistently with other options. E.g. -c:v lib264 sets the codec for all video streams, -c:a:0 libvorbis sets the codec for the first audio stream and -c copy copies all the streams without reencoding. Old -vcodec/-acodec/-scodec options are now diff --git a/doc/decoders.texi b/doc/decoders.texi index 68196cf..2fb533a 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -95,7 +95,7 @@ This decoder aims to implement the complete FLAC specification from Xiph. @item -use_buggy_lpc The lavc FLAC encoder used to produce buggy streams with high lpc values -(like the default value). This option allows to decode such streams +(like the default value). This option makes it possible to decode such streams correctly by using lavc's old buggy lpc logic for decoding. @end table diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 0074234..924cc51 100644 --- a/libavcodec/bitstream.c +++ b/libavcodec/bitstream.c @@ -265,7 +265,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes, 'xxx_size' : gives the number of bytes of each entry of the 'bits' or 'codes' tables. - 'wrap' and 'size' allows to use any memory configuration and types + 'wrap' and 'size' make it possible to use any memory configuration and types (byte/word/long) to store the 'bits', 'codes', and 'symbols' tables. 'use_static' should be set to 1 for tables, which should be freed diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index 22d0d6e..fac8e72 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -76,7 +76,7 @@ * encodes them with just enough bits to reproduce the background noise. * * Discontinuous Transmission (DTX) - * DTX is an addition to VAD/VBR operation, that allows to stop transmitting + * DTX is an addition to VAD/VBR operation, that makes it possible to stop transmitting * completely when the background noise is stationary. * In file-based operation only 5 bits are used for such frames. */ diff --git a/libavcodec/ppc/me_cmp.c b/libavcodec/ppc/me_cmp.c index 38a7ba1..26755cc 100644 --- a/libavcodec/ppc/me_cmp.c +++ b/libavcodec/ppc/me_cmp.c @@ -504,7 +504,7 @@ static int hadamard8_diff8x8_altivec(MpegEncContext *s, uint8_t *dst, } /* - * 16x8 works with 16 elements; it allows to avoid replicating loads, and + * 16x8 works with 16 elements; it allows one to avoid replicating loads, and * gives the compiler more room for scheduling. It's only used from * inside hadamard8_diff16_altivec. * diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c index d5147e5..4e2ed53 100644 --- a/libavcodec/vp9.c +++ b/libavcodec/vp9.c @@ -3286,7 +3286,7 @@ static void decode_b(AVCodecContext *ctx, int row, int col, } // emulated overhangs if the stride of the target buffer can't hold. This -// allows to support emu-edge and so on even if we have large block +// makes it possible to support emu-edge and so on even if we have large block // overhangs emu[0] = (col + w4) * 8 f-linesize[0] || (row + h4) s-rows; diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index f11170c..0c2584d 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -80,7 +80,7 @@ movq %%mm#R1, #OFF(%1) \n\t\ add %2, %0 \n\t -/** Sacrifying mm6 allows to pipeline loads from src */ +/** Sacrifying mm6 makes it possible to pipeline loads from src */ static void vc1_put_ver_16b_shift2_mmx(int16_t *dst, const uint8_t *src, x86_reg stride, int rnd, int64_t shift) diff --git a/libavdevice/alsa_dec.c b/libavdevice/alsa_dec.c index 286af65..b8e957a 100644 --- a/libavdevice/alsa_dec.c +++ b/libavdevice/alsa_dec.c @@ -27,7 +27,7 @@ * @author Benoit Fouet ( benoit fouet free fr ) * @author Nicolas
Re: [FFmpeg-devel] [PATCH] tls_gnutls: fix hang on disconnection
On Sat, Jun 13, 2015 at 11:55:21PM +0200, wm4 wrote: GNUTLS_SHUT_RDWR means GnuTLS will keep waiting for the server's termination reply. But since we don't shutdown the TCP connection at this point yet, GnuTLS will just keep skipping actual data from the server, which basically is perceived as hang. Use GNUTLS_SHUT_WR instead, which doesn't have this problem. --- Maybe there's a better fix. --- libavformat/tls_gnutls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmpeg bugs should be sent to our bugtracker. User questions about the command line tools should be sent to the ffmpeg-user ML. And questions about how to use libav* should be sent to the libav-user ML. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Contributing to the project?
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Clément, On 13/06/15 20:17, Clément Bœsch wrote: Ah, if you're interested in testing... http://coverage.ffmpeg.org/ will give you an idea about how much or test suite covers the code base. You can see that it's not bad but there are many part of the code where adding test would be welcome. To learn more about the test suite: https://ffmpeg.org/fate.html Not sure if already mentioned, but it's generally a good practice to just ask quickly on #ffmpeg-devel (IRC/freenode) if it's a good idea to work on X or Y. You can be redirected to the appropriate people or previous work already done in the shadow (and the reason it failed previously etc). It's convenient to get quick exchanges and get to know the community. But maybe you're already there? Thanks for the pointers. I'll pop onto the IRC tomorrow. Best wishes, George -BEGIN PGP SIGNATURE- Version: GnuPG v2 iQEcBAEBCAAGBQJVff/LAAoJEFE4CaxxkRh68BUH/3gLEwDxlkBD2KTe2UT/tR3o veyB6EmG5VxuESSfvD9Izljta2JYzYf+uPYGQg4Nl9JyXDX2vOu/ZJQPdf6kY4d3 pLtl1wk126JZy9/afAusDI6xBYrC8VUxE8yuamUikS/d2h4cSmUz+3GosqLw9KkR Jy5t7D7M043Xrj6oADX1tRVYUkSFuTFxu2iJACZWGzK+KyNlTIps3cnCwpnvPdRr gAj+ddNVOX9wCR2czEao2ROK/3wZgmgCUuEG2VaqTNih6RyVx7oPzhJZa3Agnge8 1wCPHzOn/j8Ol2ZX8ndwpgFVc1IKKgUpkadzXhusf1NTWteBrZXhN+YNBWHcVtg= =R5XN -END PGP SIGNATURE- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] h264: check frame properties for consistency before copying
On Sun, Jun 14, 2015 at 12:40:18PM +0200, Andreas Cadhalpun wrote: Also use the frame pixel format instead of the one from the codec context, which is more robust. the checks cant hurt ... LGTM 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
Re: [FFmpeg-devel] [PATCH] examples/demuxing_decoding: use properties from frame instead of video_dec_ctx
On Sun, Jun 14, 2015 at 08:40:50PM +0200, Andreas Cadhalpun wrote: This is more robust. And only check if there is actually a frame returned. LGTM thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/af_afade: add couple of more curves
Signed-off-by: Paul B Mahol one...@gmail.com --- doc/filters.texi | 12 +++- libavfilter/af_afade.c | 30 +- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 6437c0c..0712494 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -522,7 +522,7 @@ select half of sine wave select exponential sine wave @item log select logarithmic -@item par +@item ipar select inverted parabola @item qua select quadratic @@ -532,6 +532,16 @@ select cubic select square root @item cbr select cubic root +@item par +select parabola +@item exp +select exponential +@item iqsin +select inverted quarter of sine wave +@item ihsin +select inverted half of sine wave +@item des +select double-exponential seat @end table @end table diff --git a/libavfilter/af_afade.c b/libavfilter/af_afade.c index d2c07e5..356eda9 100644 --- a/libavfilter/af_afade.c +++ b/libavfilter/af_afade.c @@ -42,7 +42,7 @@ typedef struct { int64_t start, int range, int curve); } AudioFadeContext; -enum CurveType { TRI, QSIN, ESIN, HSIN, LOG, PAR, QUA, CUB, SQU, CBR }; +enum CurveType { TRI, QSIN, ESIN, HSIN, LOG, IPAR, QUA, CUB, SQU, CBR, PAR, EXP, IQSIN, IHSIN, DES, NB_CURVES }; #define OFFSET(x) offsetof(AudioFadeContext, x) #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM @@ -60,18 +60,23 @@ static const AVOption afade_options[] = { { st, set time to start fading, OFFSET(start_time), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT32_MAX, FLAGS }, { duration, set fade duration, OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT32_MAX, FLAGS }, { d,set fade duration, OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64 = 0. }, 0, INT32_MAX, FLAGS }, -{ curve,set fade curve type, OFFSET(curve),AV_OPT_TYPE_INT,{.i64 = TRI }, TRI, CBR, FLAGS, curve }, -{ c,set fade curve type, OFFSET(curve),AV_OPT_TYPE_INT,{.i64 = TRI }, TRI, CBR, FLAGS, curve }, +{ curve,set fade curve type, OFFSET(curve),AV_OPT_TYPE_INT,{.i64 = TRI }, 0, NB_CURVES - 1, FLAGS, curve }, +{ c,set fade curve type, OFFSET(curve),AV_OPT_TYPE_INT,{.i64 = TRI }, 0, NB_CURVES - 1, FLAGS, curve }, { tri, linear slope,0, AV_OPT_TYPE_CONST, {.i64 = TRI }, 0, 0, FLAGS, curve }, { qsin, quarter of sine wave,0, AV_OPT_TYPE_CONST, {.i64 = QSIN }, 0, 0, FLAGS, curve }, { esin, exponential sine wave, 0, AV_OPT_TYPE_CONST, {.i64 = ESIN }, 0, 0, FLAGS, curve }, { hsin, half of sine wave, 0, AV_OPT_TYPE_CONST, {.i64 = HSIN }, 0, 0, FLAGS, curve }, { log, logarithmic, 0, AV_OPT_TYPE_CONST, {.i64 = LOG }, 0, 0, FLAGS, curve }, -{ par, inverted parabola, 0, AV_OPT_TYPE_CONST, {.i64 = PAR }, 0, 0, FLAGS, curve }, +{ ipar, inverted parabola, 0, AV_OPT_TYPE_CONST, {.i64 = IPAR }, 0, 0, FLAGS, curve }, { qua, quadratic, 0, AV_OPT_TYPE_CONST, {.i64 = QUA }, 0, 0, FLAGS, curve }, { cub, cubic, 0, AV_OPT_TYPE_CONST, {.i64 = CUB }, 0, 0, FLAGS, curve }, { squ, square root, 0, AV_OPT_TYPE_CONST, {.i64 = SQU }, 0, 0, FLAGS, curve }, { cbr, cubic root, 0, AV_OPT_TYPE_CONST, {.i64 = CBR }, 0, 0, FLAGS, curve }, +{ par, parabola,0, AV_OPT_TYPE_CONST, {.i64 = PAR }, 0, 0, FLAGS, curve }, +{ exp, exponential, 0, AV_OPT_TYPE_CONST, {.i64 = EXP }, 0, 0, FLAGS, curve }, +{ iqsin,inverted quarter of sine wave, 0, AV_OPT_TYPE_CONST, {.i64 = IQSIN}, 0, 0, FLAGS, curve }, +{ ihsin,inverted half of sine wave, 0, AV_OPT_TYPE_CONST, {.i64 = IHSIN}, 0, 0, FLAGS, curve }, +{ des, double-exponential seat, 0, AV_OPT_TYPE_CONST, {.i64 = DES}, 0, 0, FLAGS, curve }, { NULL } }; @@ -130,16 +135,28 @@ static double fade_gain(int curve, int64_t index, int range) case