[FFmpeg-devel] [PATCH 1/2] libavutil/thread.h: Support OS/2 threads
Support OS/2 threading and correct an include that shouldn't be system. Dave From 7fb4b12dad0df2ff60fcfa796c34ddbbcd3aa470 Mon Sep 17 00:00:00 2001 From: Dave Yeo Date: Fri, 28 Nov 2014 23:34:20 -0800 Subject: [PATCH 1/2] libavutil/thread.h: Support OS/2 threads --- libavutil/thread.h |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/libavutil/thread.h b/libavutil/thread.h index 62e1340..a004fba 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -24,10 +24,12 @@ #include "config.h" -#if HAVE_PTHREADS || HAVE_W32THREADS +#if HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS2THREADS #if HAVE_PTHREADS #include +#elif HAVE_OS2THREADS +#include "compat/os2threads.h" #else #include #endif -- 1.7.2.3 From 8901a6d771df67701437f81d8b373e5ab2df42b4 Mon Sep 17 00:00:00 2001 From: Dave Yeo Date: Fri, 28 Nov 2014 23:36:06 -0800 Subject: [PATCH 2/2] libavutil/threads.h: correct an include to be local --- libavutil/thread.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/libavutil/thread.h b/libavutil/thread.h index a004fba..9733661 100644 --- a/libavutil/thread.h +++ b/libavutil/thread.h @@ -31,7 +31,7 @@ #elif HAVE_OS2THREADS #include "compat/os2threads.h" #else -#include +#include "compat/w32pthreads.h" #endif #define AVMutex pthread_mutex_t -- 1.7.2.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] bprint.h can't be included in C++ code
On Mon, Nov 24, 2014 at 11:20:25AM -0500, Vadim Kalinsky wrote: > > > Nit: space after commas. > > > Is it necessary to typedef the structure on top of declaring it? In C, > > this: {...} is legal, no need to typedef it. > > > > Apart from that, I think the helper structure should be scoped in the > > ff_namespace > > > Nit: no empty line between doxy and declaration. > > > Patch attached. > > bprint.h | 15 +-- > 1 file changed, 9 insertions(+), 6 deletions(-) > 67c639aed01a92890730c7b2cfd85d87baaf4fb4 0001-Squashed-commits.patch > From 36e9b54ca13038d739618d6321006e09a5b83415 Mon Sep 17 00:00:00 2001 > From: Vadim Kalinsky > Date: Mon, 24 Nov 2014 10:38:05 -0500 > Subject: [PATCH] Squashed commits 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 2/2][RFC] lavfi/vf_hqx: Remove function generator macro and function pointer indirection
It is easier to read and shorter this way. Signed-off-by: Alexander Strasser --- libavfilter/vf_hqx.c | 35 +++ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c index 4783381..d3e65e9 100644 --- a/libavfilter/vf_hqx.c +++ b/libavfilter/vf_hqx.c @@ -32,12 +32,9 @@ #include "libavutil/pixdesc.h" #include "internal.h" -typedef int (*hqxfunc_t)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); - typedef struct { const AVClass *class; int n; -hqxfunc_t func; uint32_t rgbtoyuv[1<<24]; } HQXContext; @@ -378,8 +375,10 @@ static av_always_inline void hq4x_interp_2x2(uint32_t *dst, int dst_linesize, *dst11 = w4; } -static av_always_inline void hqx_filter(const ThreadData *td, int jobnr, int nb_jobs, int n) +static av_always_inline int hqx_filter(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { +HQXContext *hqx = ctx->priv; +const ThreadData *td = arg; int x, y; AVFrame *in = td->in, *out = td->out; const uint32_t *r2y = td->rgbtoyuv; @@ -389,7 +388,7 @@ static av_always_inline void hqx_filter(const ThreadData *td, int jobnr, int nb_ const int slice_end = (height * (jobnr+1)) / nb_jobs; const int dst_linesize = out->linesize[0]; const int src_linesize = in->linesize[0]; -uint8_t *dst = out->data[0] + slice_start * dst_linesize * n; +uint8_t *dst = out->data[0] + slice_start * dst_linesize * hqx->n; const uint8_t *src = in->data[0] + slice_start * src_linesize; const int dst32_linesize = dst_linesize >> 2; @@ -419,18 +418,18 @@ static av_always_inline void hqx_filter(const ThreadData *td, int jobnr, int nb_ | (w[4] != w[7] ? (yuv_diff(yuv1, rgb2yuv(r2y, w[7]))) : 0) << 6 | (w[4] != w[8] ? (yuv_diff(yuv1, rgb2yuv(r2y, w[8]))) : 0) << 7; -if (n == 2) { +if (hqx->n == 2) { dst32[dst32_linesize*0 + 0] = hq2x_interp_1x1(r2y, pattern, w, 0,1,2,3,4,5,6,7,8); // 00 dst32[dst32_linesize*0 + 1] = hq2x_interp_1x1(r2y, pattern, w, 2,1,0,5,4,3,8,7,6); // 01 (vert mirrored) dst32[dst32_linesize*1 + 0] = hq2x_interp_1x1(r2y, pattern, w, 6,7,8,3,4,5,0,1,2); // 10 (horiz mirrored) dst32[dst32_linesize*1 + 1] = hq2x_interp_1x1(r2y, pattern, w, 8,7,6,5,4,3,2,1,0); // 11 (center mirrored) -} else if (n == 3) { +} else if (hqx->n == 3) { hq3x_interp_2x1(dst32,dst32_linesize, r2y, pattern, w, 0,1, 0,1,2,3,4,5,6,7,8, 0); // 00 01 hq3x_interp_2x1(dst32 + 1,dst32_linesize, r2y, pattern, w, 1,3, 2,5,8,1,4,7,0,3,6, 1); // 02 12 (rotated to the right) hq3x_interp_2x1(dst32 + 1*dst32_linesize, dst32_linesize, r2y, pattern, w, 2,0, 6,3,0,7,4,1,8,5,2, 1); // 20 10 (rotated to the left) hq3x_interp_2x1(dst32 + 1*dst32_linesize + 1, dst32_linesize, r2y, pattern, w, 3,2, 8,7,6,5,4,3,2,1,0, 0); // 22 21 (center mirrored) dst32[dst32_linesize + 1] = w[4]; // 11 -} else if (n == 4) { +} else if (hqx->n == 4) { hq4x_interp_2x2(dst32,dst32_linesize, r2y, pattern, w, 0,1,2,3, 0,1,2,3,4,5,6,7,8); // 00 01 10 11 hq4x_interp_2x2(dst32 + 2,dst32_linesize, r2y, pattern, w, 1,0,3,2, 2,1,0,5,4,3,8,7,6); // 02 03 12 13 (vert mirrored) hq4x_interp_2x2(dst32 + 2*dst32_linesize, dst32_linesize, r2y, pattern, w, 2,3,0,1, 6,7,8,3,4,5,0,1,2); // 20 21 30 31 (horiz mirrored) @@ -440,25 +439,15 @@ static av_always_inline void hqx_filter(const ThreadData *td, int jobnr, int nb_ } src32 += 1; -dst32 += n; +dst32 += hqx->n; } src += src_linesize; -dst += dst_linesize * n; +dst += dst_linesize * hqx->n; } +return 0; } -#define HQX_FUNC(size) \ -static int hq##size##x(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \ -{ \ -hqx_filter(arg, jobnr, nb_jobs, size); \ -return 0; \ -} - -HQX_FUNC(2) -HQX_FUNC(3) -HQX_FUNC(4) - static int query_formats(AVFilterContext *ctx) { static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE}; @@ -498,7 +487,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) td.in = in; td.out = out; td.rgbtoyuv = hqx->rgbtoyuv; -ctx->internal->execute(ctx, hqx->func, &td, NULL, FFMIN(inlink->h, ctx->graph->nb_threads)); +ctx->internal->execute(ctx, hqx_filter, &td, NULL, FFMIN(inlink->h, ctx->graph->nb_threads)); av_frame_free(&in); return ff_filter_frame(outlink, out); @@ -507,7 +496,6 @@ static int filter_frame(A
[FFmpeg-devel] [PATCH 1/2][RFC] lavfi/vf_xbr: Remove function generator macro and function pointer indirection
It is easier to read and shorter this way. Signed-off-by: Alexander Strasser --- libavfilter/vf_xbr.c | 33 ++--- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c index 47e4b76..a67aa13 100644 --- a/libavfilter/vf_xbr.c +++ b/libavfilter/vf_xbr.c @@ -38,12 +38,9 @@ #define RED_BLUE_MASK 0x00FF00FF #define GREEN_MASK0xFF00 -typedef int (*xbrfunc_t)(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs); - typedef struct { const AVClass *class; int n; -xbrfunc_t func; uint32_t rgbtoyuv[1<<24]; } XBRContext; @@ -216,8 +213,10 @@ static uint32_t pixel_diff(uint32_t x, uint32_t y, const uint32_t *r2y) } \ } while (0) -static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_jobs, int n) +static int xbr_filter(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) { +XBRContext *xbr = ctx->priv; +const ThreadData *td = arg; int x, y; const AVFrame *input = td->in; AVFrame *output = td->out; @@ -230,7 +229,7 @@ static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_ for (y = slice_start; y < slice_end; y++) { -uint32_t *E = (uint32_t *)(output->data[0] + y * output->linesize[0] * n); +uint32_t *E = (uint32_t *)(output->data[0] + y * output->linesize[0] * xbr->n); const uint32_t *sa2 = (uint32_t *)(input->data[0] + y * input->linesize[0] - 8); /* center */ const uint32_t *sa1 = sa2 - (input->linesize[0]>>2); /* up x1 */ const uint32_t *sa0 = sa1 - (input->linesize[0]>>2); /* up x2 */ @@ -282,7 +281,7 @@ static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_ const uint32_t F4 = sa2[pnext2]; const uint32_t I4 = sa3[pnext2]; -if (n == 2) { +if (xbr->n == 2) { E[0] = E[1] = // 0, 1 E[nl] = E[nl + 1] = PE; // 2, 3 @@ -290,7 +289,7 @@ static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_ FILT2(PE, PC, PF, PB, PI, PA, PH, PD, PG, I4, A1, I5, H5, A0, D0, B1, C1, F4, C4, G5, G0, nl, 0, nl+1, 1); FILT2(PE, PA, PB, PD, PC, PG, PF, PH, PI, C1, G0, C4, F4, G5, H5, D0, A0, B1, A1, I4, I5, nl+1, nl, 1, 0); FILT2(PE, PG, PD, PH, PA, PI, PB, PF, PC, A0, I5, A1, B1, I4, F4, H5, G5, D0, G0, C1, C4, 1, nl+1, 0, nl); -} else if (n == 3) { +} else if (xbr->n == 3) { E[0] = E[1] = E[2] = // 0, 1, 2 E[nl] = E[nl+1] = E[nl+2] = // 3, 4, 5 E[nl1] = E[nl1+1] = E[nl1+2] = PE; // 6, 7, 8 @@ -299,7 +298,7 @@ static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_ FILT3(PE, PC, PF, PB, PI, PA, PH, PD, PG, I4, A1, I5, H5, A0, D0, B1, C1, F4, C4, G5, G0, nl1, nl, 0, nl1+1, nl+1, 1, nl1+2, nl+2, 2); FILT3(PE, PA, PB, PD, PC, PG, PF, PH, PI, C1, G0, C4, F4, G5, H5, D0, A0, B1, A1, I4, I5, nl1+2, nl1+1, nl1, nl+2, nl+1, nl, 2, 1, 0); FILT3(PE, PG, PD, PH, PA, PI, PB, PF, PC, A0, I5, A1, B1, I4, F4, H5, G5, D0, G0, C1, C4, 2, nl+2, nl1+2, 1, nl+1, nl1+1, 0, nl, nl1); -} else if (n == 4) { +} else if (xbr->n == 4) { E[0] = E[1] = E[2] = E[3] = // 0, 1, 2, 3 E[nl] = E[nl+1] = E[nl+2] = E[nl+3] = // 4, 5, 6, 7 E[nl1] = E[nl1+1] = E[nl1+2] = E[nl1+3] = // 8, 9, 10, 11 @@ -317,22 +316,12 @@ static av_always_inline void xbr_filter(const ThreadData *td, int jobnr, int nb_ sa3 += 1; sa4 += 1; -E += n; +E += xbr->n; } } +return 0; } -#define XBR_FUNC(size) \ -static int xbr##size##x(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs) \ -{ \ -xbr_filter(arg, jobnr, nb_jobs, size); \ -return 0; \ -} - -XBR_FUNC(2) -XBR_FUNC(3) -XBR_FUNC(4) - static int config_output(AVFilterLink *outlink) { @@ -373,7 +362,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) td.in = in; td.out = out; td.rgbtoyuv = xbr->rgbtoyuv; -ctx->internal->execute(ctx, xbr->func, &td, NULL, FFMIN(inlink->h, ctx->graph->nb_threads)); +ctx->internal->execute(ctx, xbr_filter, &td, NULL, FFMIN(inlink->h, ctx->graph->nb_threads)); out->width = outlink->w; out->height = outlink->h; @@ -385,7 +374,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) static int init(AVFilterContext *ctx) { XBRContext *xbr = ctx->priv; -static const xbrfunc_t xbrfuncs[] = {xbr2x, xbr3x, xbr4x}; uint32_t c; int bg, rg, g; @@ -405,7 +393,6 @@ static int init(AVFilterContext *ctx) } } -
[FFmpeg-devel] [PATCH 0/2][RFC] xbr, hqx: minor simplification
Hi, while reading the recent evolution of xbr I came up with the idea for below 2 patches. Maybe I am missing something, but AFAICT both filters use a single shared filter function for n in [2, 4] using n as a param but n is stored in the filter context too. The corresponding fate tests and visual inspection show no differences. It sure is a matter of taste, so I guess it is your call Clément. Alexander Strasser (2): lavfi/vf_xbr: Remove function generator macro and function pointer indirection lavfi/vf_hqx: Remove function generator macro and function pointer indirection libavfilter/vf_hqx.c | 35 +++ libavfilter/vf_xbr.c | 33 ++--- 2 files changed, 21 insertions(+), 47 deletions(-) pgpxGBB_8dkyo.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add NVENC encoder
On Sat, 29 Nov 2014 00:51:21 +0100 Michael Niedermayer wrote: > > > > For what it's worth, some engineers at Nvidia are also working on an > > nvenc implementation for ffmpeg. That initial work is here: > > > > https://github.com/agathah/ffmpeg_libnvenc > > whats the difference in features between the 2 implementations ? > I've spent a lot more time looking at the nvidia patch, but from a quick look through Timo's version, I'd say the following: * Timo's is more concise but not as feature complete. * nvidia one has windows support * The nvidia patch doesn't handle b-frames correctly, but I wrote a fix patch for them. I'm not sure whether Timo's works correctly * Timo's looks like it will handle interlaced input correctly. Nvidia definitely does not. * nvidia one implements argument compatibility with x264 - so it uses the same args as much as possible - it even does preset/tune mapping. I think this is pretty nice. The main issue with the nvidia patch, as it exists today, is that they have not put any licence header on the files at all - but I've told them they need to do that, and asked Stephen Warren if he can help them out. The other slight complexity is that it requires cuda.h (Timo seems to have avoided that by independently defining the necessary constants but you need even more of cuda.h for the windows support). But nvEncoderAPI.h is already so awkward (restrictive license, not properly distributed) that an extra header isn't any more inconvenient. --phil ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu/opt: add escaping to av_opt_serialize
On 28.11.2014 18:51, Stefano Sabatini wrote: On date Thursday 2014-11-27 19:53:12 +0100, Lukasz Marek encoded: [...] From e84ba5a67d74f58b59f5fa30bdb60df856c4c29e Mon Sep 17 00:00:00 2001 From: Lukasz Marek Date: Tue, 25 Nov 2014 20:25:10 +0100 Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize Signed-off-by: Lukasz Marek --- libavutil/opt.c| 14 +- libavutil/opt.h| 3 +++ tests/ref/fate/opt | 7 +-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 5b26a00..2f8ea0c 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1846,6 +1846,13 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, uint8_t *buf; AVBPrint bprint; int ret, cnt = 0; +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; + +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == key_val_sep || +pairs_sep == '\\' || key_val_sep == '\\') { +av_log(obj, AV_LOG_ERROR, "Invalid separator(s)."); Nit++: Invalid separator(s) found Added. LGTM otherwise (no need to send another patch of course), thanks. Thx and pushed. BTW, sorry I didn't add it in introduce patch, but for not sane reason I assumed unescaping is not supported in av_opt_set_from_string and friends. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add NVENC encoder
On Fri, Nov 28, 2014 at 10:30:24AM -0800, Philip Langdale wrote: > On Wed, 26 Nov 2014 11:21:26 +0100 > Timo Rothenpieler wrote: > > > This patch adds support for encoding with Nvidia NVENC on Windows and > > Linux. > > > > I'm not sure if this needs to be flagged as nonfree. As far as I'm > > aware, it should not affect how the resulting binaries can be > > redistributed. > > > > The only dependency this has is the nvEncodeAPI.h from the NVENC SDK, > > which can be downloaded from Nvidia: > > > > https://developer.nvidia.com/nvidia-video-codec-sdk > > > > The header is somewhat hidden in the Samples directory. > > > > I attached the current version of the patch. > > It can also be found on my github fork: > > > > https://github.com/BtbN/FFmpeg/tree/nvenc > > For what it's worth, some engineers at Nvidia are also working on an > nvenc implementation for ffmpeg. That initial work is here: > > https://github.com/agathah/ffmpeg_libnvenc whats the difference in features between the 2 implementations ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/vf_idet: Fixing idet for single-frame inputs.
On Fri, Nov 28, 2014 at 01:41:02PM -0800, Neil Birkbeck wrote: > Handle single frame inputs similar to yadif (e.g., > https://github.com/FFmpeg/FFmpeg/commit/0f9f24c9cfd291c7ece4d3bad64fdf06d107168a > and > https://github.com/FFmpeg/FFmpeg/commit/681e008d06d2241d50abe6316c908a184ddc5942) > > Example: > ffmpeg -r 1 -t 1 -i fate-suite/ffmpeg-synthetic/vsynth1/%02d.pgm -vf > idet,showinfo -f null -y /dev/null > > Previously: > Output file is empty, nothing was encoded (check -ss / -t / -frames > parameters if used) > [Parsed_idet_0 @ 0x36389d0] Repeated Fields: Neither: 0 Top: 0 > Bottom: 0 > > After patch: > [Parsed_showinfo_1 @ 0x1909810] n:0 pts:0 pts_time:0 pos:-1 fmt:gray > sar:0/1 s:352x432 ... > [Parsed_idet_0 @ 0x18f9bb0] Repeated Fields: Neither: 1 Top: 0 > Bottom: 0 > > Fate looks good. > > Signed-off-by: Neil Birkbeck applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No snowflake in an avalanche ever feels responsible. -- 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/vf_idet: Fixing idet for single-frame inputs.
Handle single frame inputs similar to yadif (e.g., https://github.com/FFmpeg/FFmpeg/commit/0f9f24c9cfd291c7ece4d3bad64fdf06d107168a and https://github.com/FFmpeg/FFmpeg/commit/681e008d06d2241d50abe6316c908a184ddc5942) Example: ffmpeg -r 1 -t 1 -i fate-suite/ffmpeg-synthetic/vsynth1/%02d.pgm -vf idet,showinfo -f null -y /dev/null Previously: Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used) [Parsed_idet_0 @ 0x36389d0] Repeated Fields: Neither: 0 Top: 0 Bottom: 0 After patch: [Parsed_showinfo_1 @ 0x1909810] n:0 pts:0 pts_time:0 pos:-1 fmt:gray sar:0/1 s:352x432 ... [Parsed_idet_0 @ 0x18f9bb0] Repeated Fields: Neither: 1 Top: 0 Bottom: 0 Fate looks good. Signed-off-by: Neil Birkbeck --- libavfilter/vf_idet.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index ed21eea..9a25042 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -241,11 +241,12 @@ static int filter_frame(AVFilterLink *link, AVFrame *picref) idet->cur = idet->next; idet->next = picref; -if (!idet->cur) -return 0; +if (!idet->cur && +!(idet->cur = av_frame_clone(idet->next))) +return AVERROR(ENOMEM); if (!idet->prev) -idet->prev = av_frame_clone(idet->cur); +return 0; if (!idet->csp) idet->csp = av_pix_fmt_desc_get(link->format); @@ -284,7 +285,7 @@ static int request_frame(AVFilterLink *link) } else if (ret < 0) { return ret; } -} while (!idet->cur); +} while (!idet->prev); return 0; } -- 2.2.0.rc0.207.ga3a616c ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg-2.4.3 fails to build with pulseaudio support
Michael Niedermayer gmx.at> writes: > applied to master and locally to release/2.4 The issue is also reproducible with origin/release/2.3 Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg-2.4.3 fails to build with pulseaudio support
On Fri, Nov 28, 2014 at 04:39:55PM +0100, do...@speciesm.net wrote: > Hi, > im on gentoo and failed to build ffmpeg-2.4.3 with pulseaudio support. > He complained like this: > > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_update' > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_destroy' > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_new' > > The problem existed before and i found this > http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2014-September/015207.html > > The Makefile misses an object file when building with pulseaudio > support. A patch fixing this is attached. > > Master branch, 2.4 branch and 2.4.3 tag are missing the object file. applied to master and locally to release/2.4 thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg-2.4.3 fails to build with pulseaudio support
speciesm.net> writes: > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_update' > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_destroy' > libavdevice/libavdevice.so: undefined reference to `ff_timefilter_new' Reproducible with "--disable-everything --enable-libpulse --enable-indev=pulse" Somebody please give a friendly kick to the freebsd-multimedia people. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] ffmpeg-2.4.3 fails to build with pulseaudio support
Hi, im on gentoo and failed to build ffmpeg-2.4.3 with pulseaudio support. He complained like this: libavdevice/libavdevice.so: undefined reference to `ff_timefilter_update' libavdevice/libavdevice.so: undefined reference to `ff_timefilter_destroy' libavdevice/libavdevice.so: undefined reference to `ff_timefilter_new' The problem existed before and i found this http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2014-September/015207.html The Makefile misses an object file when building with pulseaudio support. A patch fixing this is attached. Master branch, 2.4 branch and 2.4.3 tag are missing the object file. Regards Michael Stypa >From 28f28a6a60cbd6edb30f7277ae6adb793f3be8b3 Mon Sep 17 00:00:00 2001 From: Michael Stypa Date: Fri, 28 Nov 2014 15:54:50 +0100 Subject: [PATCH] fix Makefile objects for pulseaudio support --- libavdevice/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/Makefile b/libavdevice/Makefile index db301e7..d700d9a 100644 --- a/libavdevice/Makefile +++ b/libavdevice/Makefile @@ -34,7 +34,7 @@ OBJS-$(CONFIG_OPENGL_OUTDEV) += opengl_enc.o OBJS-$(CONFIG_OSS_INDEV) += oss_audio.o oss_audio_dec.o OBJS-$(CONFIG_OSS_OUTDEV)+= oss_audio.o oss_audio_enc.o OBJS-$(CONFIG_PULSE_INDEV) += pulse_audio_dec.o \ -pulse_audio_common.o +pulse_audio_common.o timefilter.o OBJS-$(CONFIG_PULSE_OUTDEV) += pulse_audio_enc.o \ pulse_audio_common.o OBJS-$(CONFIG_QTKIT_INDEV) += qtkit.o -- 2.1.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
Hi, Le 28/11/2014 18:33, Michael Niedermayer a écrit : On Fri, Nov 28, 2014 at 04:54:09PM +0100, Benoit Fouet wrote: --- libavcodec/pngdec.c | 10 ++ 1 file changed, 10 insertions(+) applied maybe some of this can be factorized with the code above the else, though iam not sure it would be better I hesitated to do it, but chose not to. I have no real preference, to be honest. -- Ben ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add NVENC encoder
On Wed, 26 Nov 2014 11:21:26 +0100 Timo Rothenpieler wrote: > This patch adds support for encoding with Nvidia NVENC on Windows and > Linux. > > I'm not sure if this needs to be flagged as nonfree. As far as I'm > aware, it should not affect how the resulting binaries can be > redistributed. > > The only dependency this has is the nvEncodeAPI.h from the NVENC SDK, > which can be downloaded from Nvidia: > > https://developer.nvidia.com/nvidia-video-codec-sdk > > The header is somewhat hidden in the Samples directory. > > I attached the current version of the patch. > It can also be found on my github fork: > > https://github.com/BtbN/FFmpeg/tree/nvenc For what it's worth, some engineers at Nvidia are also working on an nvenc implementation for ffmpeg. That initial work is here: https://github.com/agathah/ffmpeg_libnvenc I've been corresponding with them about the lack of correct license headers but there's not much going on given the thanksgiving holiday in the US. --phil ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.
On 11/28/2014 4:47 PM, Reimar Döffinger wrote: > That doesn't explain why the patch changes the zlib / bz2 include position? They include it. e.g.: https://github.com/madler/zlib/blob/master/zconf.h#L321-339 - Derek ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu/opt: add escaping to av_opt_serialize
On date Thursday 2014-11-27 19:53:12 +0100, Lukasz Marek encoded: [...] > From e84ba5a67d74f58b59f5fa30bdb60df856c4c29e Mon Sep 17 00:00:00 2001 > From: Lukasz Marek > Date: Tue, 25 Nov 2014 20:25:10 +0100 > Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize > > Signed-off-by: Lukasz Marek > --- > libavutil/opt.c| 14 +- > libavutil/opt.h| 3 +++ > tests/ref/fate/opt | 7 +-- > 3 files changed, 21 insertions(+), 3 deletions(-) > > diff --git a/libavutil/opt.c b/libavutil/opt.c > index 5b26a00..2f8ea0c 100644 > --- a/libavutil/opt.c > +++ b/libavutil/opt.c > @@ -1846,6 +1846,13 @@ int av_opt_serialize(void *obj, int opt_flags, int > flags, char **buffer, > uint8_t *buf; > AVBPrint bprint; > int ret, cnt = 0; > +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; > + > +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == key_val_sep > || > +pairs_sep == '\\' || key_val_sep == '\\') { > +av_log(obj, AV_LOG_ERROR, "Invalid separator(s)."); Nit++: Invalid separator(s) found [...] LGTM otherwise (no need to send another patch of course), thanks. -- FFmpeg = Friendly and Furious Meaningless Political Exploitable Ghost ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
On Fri, Nov 28, 2014 at 04:54:09PM +0100, Benoit Fouet wrote: > --- > libavcodec/pngdec.c | 10 ++ > 1 file changed, 10 insertions(+) applied maybe some of this can be factorized with the code above the else, though iam not sure it would be better Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is what and why we do it that matters, not just one of them. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/mxfdec.c: initial support for EssenceGroups
On Tue, 2014-11-25 at 15:14 -0800, Mark Reid wrote: > --- > libavformat/mxf.c | 1 + > libavformat/mxf.h | 1 + > libavformat/mxfdec.c | 148 > - > tests/ref/lavf/mxf | 6 +- > tests/ref/lavf/mxf_d10 | 2 +- > 5 files changed, 127 insertions(+), 31 deletions(-) > > diff --git a/libavformat/mxf.c b/libavformat/mxf.c > index 4dc54d7..14d143e 100644 > --- a/libavformat/mxf.c > +++ b/libavformat/mxf.c > @@ -94,6 +94,7 @@ static const struct { > {AV_PIX_FMT_RGB565BE,{'R', 5, 'G', 6, 'B', 5 > }}, > {AV_PIX_FMT_RGBA,{'R', 8, 'G', 8, 'B', 8, 'A', 8 > }}, > {AV_PIX_FMT_PAL8,{'P', 8 > }}, > +{AV_PIX_FMT_GRAY8, {'A', 8 > }}, There's no pixel format for pure alpha? > }; > > static const int num_pixel_layouts = FF_ARRAY_ELEMS(ff_mxf_pixel_layouts); > diff --git a/libavformat/mxf.h b/libavformat/mxf.h > index 5b95efa..63b497a 100644 > --- a/libavformat/mxf.h > +++ b/libavformat/mxf.h > @@ -35,6 +35,7 @@ enum MXFMetadataSetType { > TimecodeComponent, > PulldownComponent, > Sequence, > +EssenceGroup, Add this to the end of the enum? That way mxfenc output doesn't change. > MultipleDescriptor, > Descriptor, > Track, > [...] > > +static int mxf_read_essence_group(void *arg, AVIOContext *pb, int tag, int > size, UID uid, int64_t klv_offset) > +{ > +MXFEssenceGroup *essence_group = arg; > +switch (tag) { > +case 0x0202: > +essence_group->duration = avio_rb64(pb); > +break; > +case 0x0501: > +essence_group->structural_components_count = avio_rb32(pb); > +essence_group->structural_components_refs = > av_calloc(essence_group->structural_components_count, sizeof(UID)); > +if (!essence_group->structural_components_refs) > +return AVERROR(ENOMEM); > +avio_skip(pb, 4); /* useless size of objects, always 16 according to > specs */ > +avio_read(pb, (uint8_t *)essence_group->structural_components_refs, > essence_group->structural_components_count * sizeof(UID)); Is there any risk of this multiplication overflowing? I suspect av_calloc() will fail if it does, just making sure. Also not critical if it actually does since avio_read() just ends up reading less. > +static MXFStructuralComponent* mxf_resolve_essence_group_choice(MXFContext > *mxf, MXFEssenceGroup *essence_group) > +{ > +MXFStructuralComponent *component = NULL; > +MXFPackage *package = NULL; > +MXFDescriptor *descriptor = NULL; > +int i; > + > +if (!essence_group || !essence_group->structural_components_count) > +return NULL; > + > +/* essence groups contains multiple representations of the same media, > + this return the first components with a valid Descriptor typically > index 0 */ > +for (i =0; i < essence_group->structural_components_count; i++){ > +component = mxf_resolve_strong_ref(mxf, > &essence_group->structural_components_refs[i], SourceClip); > +if (!component) > +continue; > + > +if (!(package = mxf_resolve_source_package(mxf, > component->source_package_uid))) > +continue; > + > +descriptor = mxf_resolve_strong_ref(mxf, &package->descriptor_ref, > Descriptor); > +if (descriptor){ > +/* HACK: force the duration of the component to match the > duration of the descriptor */ > +if (descriptor->duration != AV_NOPTS_VALUE) > +component->duration = descriptor->duration; Not a huge fan of this, but probably doesn't hurt since it's checking for AV_NOPTS_VALUE. > +static int mxf_metadataset_init(MXFMetadataSet *ctx, enum MXFMetadataSetType > type) > +{ > +switch (type){ > +case MultipleDescriptor: > +case Descriptor: > +((MXFDescriptor*)ctx)->pix_fmt = AV_PIX_FMT_NONE; > +((MXFDescriptor*)ctx)->duration = AV_NOPTS_VALUE; > +break; > +default: > +break; > +} > +return 0; > +} > + Good idea :) > diff --git a/tests/ref/lavf/mxf b/tests/ref/lavf/mxf > index 236661c..d237560 100644 > --- a/tests/ref/lavf/mxf > +++ b/tests/ref/lavf/mxf Again, probably not needed if you stick EssenceGroup at the end of the enum. I like using mxf_resolve_source_package() to reduce the size of mxf_parse_physical_source_package() and mxf_parse_structural_metadata(). Memory handling looks correct too. Did you double-check with valgrind? Looks pretty good overall. /Tomas signature.asc Description: This is a digitally signed message part ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.
On Thu, Nov 27, 2014 at 10:38:01PM +1100, Matt Oliver wrote: > The patch "lavf: Use wchar functions for filenames on windows for > mkdir/rmdir/rename/unlink" that was recently added has broken msvc/icl > builds. see: > http://fate.ffmpeg.org/report.cgi?time=20141126233318&slot=x86_32-msvc12-windows-native > > This is because winsock2.h must be included before windows.h. There are > many other files that include windows.h that dont check for winsock2.h (as > they dont need it) but include avformat/internal.h which now includes > winsock2.h but after all the files that explicitly include their own > windows.h. As a result all these files now wont compile under msvc/icl and > generate warnings under mingw. > > The attached patch fixes that by ensuring the correct header include order. That doesn't explain why the patch changes the zlib / bz2 include position? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v2] avcodec/pngdec: apng: fix output buffer filling when no blending is needed.
--- libavcodec/pngdec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index a330d36..9e52d0b 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -927,7 +927,17 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, pd += s->image_linesize; pd_last += s->image_linesize; } +} else { +for (j = s->y_offset; j < s->y_offset + s->cur_h; j++) { +for (i = 0; i < s->x_offset * s->bpp; i++) +pd[i] = pd_last[i]; +for (i = (s->x_offset + s->cur_w) * s->bpp; i < ls; i++) +pd[i] = pd_last[i]; +pd += s->image_linesize; +pd_last += s->image_linesize; +} } + for (j = s->y_offset + s->cur_h; j < s->height; j++) { for (i = 0; i < ls; i++) pd[i] = pd_last[i]; -- 2.2.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/pngdec: apng: fix buffer index when no blending is needed.
Please discard, this is wrong... - Mail original - > --- > libavcodec/pngdec.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c > index a96667f..0ba2749 100644 > --- a/libavcodec/pngdec.c > +++ b/libavcodec/pngdec.c > @@ -933,7 +933,11 @@ static int handle_p_frame_apng(AVCodecContext > *avctx, PNGDecContext *s, > pd += s->image_linesize; > pd_last += s->image_linesize; > } > +} else { > +pd += s->cur_h * s->image_linesize; > +pd_last += s->cur_h * s->image_linesize; > } > + > for (j = s->y_offset + s->cur_h; j < s->height; j++) { > for (i = 0; i < ls; i++) > pd[i] = pd_last[i]; > -- > 2.2.0 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/pngdec: apng: fix buffer index when no blending is needed.
--- libavcodec/pngdec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index a96667f..0ba2749 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -933,7 +933,11 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, pd += s->image_linesize; pd_last += s->image_linesize; } +} else { +pd += s->cur_h * s->image_linesize; +pd_last += s->cur_h * s->image_linesize; } + for (j = s->y_offset + s->cur_h; j < s->height; j++) { for (i = 0; i < ls; i++) pd[i] = pd_last[i]; -- 2.2.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/pngdec: do not blend on transparent black
On Fri, Nov 28, 2014 at 10:43:01AM +0100, Benoit Fouet wrote: > There is no need to memset the zlib output buffer, as there is no > blending happening there. Instead, do not blend when the dispose > operation is set to 'background' (tranparent black). > --- > libavcodec/pngdec.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/pngdec: allow for some code path optimizations.
On Fri, Nov 28, 2014 at 02:03:08PM +0100, Benoit Fouet wrote: > Use 'if (CONFIG_APNG_DECODER)' where needed, so that the compiler can > optimize out some portion of code. > --- > libavcodec/pngdec.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The real ebay dictionary, page 3 "Rare item" - "Common item with rare defect or maybe just a lie" "Professional" - "'Toy' made in china, not functional except as doorstop" "Experts will know" - "The seller hopes you are not an expert" signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch 1/4]Fix h264 on POWER LE: libavcodec/ppc/h264dsp.c
On Fri, Nov 28, 2014 at 03:21:30PM +0800, rongyan wrote: > Hi, > > We present 4 patches to fix h264 bugs for POWER8 little endian, which are > sent in 4 seperate emails. > This is the first, to fix the functions h264_idct8_add_altivec(), > h264_idct_dc_add_internal(), h264_loop_filter_luma_altivec(), write16x4() > VEC_1D_DCT(), weight_h264_W_altivec(), biweight_h264_W_altivec(), > VEC_LOAD_U8_ADD_S16_STORE_U8(), ALTIVEC_STORE_SUM_CLIP(); And add marcos > GET_2PERM(), dstv_load(),vdst_load(), dest_unligned_store(). > > The fate test result after merge these 4 patches can be found on website by > searching "ibmcrl", also attached in the below to facilitate the review. The > passed test cases change from 2017/2243 to 2209/2245. > > > > Thanks. > > Rong Yan > h264dsp.c | 89 > +++--- > 1 file changed, 62 insertions(+), 27 deletions(-) > 17a3de8bb83d18c3e4d5de6a4e07de3e6920ab5c > 0001-libavcodec-ppc-h264dsp.c-fix-h264_idct8_add_altivec.patch > From aac45f14e1ea716596b7e4f9098b8d87b95325c7 Mon Sep 17 00:00:00 2001 > From: Rong Yan > Date: Fri, 28 Nov 2014 06:49:50 + > Subject: [PATCH 1/4] libavcodec/ppc/h264dsp.c : fix h264_idct8_add_altivec() > h264_idct_dc_add_internal() h264_loop_filter_luma_altivec() write16x4() > VEC_1D_DCT() weight_h264_W_altivec() biweight_h264_W_altivec() > VEC_LOAD_U8_ADD_S16_STORE_U8() ALTIVEC_STORE_SUM_CLIP() add marcos > GET_2PERM() dstv_load() vdst_load() dest_unligned_store() for POWER LE applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Avoid a single point of failure, be that a person or equipment. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch 4/4]Fix h264 on POWER LE: libavcodec/ppc/h264qpel.c
On Fri, Nov 28, 2014 at 03:26:19PM +0800, rongyan wrote: > Hi, > We present 4 patches to fix h264 bugs for POWER8 little endian, which are > sent in 4 seperate emails. > This is the fifth, to fix the functions put_pixels16_l2_altivec(), > avg_pixels16_l2_altivec(), add marcos put_unligned_store(), > avg_unligned_store(). > The fate test result after merge these 4 patches can be found on website by > searching "ibmcrl", also attached in the below to facilitate the review. The > passed test cases change from 2017/2243 to 2209/2245. > > > Thanks. > Rong Yan > h264qpel.c | 109 > - > 1 file changed, 51 insertions(+), 58 deletions(-) > 4ffb563dbb1cf40249a4611f742826b8e6b3561c > 0004-libavcodec-ppc-h264qpel.c-fix-put_pixels16_l2_altive.patch > From 8c1ed96c96b0f1679a510465cfdb3949dd55c7a1 Mon Sep 17 00:00:00 2001 > From: Rong Yan > Date: Fri, 28 Nov 2014 06:53:35 + > Subject: [PATCH 4/4] libavcodec/ppc/h264qpel.c : fix put_pixels16_l2_altivec() > avg_pixels16_l2_altivec() add marcos put_unligned_store() > avg_unligned_store() for POWER LE 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
Re: [FFmpeg-devel] [Patch 3/4]Fix h264 on POWER LE: libavcodec/ppc/h264qpel_template.c
On Fri, Nov 28, 2014 at 03:25:07PM +0800, rongyan wrote: > Hi, > > We present 4 patches to fix h264 bugs for POWER8 little endian, which are > sent in 4 seperate emails. > This is the first, to fix functions PREFIX_h264_qpel16_h_lowpass_altivec(), > PREFIX_h264_qpel16_v_lowpass_altivec(), > PREFIX_h264_qpel16_hv_lowpass_altivec(), add marcos load_alignment(). > The fate test result after merge these 4 patches can be found on website by > searching "ibmcrl", also attached in the below to facilitate the review. The > passed test cases change from 2017/2243 to 2209/2245. > > > > Thanks. > Rong Yan > h264qpel_template.c | 364 > +++- > 1 file changed, 165 insertions(+), 199 deletions(-) > 4647fd05e246a876879f31573048772ee7ebb427 > 0003-libavcodec-ppc-h264qpel_template.c-fix-PREFIX_h264_q.patch > From 845868b81f387e8a82647811da0159f98fde8579 Mon Sep 17 00:00:00 2001 > From: Rong Yan > Date: Fri, 28 Nov 2014 06:52:24 + > Subject: [PATCH 3/4] libavcodec/ppc/h264qpel_template.c : fix > PREFIX_h264_qpel16_h_lowpass_altivec() PREFIX_h264_qpel16_v_lowpass_altivec() > PREFIX_h264_qpel16_hv_lowpass_altivec() add marcos load_alignment() for POWER > LE applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When you are offended at any man's fault, turn to yourself and study your own failings. Then you will forget your anger. -- Epictetus signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch 2/4]Fix h264 on POWER LE: libavcodec/ppc/h264chroma_template.c
On Fri, Nov 28, 2014 at 03:23:39PM +0800, rongyan wrote: > Hi, > We present 4 patches to fix h264 bugs for POWER8 little endian, which are > sent in 4 seperate emails. > This is the third, to fix the functions PREFIX_h264_chroma_mc8_altivec(), > PREFIX_no_rnd_vc1_chroma_mc8_altivec(), CHROMA_MC8_ALTIVEC_CORE_SIMPLE(), > CHROMA_MC8_ALTIVEC_CORE(), add marcos GET_VSRC1(), GET_VSRC(). > The fate test result after merge these 5 patches can be found on website by > searching "ibmcrl", also attached in the below to facilitate the review. The > passed test cases change from 2017/2243 to 2209/2245. > > > Thanks. > Rong Yan > h264chroma_template.c | 223 > +++--- > 1 file changed, 88 insertions(+), 135 deletions(-) > 34146301e88f11a640582bf48d54a843ba14c993 > 0002-libavcodec-ppc-h264chroma_template.c-fix-PREFIX_h264.patch > From 42f04ed8ab2d9ea61192a58885373169abd5 Mon Sep 17 00:00:00 2001 > From: Rong Yan > Date: Fri, 28 Nov 2014 06:50:49 + > Subject: [PATCH 2/4] libavcodec/ppc/h264chroma_template.c :fix > PREFIX_h264_chroma_mc8_altivec() PREFIX_no_rnd_vc1_chroma_mc8_altivec() > CHROMA_MC8_ALTIVEC_CORE_SIMPLE() CHROMA_MC8_ALTIVEC_CORE() add marcos > GET_VSRC1() GET_VSRC() for POWER LE applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Breaking DRM is a little like attempting to break through a door even though the window is wide open and the only thing in the house is a bunch of things you dont want and which you would get tomorrow for free anyway signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/pngdec: allow for some code path optimizations.
Use 'if (CONFIG_APNG_DECODER)' where needed, so that the compiler can optimize out some portion of code. --- libavcodec/pngdec.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index da852c4..a330d36 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -949,7 +949,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, for (;;) { length = bytestream2_get_bytes_left(&s->gb); if (length <= 0) { -if (avctx->codec_id == AV_CODEC_ID_APNG && length == 0) { +if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && length == 0) { if (!(s->state & PNG_IDAT)) return 0; else @@ -984,14 +984,14 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, goto fail; break; case MKTAG('f', 'c', 'T', 'L'): -if (avctx->codec_id != AV_CODEC_ID_APNG) +if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG) goto skip_tag; if ((ret = decode_fctl_chunk(avctx, s, length)) < 0) goto fail; decode_next_dat = 1; break; case MKTAG('f', 'd', 'A', 'T'): -if (avctx->codec_id != AV_CODEC_ID_APNG) +if (!CONFIG_APNG_DECODER || avctx->codec_id != AV_CODEC_ID_APNG) goto skip_tag; if (!decode_next_dat) goto fail; @@ -999,7 +999,7 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, length -= 4; /* fallthrough */ case MKTAG('I', 'D', 'A', 'T'): -if (avctx->codec_id == AV_CODEC_ID_APNG && !decode_next_dat) +if (CONFIG_APNG_DECODER && avctx->codec_id == AV_CODEC_ID_APNG && !decode_next_dat) goto skip_tag; if (decode_idat_chunk(avctx, s, length, p) < 0) goto fail; -- 2.2.0.rc2.23.gca0107e ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu/opt: add escaping to av_opt_serialize
On Thu, Nov 27, 2014 at 07:53:12PM +0100, Lukasz Marek wrote: > On 27 November 2014 at 15:05, Stefano Sabatini wrote: > > > On date Tuesday 2014-11-25 20:38:59 +0100, Lukasz Marek encoded: > > > Patch attached. > > > > > From 2a9de161df4e1d0083264dde94ec5b8af59cec35 Mon Sep 17 00:00:00 2001 > > > From: Lukasz Marek > > > Date: Tue, 25 Nov 2014 20:25:10 +0100 > > > Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize > > > > > > Signed-off-by: Lukasz Marek > > > --- > > > libavutil/opt.c| 12 +++- > > > libavutil/opt.h| 1 + > > > tests/ref/fate/opt | 7 +-- > > > 3 files changed, 17 insertions(+), 3 deletions(-) > > > > > > diff --git a/libavutil/opt.c b/libavutil/opt.c > > > index 0546a37..5b9cc35 100644 > > > --- a/libavutil/opt.c > > > +++ b/libavutil/opt.c > > > @@ -1843,6 +1843,11 @@ int av_opt_serialize(void *obj, int opt_flags, > > int flags, char **buffer, > > > uint8_t *buf; > > > AVBPrint bprint; > > > int ret, cnt = 0; > > > +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; > > > + > > > +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == > > key_val_sep || > > > +pairs_sep == '\\' || key_val_sep == '\\') > > > +return AVERROR(EINVAL); > > > > maybe send a log here > > > > Added. > > > > > --- a/libavutil/opt.h > > > +++ b/libavutil/opt.h > > > @@ -887,6 +887,7 @@ int av_opt_is_set_to_default_by_name(void *obj, > > const char *name, int search_fla > > > * @param[in] key_val_sep character used to separate key from value > > > * @param[in] pairs_sep character used to separate two pairs from > > each other > > > * @return >= 0 on success, negative on error > > > + * @warning Separators cannot be neither '\\' nor '\0'. They also > > cannot be the same. > > > */ > > > > You could mention escaping in the docs, for example: > > > > A key/value or pairs separator occurring in the serialized value or > > name string are escaped through the av_escape() function. > > > > Added. > Updated patch attached. > libavutil/opt.c| 14 +- > libavutil/opt.h|3 +++ > tests/ref/fate/opt |7 +-- > 3 files changed, 21 insertions(+), 3 deletions(-) > acd799e0dfcb7d0ac248ab48b2a3f55bf970cb5d > 0001-lavu-opt-add-escaping-to-av_opt_serialize.patch > From e84ba5a67d74f58b59f5fa30bdb60df856c4c29e Mon Sep 17 00:00:00 2001 > From: Lukasz Marek > Date: Tue, 25 Nov 2014 20:25:10 +0100 > Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize > > Signed-off-by: Lukasz Marek LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/pngdec: do not blend on transparent black
There is no need to memset the zlib output buffer, as there is no blending happening there. Instead, do not blend when the dispose operation is set to 'background' (tranparent black). --- libavcodec/pngdec.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 4c9d321..da852c4 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -674,10 +674,6 @@ static int decode_idat_chunk(AVCodecContext *avctx, PNGDecContext *s, s->crow_buf = s->buffer + 15; s->zstream.avail_out = s->crow_size; s->zstream.next_out = s->crow_buf; - -if (avctx->codec_id == AV_CODEC_ID_APNG && -s->dispose_op == APNG_DISPOSE_OP_BACKGROUND) -memset(s->zstream.next_out, 0, s->zstream.avail_out); } s->state |= PNG_IDAT; if ((ret = png_decode_idat(s, length)) < 0) @@ -887,7 +883,7 @@ static int handle_p_frame_apng(AVCodecContext *avctx, PNGDecContext *s, pd_last += s->image_linesize; } -if (s->blend_op == APNG_BLEND_OP_OVER) { +if (s->dispose_op != APNG_DISPOSE_OP_BACKGROUND && s->blend_op == APNG_BLEND_OP_OVER) { uint8_t ri, gi, bi, ai; if (avctx->pix_fmt == AV_PIX_FMT_RGBA) { -- 2.2.0.rc2.23.gca0107e ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] DVB subtitles with multiple langage
Frédéric HUGENELL gmail.com> writes: > I just uploaded a few minutes ago a sample of a movie > in the incoming folder, as requested by ffmpeg Uploaded to http://samples.ffmpeg.org/MPEG-VOB/transport/dvbsub/ Thank you for the sample! Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel