Re: [FFmpeg-devel] [PATCH]configure: Add -Wno-main
On Mon, Sep 18, 2017 at 03:55:12AM +0200, Carl Eugen Hoyos wrote: > 2017-09-18 3:47 GMT+02:00 James Almer: > > On 9/17/2017 10:37 PM, Carl Eugen Hoyos wrote: > >> Hi! > >> > >> Attached patch fixes several warnings when compiling libavfilter with > >> current gcc. > >> > >> Please comment, Carl Eugen > > > > IMO, it would be better if we instead rename all the cases of "main" > > used across the codebase. > > No strong opinion here, I would prefer if the warning were silenced. > I'm with James on this one, it's easy and harmless to fix, so I think we should do that instead. -- Clément B. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] avfilter/interlace: add support for 10 and 12 bit
On 9/14/2017 5:58 PM, Thomas Mundt wrote: > Patch attached > Applied the addition of the two lowpass filtering tests only for now. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] Configure Script change request to support libcdio on macOS
Hello, > 2017/09/17 午後11:58、桃源老師のメール: > > I have tried to use libcdio function with ffmpeg on macOS. Then I get an > information from libcdio team. That is ffmpeg configure script should read > libcdio's pkgconfig file, libcdio.pc. I attach my request as patch file. Please review it. ffmpeg_configure.patch Description: Binary data Best Regards, // Miya aka. TougenRoushi smime.p7s Description: S/MIME cryptographic signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avformat/hlsenc: fix CID 1418106
fix the "Uninitialized scalar variable (UNINIT)" problem. Signed-off-by: Steven Liu--- libavformat/hlsenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index 3a9a235514..d70a2f7ff6 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -1327,13 +1327,13 @@ static int hls_write_header(AVFormatContext *s) { HLSContext *hls = s->priv_data; int ret, i; -char *p; +char *p = NULL; const char *pattern = "%d.ts"; const char *pattern_localtime_fmt = get_default_pattern_localtime_fmt(s); const char *vtt_pattern = "%d.vtt"; AVDictionary *options = NULL; -int basename_size; -int vtt_basename_size; +int basename_size = 0; +int vtt_basename_size = 0; if (hls->segment_type == SEGMENT_TYPE_FMP4) { pattern = "%d.m4s"; -- 2.11.0 (Apple Git-81) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] MAINTAINERS: modify the hlsenc description
change the hlsenc from hls encryption to hlsenc Suggested-by: Aman GuptaSigned-off-by: Steven Liu --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 0b0f7fa1e4..81e1e4916a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -409,7 +409,7 @@ Muxers/Demuxers: gxf.c Reimar Doeffinger gxfenc.c Baptiste Coudurier hls.c Anssi Hannula - hls encryption (hlsenc.c) Christian Suloway, Steven Liu + hlsenc.c Christian Suloway, Steven Liu idcin.c Mike Melanson idroqdec.cMike Melanson iff.c Jaikrishnan Menon -- 2.11.0 (Apple Git-81) ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]configure: Add -Wno-main
2017-09-18 3:47 GMT+02:00 James Almer: > On 9/17/2017 10:37 PM, Carl Eugen Hoyos wrote: >> Hi! >> >> Attached patch fixes several warnings when compiling libavfilter with >> current gcc. >> >> Please comment, Carl Eugen > > IMO, it would be better if we instead rename all the cases of "main" > used across the codebase. No strong opinion here, I would prefer if the warning were silenced. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] x86/exrdsp: optimize ff_reorder_pixels_avx2()
From: Henrik GramnerTested with "checkasm --test=exrdsp -bench" Before: reorder_pixels_c: 5187.8 reorder_pixels_sse2: 377.0 reorder_pixels_avx2: 331.3 After: reorder_pixels_c: 5181.5 reorder_pixels_sse2: 377.0 reorder_pixels_avx2: 313.8 Signed-off-by: James Almer --- libavcodec/x86/exrdsp.asm | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/libavcodec/x86/exrdsp.asm b/libavcodec/x86/exrdsp.asm index b91a7be20d..06c629e59e 100644 --- a/libavcodec/x86/exrdsp.asm +++ b/libavcodec/x86/exrdsp.asm @@ -39,16 +39,15 @@ cglobal reorder_pixels, 3,4,3, dst, src1, size, src2 neg sizeq; size = offset for dst, src1, src2 .loop: -%if cpuflag(avx2) -vpermq m0, [src1q + sizeq], 0xd8; load first part -vpermq m1, [src2q + sizeq], 0xd8; load second part -%else movam0, [src1q+sizeq]; load first part movum1, [src2q+sizeq]; load second part -%endif SBUTTERFLY bw, 0, 1, 2 ; interleaved -mova [dstq+2*sizeq ], m0 ; copy to dst -mova [dstq+2*sizeq+mmsize], m1 +mova [dstq+2*sizeq ], xm0 ; copy to dst +mova [dstq+2*sizeq+16], xm1 +%if cpuflag(avx2) +vperm2i128 m0, m0, m1, q0301 +mova [dstq+2*sizeq+32], m0 +%endif add sizeq, mmsize jl .loop RET -- 2.14.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]configure: Add -Wno-main
On 9/17/2017 10:37 PM, Carl Eugen Hoyos wrote: > Hi! > > Attached patch fixes several warnings when compiling libavfilter with > current gcc. > > Please comment, Carl Eugen IMO, it would be better if we instead rename all the cases of "main" used across the codebase. I'm surprised for that matter that SDL, with its "-Dmain=SDL_main" cflag, didn't make a mess out of this. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]configure: Add -Wno-main
Hi! Attached patch fixes several warnings when compiling libavfilter with current gcc. Please comment, Carl Eugen From 2d2893e8f7406043f970ae347509c39832c97b50 Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Mon, 18 Sep 2017 03:35:37 +0200 Subject: [PATCH] configure: Add -Wno-main. Silences several warnings: main is usually a function --- configure |1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index 2de20a0..952cb16 100755 --- a/configure +++ b/configure @@ -6248,6 +6248,7 @@ check_cflags -Wmissing-prototypes check_cflags -Wno-pointer-to-int-cast check_cflags -Wstrict-prototypes check_cflags -Wempty-body +check_cflags -Wno-main if enabled extra_warnings; then check_cflags -Wcast-qual -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter: add vmafmotion filter
On 9/15/2017 5:47 PM, Ashish Pratap Singh wrote: > From: Ashish Singh> > Hi, this patch addresses the previous issues and changes it to a single > input filter. > > Signed-off-by: Ashish Singh > --- > Changelog | 1 + > doc/filters.texi| 14 ++ > libavfilter/Makefile| 1 + > libavfilter/allfilters.c| 1 + > libavfilter/vf_vmafmotion.c | 325 > > libavfilter/vmaf_motion.h | 58 > 6 files changed, 400 insertions(+) > create mode 100644 libavfilter/vf_vmafmotion.c > create mode 100644 libavfilter/vmaf_motion.h > > diff --git a/Changelog b/Changelog > index ea48e81..574f46e 100644 > --- a/Changelog > +++ b/Changelog > @@ -48,6 +48,7 @@ version : > - convolve video filter > - VP9 tile threading support > - KMS screen grabber > +- vmafmotion video filter > > version 3.3: > - CrystalHD decoder moved to new decode API > diff --git a/doc/filters.texi b/doc/filters.texi > index 830de54..d996357 100644 > --- a/doc/filters.texi > +++ b/doc/filters.texi > @@ -15570,6 +15570,20 @@ vignette='PI/4+random(1)*PI/50':eval=frame > > @end itemize > > +@section vmafmotion > + > +Obtain the average vmaf motion score of a video. > +It is one of the component filters of VMAF. > + > +The obtained average motion score is printed through the logging system. > + > +In the below example the input file @file{ref.mpg} is being processed and > score > +is computed. > + > +@example > +ffmpeg -i ref.mpg -lavfi vmafmotion -f null - > +@end example > + > @section vstack > Stack input videos vertically. > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 8aa974e..4289ee0 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -330,6 +330,7 @@ OBJS-$(CONFIG_VFLIP_FILTER) += vf_vflip.o > OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o > vf_vidstabdetect.o > OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o > vf_vidstabtransform.o > OBJS-$(CONFIG_VIGNETTE_FILTER) += vf_vignette.o > +OBJS-$(CONFIG_VMAFMOTION_FILTER) += vf_vmafmotion.o framesync.o > OBJS-$(CONFIG_VSTACK_FILTER) += vf_stack.o framesync.o > OBJS-$(CONFIG_W3FDIF_FILTER) += vf_w3fdif.o > OBJS-$(CONFIG_WAVEFORM_FILTER) += vf_waveform.o > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c > index 63e8672..8ec54be 100644 > --- a/libavfilter/allfilters.c > +++ b/libavfilter/allfilters.c > @@ -341,6 +341,7 @@ static void register_all(void) > REGISTER_FILTER(VIDSTABDETECT, vidstabdetect, vf); > REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf); > REGISTER_FILTER(VIGNETTE, vignette, vf); > +REGISTER_FILTER(VMAFMOTION, vmafmotion, vf); > REGISTER_FILTER(VSTACK, vstack, vf); > REGISTER_FILTER(W3FDIF, w3fdif, vf); > REGISTER_FILTER(WAVEFORM, waveform, vf); > diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c > new file mode 100644 > index 000..c31c37c > --- /dev/null > +++ b/libavfilter/vf_vmafmotion.c > @@ -0,0 +1,325 @@ > +/* > + * Copyright (c) 2017 Ronald S. Bultje > + * Copyright (c) 2017 Ashish Pratap Singh > + * > + * 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 > + */ > + > +/** > + * @file > + * Calculate VMAF Motion score. > + */ > + > +#include "libavutil/opt.h" > +#include "libavutil/pixdesc.h" > +#include "avfilter.h" > +#include "drawutils.h" > +#include "formats.h" > +#include "internal.h" > +#include "vmaf_motion.h" > + > +#define vmafmotion_options NULL This is unused. > +#define BIT_SHIFT 10 > + > +static const float FILTER_5[5] = { > +0.054488685, > +0.244201342, > +0.402619947, > +0.244201342, > +0.054488685 > +}; > + > +typedef struct VMAFMotionContext { > +const AVClass *class; > +VMAFMotionData data; > +} VMAFMotionContext; > + > +AVFILTER_DEFINE_CLASS(vmafmotion); > + > +static uint64_t image_sad(const uint16_t *img1, const uint16_t *img2, int w, > + int h, ptrdiff_t
[FFmpeg-devel] [PATCH] avcodec/dirac_dwt: Fix integer overflow in COMPOSE_FIDELITYi*()
Fixes: runtime error: signed integer overflow: 161 * 13872281 cannot be represented in type 'int' Fixes: 3295/clusterfuzz-testcase-minimized-4738998142500864 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer--- libavcodec/dirac_dwt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/dirac_dwt.h b/libavcodec/dirac_dwt.h index adf5178714..755d5e5d2d 100644 --- a/libavcodec/dirac_dwt.h +++ b/libavcodec/dirac_dwt.h @@ -111,10 +111,10 @@ void ff_spatial_idwt_slice2(DWTContext *d, int y); (b0 + b1) #define COMPOSE_FIDELITYiL0(b0, b1, b2, b3, b4, b5, b6, b7, b8)\ -(b4 - ((-8*(b0+b8) + 21*(b1+b7) - 46*(b2+b6) + 161*(b3+b5) + 128) >> 8)) +(b4 - ((int)(-8*(b0+(unsigned)b8) + 21*(b1+(unsigned)b7) - 46*(b2+(unsigned)b6) + 161*(b3+(unsigned)b5) + 128) >> 8)) #define COMPOSE_FIDELITYiH0(b0, b1, b2, b3, b4, b5, b6, b7, b8)\ -(b4 + ((-2*(b0+b8) + 10*(b1+b7) - 25*(b2+b6) + 81*(b3+b5) + 128) >> 8)) +(b4 + ((int)(-2*(b0+(unsigned)b8) + 10*(b1+(unsigned)b7) - 25*(b2+(unsigned)b6) + 81*(b3+(unsigned)b5) + 128) >> 8)) #define COMPOSE_DAUB97iL1(b0, b1, b2)\ (b1 - ((int)(1817*(b0 + (unsigned)b2) + 2048) >> 12)) -- 2.14.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/wmv2dec: Check end of bitstream in parse_mb_skip() and ff_wmv2_decode_mb()
Hi On Sun, Sep 17, 2017 at 04:16:13PM -0400, Ronald S. Bultje wrote: > Hi, > > On Sat, Sep 16, 2017 at 8:42 PM, Michael Niedermayer> wrote: > > > +if (get_bits_left(>gb) < 0) { > > +av_log(s->avctx, AV_LOG_ERROR, > > +"Insufficient bits left at %d %d\n", s->mb_x, s->mb_y); > > +return AVERROR_INVALIDDATA; > > +} > > > We've talked about this before, av_log(AV_LOG_ERROR) is not appropriate for > such terse and unhelpful messages that really only apply to fuzz-broken > files... We talked about this before. And we disagree on almost everything certainly the implied assumptions you repeat here. Also i must say i really would prefer to work on the code without these debates. I maintain the code in question here, can people not just let me maintain the code ... IIRC, previously you wanted "All" these error messages removed from the binary. Your statement above now leaves it more wide open how to resolve it But if you still want them removed from the binary, then my reply is still the same Iam happy to follow what the community prefers. I have seen no evidence that theres a majority preferring to remove all error messages for errors that have been found by help of automated fuzzers. Ive seen 3 or 4 people complaining about error messages and ive seen people working on fixing security issues (not just me) disagreeing when they where told to remove messages. I may be wrong but i suspect the "hardline" total removal has few people supporting it. Especially outside FFmpeg and the projects surrounding it. Ive not seen this radical viewpoint elsewhere. Detailed error messages are valuable If OTOH what you suggest now (you did after all not state it clearly in your reply) is litterally just changing away from a terse av_log(AV_LOG_ERROR) message. I certainly can try to improve the error message, make it clearer and more verbose. Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavf/utils: Do not force the chapter end time before chapter start
Hi! Attached patch fixes ticket #6671. Please comment, Carl Eugen From 87d7914d0f60c26ac89fde3cf2a21c6c95c64b0f Mon Sep 17 00:00:00 2001 From: Carl Eugen HoyosDate: Sun, 17 Sep 2017 23:34:58 +0200 Subject: [PATCH] lavf/utils: Do not force chapter end time before chapter start. Fixes ticket #6671. --- libavformat/utils.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 23865c8..7abca63 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -3167,7 +3167,7 @@ static void compute_chapters_end(AVFormatContext *s) if (j != i && next_start > ch->start && next_start < end) end = next_start; } -ch->end = (end == INT64_MAX) ? ch->start : end; +ch->end = (end == INT64_MAX || end < ch->start) ? ch->start : end; } } -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavd: add audio packets adopting example of NewTek NDI
On Mon, Sep 04, 2017 at 17:12:45 +0300, Maksym Veremeyenko wrote: > Subject: [PATCH 2/3] lavd: add audio packets adopting example of NewTek NDI ^ doc/outdevs: > +Some NDI receiver want audio packets with 1920 samples per audio packet and > interleaved closer to video packets: ^ receivers ^ require Assuming they actually require this and don't "prefer" it. Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] libavcodec/exr : add X86 64 SIMD for reorder pixels (SSE and AVX2) (v4)
On 9/17/2017 5:05 PM, Martin Vignali wrote: >> >> fate-exr passes on mingw-w64 as well. >> > > Thanks for testing > > Following your comments, new patch in attach > > Martin Pushed, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/wmv2dec: Check end of bitstream in parse_mb_skip() and ff_wmv2_decode_mb()
Hi, On Sat, Sep 16, 2017 at 8:42 PM, Michael Niedermayerwrote: > +if (get_bits_left(>gb) < 0) { > +av_log(s->avctx, AV_LOG_ERROR, > +"Insufficient bits left at %d %d\n", s->mb_x, s->mb_y); > +return AVERROR_INVALIDDATA; > +} We've talked about this before, av_log(AV_LOG_ERROR) is not appropriate for such terse and unhelpful messages that really only apply to fuzz-broken files... Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] libavcodec/exr : add X86 64 SIMD for reorder pixels (SSE and AVX2) (v4)
> > fate-exr passes on mingw-w64 as well. > Thanks for testing Following your comments, new patch in attach Martin 0001-libavcodec-exr-add-X86-64-SIMD-for-reorder_pixels.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] libavcodec/exr : add X86 64 SIMD for reorder pixels (SSE and AVX2) (v4)
On 9/17/2017 3:22 PM, Martin Vignali wrote: > From 338f96a7f3c0f97cfafc0deda2322695a4006b5a Mon Sep 17 00:00:00 2001 > From: Martin Vignali> Date: Sun, 17 Sep 2017 20:05:16 +0200 > Subject: [PATCH] libavcodec/exr : add X86 64 SIMD for reorder_pixels > > --- > libavcodec/Makefile | 2 +- > libavcodec/exr.c | 44 ++-- > libavcodec/exrdsp.c | 45 + > libavcodec/exrdsp.h | 32 > libavcodec/x86/Makefile | 2 ++ > libavcodec/x86/exrdsp.asm| 69 > > libavcodec/x86/exrdsp_init.c | 43 +++ > 7 files changed, 213 insertions(+), 24 deletions(-) > create mode 100644 libavcodec/exrdsp.c > create mode 100644 libavcodec/exrdsp.h > create mode 100644 libavcodec/x86/exrdsp.asm > create mode 100644 libavcodec/x86/exrdsp_init.c > > diff --git a/libavcodec/Makefile b/libavcodec/Makefile > index 943e5db511..fad56129a3 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -286,7 +286,7 @@ OBJS-$(CONFIG_EIGHTSVX_FIB_DECODER)+= 8svx.o > OBJS-$(CONFIG_ESCAPE124_DECODER) += escape124.o > OBJS-$(CONFIG_ESCAPE130_DECODER) += escape130.o > OBJS-$(CONFIG_EVRC_DECODER)+= evrcdec.o acelp_vectors.o lsp.o > -OBJS-$(CONFIG_EXR_DECODER) += exr.o > +OBJS-$(CONFIG_EXR_DECODER) += exr.o exrdsp.o > OBJS-$(CONFIG_FFV1_DECODER)+= ffv1dec.o ffv1.o > OBJS-$(CONFIG_FFV1_ENCODER)+= ffv1enc.o ffv1.o > OBJS-$(CONFIG_FFWAVESYNTH_DECODER) += ffwavesynth.o > diff --git a/libavcodec/exr.c b/libavcodec/exr.c > index 759880756d..478c127ebe 100644 > --- a/libavcodec/exr.c > +++ b/libavcodec/exr.c > @@ -40,6 +40,7 @@ > #include "libavutil/avassert.h" > #include "libavutil/common.h" > #include "libavutil/imgutils.h" > +#include "libavutil/timer.h" Not needed. > #include "libavutil/intfloat.h" > #include "libavutil/opt.h" > #include "libavutil/color_utils.h" > @@ -55,6 +56,7 @@ > #include "internal.h" > #include "mathops.h" > #include "thread.h" > +#include "exrdsp.h" Add this one above of get_bits.h, to keep the alphabetical order. > > enum ExrCompr { > EXR_RAW, > @@ -121,6 +123,7 @@ typedef struct EXRContext { > AVClass *class; > AVFrame *picture; > AVCodecContext *avctx; > +ExrDSPContext dsp; > > #if HAVE_BIGENDIAN > BswapDSPContext bbdsp; > @@ -275,23 +278,7 @@ static void predictor(uint8_t *src, int size) > } > } > > -static void reorder_pixels(uint8_t *src, uint8_t *dst, int size) > -{ > -const uint8_t *t1 = src; > -int half_size = size / 2; > -const uint8_t *t2 = src + half_size; > -uint8_t *s= dst; > -int i; > - > -av_assert1(size % 2 == 0); > - > -for (i = 0; i < half_size; i++) { > -*(s++) = *(t1++); > -*(s++) = *(t2++); > -} > -} > - > -static int zip_uncompress(const uint8_t *src, int compressed_size, > +static int zip_uncompress(EXRContext *s, const uint8_t *src, int > compressed_size, >int uncompressed_size, EXRThreadData *td) > { > unsigned long dest_len = uncompressed_size; > @@ -300,13 +287,18 @@ static int zip_uncompress(const uint8_t *src, int > compressed_size, > dest_len != uncompressed_size) > return AVERROR_INVALIDDATA; > > +av_assert1(uncompressed_size % 2 == 0); > + > predictor(td->tmp, uncompressed_size); > -reorder_pixels(td->tmp, td->uncompressed_data, uncompressed_size); > + > +//START_TIMER; Don't add dead benchmarking/debug code. > +s->dsp.reorder_pixels(td->tmp, td->uncompressed_data, uncompressed_size); > +//STOP_TIMER("reorder_pixels_zip"); > > return 0; > } > > -static int rle_uncompress(const uint8_t *src, int compressed_size, > +static int rle_uncompress(EXRContext *ctx, const uint8_t *src, int > compressed_size, >int uncompressed_size, EXRThreadData *td) > { > uint8_t *d = td->tmp; > @@ -345,8 +337,10 @@ static int rle_uncompress(const uint8_t *src, int > compressed_size, > if (dend != d) > return AVERROR_INVALIDDATA; > > +av_assert1(uncompressed_size % 2 == 0); > + > predictor(td->tmp, uncompressed_size); > -reorder_pixels(td->tmp, td->uncompressed_data, uncompressed_size); > +ctx->dsp.reorder_pixels(td->tmp, td->uncompressed_data, > uncompressed_size); > > return 0; > } > @@ -954,6 +948,7 @@ static void unpack_14(const uint8_t b[14], uint16_t s[16]) > } > } > > + Stray new line. > static void unpack_3(const uint8_t b[3], uint16_t s[16]) > { > int i; > @@ -1000,6 +995,7 @@ static int b44_uncompress(EXRContext *s, const uint8_t > *src, int compressed_size > > if (src[compressed_size - stay_to_uncompress + 2] == > 0xfc) { /* B44A block */ >
[FFmpeg-devel] libavcodec/exr : add X86 64 SIMD for reorder pixels (SSE and AVX2) (v4)
Hello, Following Henrik Grammer comments new patch in attach replace int size by ptrdiff_t size I simplify the code, keeping only 1 loop (more easy to read, and doesn't have a real impact on speed) i use the SBUTTERFLY Macro for sse for avx2 i keep my previous approach Pass fate-exr tests for me (os X) Current benchmark AVX2 239920 decicycles in reorder_pixels_zip, 130958 runs,114 skips bench: utime=101.367s SSE 283768 decicycles in reorder_pixels_zip, 130948 runs,124 skips bench: utime=101.424s Scalar 3119101 decicycles in reorder_pixels_zip, 130429 runs,643 skips bench: utime=114.414s The result of the suggested asm by Henrik AVX2 : 258602 decicycles in reorder_pixels_zip, 130853 runs,219 skips SSE : 285167 decicycles in reorder_pixels_zip, 130863 runs,209 skips In term of speed using -benchmark, the difference with the current patch is hard to see. Martin 0001-libavcodec-exr-add-X86-64-SIMD-for-reorder_pixels.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/libopenmpt: Query duration and metadata after selecting subsong
On 17-9-2017 15:35, Jörn Heusippwrote: > Duration depends on the selected subsong and thus must be queried after > selecting the subsong. There is no compelling reason to query other > metadata earlier either. > > Signed-off-by: Jörn Heusipp > --- > libavformat/libopenmpt.c | 17 + > 1 file changed, 9 insertions(+), 8 deletions(-) > > diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c > index a7e3859..af6eb1a 100644 > --- a/libavformat/libopenmpt.c > +++ b/libavformat/libopenmpt.c > @@ -93,14 +93,7 @@ static int read_header_openmpt(AVFormatContext *s) > if (!openmpt->module) > return AVERROR_INVALIDDATA; > > -openmpt->channels = av_get_channel_layout_nb_channels(openmpt->layout); > -openmpt->duration = > openmpt_module_get_duration_seconds(openmpt->module); > - > -add_meta(s, "artist", openmpt_module_get_metadata(openmpt->module, > "artist")); > -add_meta(s, "title", openmpt_module_get_metadata(openmpt->module, > "title")); > -add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, > "tracker")); > -add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, > "message")); > -add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, > "date")); > +openmpt->channels = av_get_channel_layout_nb_channels(openmpt->layout); > > if (openmpt->subsong >= > openmpt_module_get_num_subsongs(openmpt->module)) { > openmpt_module_destroy(openmpt->module); > @@ -120,6 +113,14 @@ static int read_header_openmpt(AVFormatContext *s) > } > } > > +openmpt->duration = openmpt_module_get_duration_seconds(openmpt->module); > + > +add_meta(s, "artist", openmpt_module_get_metadata(openmpt->module, > "artist")); > +add_meta(s, "title", openmpt_module_get_metadata(openmpt->module, > "title")); > +add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, > "tracker")); > +add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, > "message")); > +add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, > "date")); > + > st = avformat_new_stream(s, NULL); > if (!st) { > openmpt_module_destroy(openmpt->module); I've tested your patch and I can confirm FFmpeg now correctly shows the subsong duration. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Configure Script change request to support libcdio on macOS
Hello, In fact, I'm not a kind of ffmpeg developer at all. While trying to link libcdio library with ffmpeg, I just happened to find out the way... So I'm not sure I can answer any question about this configure script change... I have tried to use libcdio function with ffmpeg on macOS. Then I get an information from libcdio team. That is ffmpeg configure script should read libcdio's pkgconfig file, libcdio.pc. So I tried and error, then found that the below change should be done to link libcdio library with ffmpeg on macOS. $ diff -u a/configure b/configure --- a/configure 2017-09-16 15:02:06.0 +0900 +++ b/configure 2017-09-17 04:53:34.0 +0900 @@ -6151,7 +6151,7 @@ if enabled libcdio; then check_lib libcdio "cdio/cdda.h cdio/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || -check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || +require_pkg_config libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio && check_lib libcdio "cdio/paranoia/cdda.h cdio/paranoia/paranoia.h" cdio_cddap_open -lcdio_paranoia -lcdio_cdda -lcdio || die "ERROR: No usable libcdio/cdparanoia found" fi Please review it and make it acceptable for everyone... Best Regards, // Miya aka. TougenRoushi smime.p7s Description: S/MIME cryptographic signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/libopenmpt: Query duration and metadata after selecting subsong
Duration depends on the selected subsong and thus must be queried after selecting the subsong. There is no compelling reason to query other metadata earlier either. Signed-off-by: Jörn Heusipp--- libavformat/libopenmpt.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavformat/libopenmpt.c b/libavformat/libopenmpt.c index a7e3859..af6eb1a 100644 --- a/libavformat/libopenmpt.c +++ b/libavformat/libopenmpt.c @@ -93,14 +93,7 @@ static int read_header_openmpt(AVFormatContext *s) if (!openmpt->module) return AVERROR_INVALIDDATA; -openmpt->channels = av_get_channel_layout_nb_channels(openmpt->layout); -openmpt->duration = openmpt_module_get_duration_seconds(openmpt->module); - -add_meta(s, "artist", openmpt_module_get_metadata(openmpt->module, "artist")); -add_meta(s, "title", openmpt_module_get_metadata(openmpt->module, "title")); -add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, "tracker")); -add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, "message")); -add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, "date")); +openmpt->channels = av_get_channel_layout_nb_channels(openmpt->layout); if (openmpt->subsong >= openmpt_module_get_num_subsongs(openmpt->module)) { openmpt_module_destroy(openmpt->module); @@ -120,6 +113,14 @@ static int read_header_openmpt(AVFormatContext *s) } } +openmpt->duration = openmpt_module_get_duration_seconds(openmpt->module); + +add_meta(s, "artist", openmpt_module_get_metadata(openmpt->module, "artist")); +add_meta(s, "title", openmpt_module_get_metadata(openmpt->module, "title")); +add_meta(s, "encoder", openmpt_module_get_metadata(openmpt->module, "tracker")); +add_meta(s, "comment", openmpt_module_get_metadata(openmpt->module, "message")); +add_meta(s, "date",openmpt_module_get_metadata(openmpt->module, "date")); + st = avformat_new_stream(s, NULL); if (!st) { openmpt_module_destroy(openmpt->module); -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel