[FFmpeg-cvslog] doc/fftools-common-opts: update/ extend documentation for -opencl_bench option
ffmpeg | branch: master | Maneesh Gupta | Tue Jan 27 20:46:24 2015 +0530| [1600f85cbc4594c589cfea42121e3ddad0b974e9] | committer: Stefano Sabatini doc/fftools-common-opts: update/extend documentation for -opencl_bench option Signed-off-by: Stefano Sabatini > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1600f85cbc4594c589cfea42121e3ddad0b974e9 --- doc/fftools-common-opts.texi | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/doc/fftools-common-opts.texi b/doc/fftools-common-opts.texi index 7d52c1a..6556909 100644 --- a/doc/fftools-common-opts.texi +++ b/doc/fftools-common-opts.texi @@ -294,8 +294,41 @@ Possible flags for this option are: @end table @item -opencl_bench -Benchmark all available OpenCL devices and show the results. This option -is only available when FFmpeg has been compiled with @code{--enable-opencl}. +This option is used to benchmark all available OpenCL devices and print the +results. This option is only available when FFmpeg has been compiled with +@code{--enable-opencl}. + +When FFmpeg is configured with @code{--enable-opencl}, the options for the +global OpenCL context are set via @option{-opencl_options}. See the +"OpenCL Options" section in the ffmpeg-utils manual for the complete list of +supported options. Amongst others, these options include the ability to select +a specific platform and device to run the OpenCL code on. By default, FFmpeg +will run on the first device of the first platform. While the options for the +global OpenCL context provide flexibility to the user in selecting the OpenCL +device of their choice, most users would probably want to select the fastest +OpenCL device for their system. + +This option assists the selection of the most efficient configuration by +identifying the appropriate device for the user's system. The built-in +benchmark is run on all the OpenCL devices and the performance is measured for +each device. The devices in the results list are sorted based on their +performance with the fastest device listed first. The user can subsequently +invoke @command{ffmpeg} using the device deemed most appropriate via +@option{-opencl_options} to obtain the best performance for the OpenCL +accelerated code. + +Typical usage to use the fastest OpenCL device involve the following steps. + +Run the command: +@example +ffmpeg -opencl_bench +@end example +Note down the platform ID (@var{pidx}) and device ID (@var{didx}) of the first +i.e. fastest device in the list. +Select the platform and device using the command: +@example +ffmpeg -opencl_options platform_idx=@var{pidx}:device_idx=@var{didx} ... +@end example @item -opencl_options options (@emph{global}) Set OpenCL environment options. This option is only available when ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/h264_parser: Rename close()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 13:09:30 2015 +0100| [ccaa5dcb31353fba43245ea737f42b7f2099973d] | committer: Michael Niedermayer avcodec/h264_parser: Rename close() This avoids a potential conflict with the equally named function for closing files It also could reduce confusion in debugger backtraces Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ccaa5dcb31353fba43245ea737f42b7f2099973d --- libavcodec/h264_parser.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 24d87d0..b1815e6 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -557,7 +557,7 @@ static int h264_split(AVCodecContext *avctx, return 0; } -static void close(AVCodecParserContext *s) +static void h264_close(AVCodecParserContext *s) { H264ParseContext *p = s->priv_data; H264Context *h = &p->h; @@ -582,6 +582,6 @@ AVCodecParser ff_h264_parser = { .priv_data_size = sizeof(H264ParseContext), .parser_init= init, .parser_parse = h264_parse, -.parser_close = close, +.parser_close = h264_close, .split = h264_split, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/aes: Rename crypt()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 13:12:02 2015 +0100| [0d37ca150c5ef0a5dd32946f99ded6862579b093] | committer: Michael Niedermayer avutil/aes: Rename crypt() This avoids a potential conflict with the equally named function from XOPEN It also could reduce confusion in debugger backtraces Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0d37ca150c5ef0a5dd32946f99ded6862579b093 --- libavutil/aes.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavutil/aes.c b/libavutil/aes.c index 638fb81..9eb2bb3 100644 --- a/libavutil/aes.c +++ b/libavutil/aes.c @@ -127,7 +127,7 @@ static inline void mix(av_aes_block state[2], uint32_t multbl[][256], int s1, in state[0].u32[3] = mix_core(multbl, src[3][0], src[s1-1][1], src[1][2], src[s3-1][3]); } -static inline void crypt(AVAES *a, int s, const uint8_t *sbox, +static inline void aes_crypt(AVAES *a, int s, const uint8_t *sbox, uint32_t multbl[][256]) { int r; @@ -146,7 +146,7 @@ void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src, while (count--) { addkey_s(&a->state[1], src, &a->round_key[a->rounds]); if (decrypt) { -crypt(a, 0, inv_sbox, dec_multbl); +aes_crypt(a, 0, inv_sbox, dec_multbl); if (iv) { addkey_s(&a->state[0], iv, &a->state[0]); memcpy(iv, src, 16); @@ -155,7 +155,7 @@ void av_aes_crypt(AVAES *a, uint8_t *dst, const uint8_t *src, } else { if (iv) addkey_s(&a->state[1], iv, &a->state[1]); -crypt(a, 2, sbox, enc_multbl); +aes_crypt(a, 2, sbox, enc_multbl); addkey_d(dst, &a->state[0], &a->round_key[0]); if (iv) memcpy(iv, dst, 16); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_telecine: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 13:51:18 2015 +| [87577f5508cae419e56f15c8062b0063b21095bf] | committer: Paul B Mahol avfilter/vf_telecine: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=87577f5508cae419e56f15c8062b0063b21095bf --- libavfilter/vf_telecine.c | 110 ++--- 1 file changed, 55 insertions(+), 55 deletions(-) diff --git a/libavfilter/vf_telecine.c b/libavfilter/vf_telecine.c index aea63ab..a0f28d4 100644 --- a/libavfilter/vf_telecine.c +++ b/libavfilter/vf_telecine.c @@ -69,29 +69,29 @@ AVFILTER_DEFINE_CLASS(telecine); static av_cold int init(AVFilterContext *ctx) { -TelecineContext *tc = ctx->priv; +TelecineContext *s = ctx->priv; const char *p; int max = 0; -if (!strlen(tc->pattern)) { +if (!strlen(s->pattern)) { av_log(ctx, AV_LOG_ERROR, "No pattern provided.\n"); return AVERROR_INVALIDDATA; } -for (p = tc->pattern; *p; p++) { +for (p = s->pattern; *p; p++) { if (!av_isdigit(*p)) { av_log(ctx, AV_LOG_ERROR, "Provided pattern includes non-numeric characters.\n"); return AVERROR_INVALIDDATA; } max = FFMAX(*p - '0', max); -tc->pts.num += 2; -tc->pts.den += *p - '0'; +s->pts.num += 2; +s->pts.den += *p - '0'; } -tc->out_cnt = (max + 1) / 2; +s->out_cnt = (max + 1) / 2; av_log(ctx, AV_LOG_INFO, "Telecine pattern %s yields up to %d frames per frame, pts advance factor: %d/%d\n", - tc->pattern, tc->out_cnt, tc->pts.num, tc->pts.den); + s->pattern, s->out_cnt, s->pts.num, s->pts.den); return 0; } @@ -115,26 +115,26 @@ static int query_formats(AVFilterContext *ctx) static int config_input(AVFilterLink *inlink) { -TelecineContext *tc = inlink->dst->priv; +TelecineContext *s = inlink->dst->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); int i, ret; -tc->temp = ff_get_video_buffer(inlink, inlink->w, inlink->h); -if (!tc->temp) +s->temp = ff_get_video_buffer(inlink, inlink->w, inlink->h); +if (!s->temp) return AVERROR(ENOMEM); -for (i = 0; i < tc->out_cnt; i++) { -tc->frame[i] = ff_get_video_buffer(inlink, inlink->w, inlink->h); -if (!tc->frame[i]) +for (i = 0; i < s->out_cnt; i++) { +s->frame[i] = ff_get_video_buffer(inlink, inlink->w, inlink->h); +if (!s->frame[i]) return AVERROR(ENOMEM); } -if ((ret = av_image_fill_linesizes(tc->stride, inlink->format, inlink->w)) < 0) +if ((ret = av_image_fill_linesizes(s->stride, inlink->format, inlink->w)) < 0) return ret; -tc->planeheight[1] = tc->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); -tc->planeheight[0] = tc->planeheight[3] = inlink->h; +s->planeheight[1] = s->planeheight[2] = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); +s->planeheight[0] = s->planeheight[3] = inlink->h; -tc->nb_planes = av_pix_fmt_count_planes(inlink->format); +s->nb_planes = av_pix_fmt_count_planes(inlink->format); return 0; } @@ -142,7 +142,7 @@ static int config_input(AVFilterLink *inlink) static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; -TelecineContext *tc = ctx->priv; +TelecineContext *s = ctx->priv; const AVFilterLink *inlink = ctx->inputs[0]; AVRational fps = inlink->frame_rate; @@ -151,17 +151,17 @@ static int config_output(AVFilterLink *outlink) "current rate of %d/%d is invalid\n", fps.num, fps.den); return AVERROR(EINVAL); } -fps = av_mul_q(fps, av_inv_q(tc->pts)); +fps = av_mul_q(fps, av_inv_q(s->pts)); av_log(ctx, AV_LOG_VERBOSE, "FPS: %d/%d -> %d/%d\n", inlink->frame_rate.num, inlink->frame_rate.den, fps.num, fps.den); outlink->flags |= FF_LINK_FLAG_REQUEST_LOOP; outlink->frame_rate = fps; -outlink->time_base = av_mul_q(inlink->time_base, tc->pts); +outlink->time_base = av_mul_q(inlink->time_base, s->pts); av_log(ctx, AV_LOG_VERBOSE, "TB: %d/%d -> %d/%d\n", inlink->time_base.num, inlink->time_base.den, outlink->time_base.num, outlink->time_base.den); -tc->ts_unit = av_q2d(av_inv_q(av_mul_q(fps, outlink->time_base))); +s->ts_unit = av_q2d(av_inv_q(av_mul_q(fps, outlink->time_base))); return 0; } @@ -170,72 +170,72 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; -TelecineContext *tc = ctx->priv; +TelecineContext *s = ctx->priv; int i, len, ret = 0, nout = 0; -len = tc->pattern[tc->pattern_pos] - '0'; +len = s->pattern[s->pattern_pos] - '0'; -tc->pattern_pos++; -if (!tc->pattern[tc->pa
[FFmpeg-cvslog] avfilter/avf_avectorscope: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:34:11 2015 +| [67aaa7056d2b14b90d12cea5997b909ad2d6710e] | committer: Paul B Mahol avfilter/avf_avectorscope: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67aaa7056d2b14b90d12cea5997b909ad2d6710e --- libavfilter/avf_avectorscope.c | 92 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index f9ebc0f..1b5365a 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avectorscope.c @@ -75,37 +75,37 @@ static const AVOption avectorscope_options[] = { AVFILTER_DEFINE_CLASS(avectorscope); -static void draw_dot(AudioVectorScopeContext *p, unsigned x, unsigned y) +static void draw_dot(AudioVectorScopeContext *s, unsigned x, unsigned y) { -const int linesize = p->outpicref->linesize[0]; +const int linesize = s->outpicref->linesize[0]; uint8_t *dst; -if (p->zoom > 1) { -if (y >= p->h || x >= p->w) +if (s->zoom > 1) { +if (y >= s->h || x >= s->w) return; } else { -y = FFMIN(y, p->h - 1); -x = FFMIN(x, p->w - 1); +y = FFMIN(y, s->h - 1); +x = FFMIN(x, s->w - 1); } -dst = &p->outpicref->data[0][y * linesize + x * 4]; -dst[0] = FFMIN(dst[0] + p->contrast[0], 255); -dst[1] = FFMIN(dst[1] + p->contrast[1], 255); -dst[2] = FFMIN(dst[2] + p->contrast[2], 255); +dst = &s->outpicref->data[0][y * linesize + x * 4]; +dst[0] = FFMIN(dst[0] + s->contrast[0], 255); +dst[1] = FFMIN(dst[1] + s->contrast[1], 255); +dst[2] = FFMIN(dst[2] + s->contrast[2], 255); } -static void fade(AudioVectorScopeContext *p) +static void fade(AudioVectorScopeContext *s) { -const int linesize = p->outpicref->linesize[0]; +const int linesize = s->outpicref->linesize[0]; int i, j; -if (p->fade[0] || p->fade[1] || p->fade[2]) { -uint8_t *d = p->outpicref->data[0]; -for (i = 0; i < p->h; i++) { -for (j = 0; j < p->w*4; j+=4) { -d[j+0] = FFMAX(d[j+0] - p->fade[0], 0); -d[j+1] = FFMAX(d[j+1] - p->fade[1], 0); -d[j+2] = FFMAX(d[j+2] - p->fade[2], 0); +if (s->fade[0] || s->fade[1] || s->fade[2]) { +uint8_t *d = s->outpicref->data[0]; +for (i = 0; i < s->h; i++) { +for (j = 0; j < s->w*4; j+=4) { +d[j+0] = FFMAX(d[j+0] - s->fade[0], 0); +d[j+1] = FFMAX(d[j+1] - s->fade[1], 0); +d[j+2] = FFMAX(d[j+2] - s->fade[2], 0); } d += linesize; } @@ -145,10 +145,10 @@ static int query_formats(AVFilterContext *ctx) static int config_input(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; -AudioVectorScopeContext *p = ctx->priv; +AudioVectorScopeContext *s = ctx->priv; int nb_samples; -nb_samples = FFMAX(1024, ((double)inlink->sample_rate / av_q2d(p->frame_rate)) + 0.5); +nb_samples = FFMAX(1024, ((double)inlink->sample_rate / av_q2d(s->frame_rate)) + 0.5); inlink->partial_buf_size = inlink->min_samples = inlink->max_samples = nb_samples; @@ -158,15 +158,15 @@ static int config_input(AVFilterLink *inlink) static int config_output(AVFilterLink *outlink) { -AudioVectorScopeContext *p = outlink->src->priv; +AudioVectorScopeContext *s = outlink->src->priv; -outlink->w = p->w; -outlink->h = p->h; +outlink->w = s->w; +outlink->h = s->h; outlink->sample_aspect_ratio = (AVRational){1,1}; -outlink->frame_rate = p->frame_rate; +outlink->frame_rate = s->frame_rate; -p->hw = p->w / 2; -p->hh = p->h / 2; +s->hw = s->w / 2; +s->hh = s->h / 2; return 0; } @@ -175,35 +175,35 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; -AudioVectorScopeContext *p = ctx->priv; -const int hw = p->hw; -const int hh = p->hh; +AudioVectorScopeContext *s = ctx->priv; +const int hw = s->hw; +const int hh = s->hh; unsigned x, y; -const double zoom = p->zoom; +const double zoom = s->zoom; int i; -if (!p->outpicref || p->outpicref->width != outlink->w || - p->outpicref->height != outlink->h) { -av_frame_free(&p->outpicref); -p->outpicref = ff_get_video_buffer(outlink, outlink->w, outlink->h); -if (!p->outpicref) { +if (!s->outpicref || s->outpicref->width != outlink->w || + s->outpicref->height != outlink->h) { +av_frame_free(&s->outpicref); +s->outpicref = ff_get_video_buffer(outlink, outlink->w, outlink->h); +if (!s->outpicref) { av_frame_free(&insamples); return AVERROR(E
[FFmpeg-cvslog] avfitler/vf_il: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:22:26 2015 +| [abcf8610b8b3562661b38adfad9766d497ba65a3] | committer: Paul B Mahol avfitler/vf_il: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=abcf8610b8b3562661b38adfad9766d497ba65a3 --- libavfilter/vf_il.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c index b19fea1..550fde1 100644 --- a/libavfilter/vf_il.c +++ b/libavfilter/vf_il.c @@ -98,17 +98,17 @@ static int query_formats(AVFilterContext *ctx) static int config_input(AVFilterLink *inlink) { -IlContext *il = inlink->dst->priv; +IlContext *s = inlink->dst->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); int ret; -il->nb_planes = av_pix_fmt_count_planes(inlink->format); +s->nb_planes = av_pix_fmt_count_planes(inlink->format); -il->has_alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA); -if ((ret = av_image_fill_linesizes(il->linesize, inlink->format, inlink->w)) < 0) +s->has_alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA); +if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0) return ret; -il->chroma_height = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); +s->chroma_height = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); return 0; } @@ -146,7 +146,7 @@ static void interleave(uint8_t *dst, uint8_t *src, int w, int h, static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) { -IlContext *il = inlink->dst->priv; +IlContext *s = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *out; int comp; @@ -159,23 +159,23 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref) av_frame_copy_props(out, inpicref); interleave(out->data[0], inpicref->data[0], - il->linesize[0], inlink->h, + s->linesize[0], inlink->h, out->linesize[0], inpicref->linesize[0], - il->luma_mode, il->luma_swap); + s->luma_mode, s->luma_swap); -for (comp = 1; comp < (il->nb_planes - il->has_alpha); comp++) { +for (comp = 1; comp < (s->nb_planes - s->has_alpha); comp++) { interleave(out->data[comp], inpicref->data[comp], - il->linesize[comp], il->chroma_height, + s->linesize[comp], s->chroma_height, out->linesize[comp], inpicref->linesize[comp], - il->chroma_mode, il->chroma_swap); + s->chroma_mode, s->chroma_swap); } -if (il->has_alpha) { -comp = il->nb_planes - 1; +if (s->has_alpha) { +comp = s->nb_planes - 1; interleave(out->data[comp], inpicref->data[comp], - il->linesize[comp], inlink->h, + s->linesize[comp], inlink->h, out->linesize[comp], inpicref->linesize[comp], - il->alpha_mode, il->alpha_swap); + s->alpha_mode, s->alpha_swap); } av_frame_free(&inpicref); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_colorchannelmixer: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:39:15 2015 +| [fca50464dc7fe6591432934fcf3aefce5931cd8d] | committer: Paul B Mahol avfilter/vf_colorchannelmixer: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fca50464dc7fe6591432934fcf3aefce5931cd8d --- libavfilter/vf_colorchannelmixer.c | 180 ++-- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/libavfilter/vf_colorchannelmixer.c b/libavfilter/vf_colorchannelmixer.c index c7e63b5..fca382e 100644 --- a/libavfilter/vf_colorchannelmixer.c +++ b/libavfilter/vf_colorchannelmixer.c @@ -88,10 +88,10 @@ static int query_formats(AVFilterContext *ctx) static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; -ColorChannelMixerContext *cm = ctx->priv; +ColorChannelMixerContext *s = ctx->priv; int i, j, size, *buffer; -ff_fill_rgba_map(cm->rgba_map, outlink->format); +ff_fill_rgba_map(s->rgba_map, outlink->format); switch (outlink->format) { case AV_PIX_FMT_RGB48: @@ -104,34 +104,34 @@ static int config_output(AVFilterLink *outlink) size = 256; } -cm->buffer = buffer = av_malloc(16 * size * sizeof(*cm->buffer)); -if (!cm->buffer) +s->buffer = buffer = av_malloc(16 * size * sizeof(*s->buffer)); +if (!s->buffer) return AVERROR(ENOMEM); for (i = 0; i < 4; i++) for (j = 0; j < 4; j++, buffer += size) -cm->lut[i][j] = buffer; +s->lut[i][j] = buffer; for (i = 0; i < size; i++) { -cm->lut[R][R][i] = round(i * cm->rr); -cm->lut[R][G][i] = round(i * cm->rg); -cm->lut[R][B][i] = round(i * cm->rb); -cm->lut[R][A][i] = round(i * cm->ra); - -cm->lut[G][R][i] = round(i * cm->gr); -cm->lut[G][G][i] = round(i * cm->gg); -cm->lut[G][B][i] = round(i * cm->gb); -cm->lut[G][A][i] = round(i * cm->ga); - -cm->lut[B][R][i] = round(i * cm->br); -cm->lut[B][G][i] = round(i * cm->bg); -cm->lut[B][B][i] = round(i * cm->bb); -cm->lut[B][A][i] = round(i * cm->ba); - -cm->lut[A][R][i] = round(i * cm->ar); -cm->lut[A][G][i] = round(i * cm->ag); -cm->lut[A][B][i] = round(i * cm->ab); -cm->lut[A][A][i] = round(i * cm->aa); +s->lut[R][R][i] = round(i * s->rr); +s->lut[R][G][i] = round(i * s->rg); +s->lut[R][B][i] = round(i * s->rb); +s->lut[R][A][i] = round(i * s->ra); + +s->lut[G][R][i] = round(i * s->gr); +s->lut[G][G][i] = round(i * s->gg); +s->lut[G][B][i] = round(i * s->gb); +s->lut[G][A][i] = round(i * s->ga); + +s->lut[B][R][i] = round(i * s->br); +s->lut[B][G][i] = round(i * s->bg); +s->lut[B][B][i] = round(i * s->bb); +s->lut[B][A][i] = round(i * s->ba); + +s->lut[A][R][i] = round(i * s->ar); +s->lut[A][G][i] = round(i * s->ag); +s->lut[A][B][i] = round(i * s->ab); +s->lut[A][A][i] = round(i * s->aa); } return 0; @@ -140,12 +140,12 @@ static int config_output(AVFilterLink *outlink) static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; -ColorChannelMixerContext *cm = ctx->priv; +ColorChannelMixerContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; -const uint8_t roffset = cm->rgba_map[R]; -const uint8_t goffset = cm->rgba_map[G]; -const uint8_t boffset = cm->rgba_map[B]; -const uint8_t aoffset = cm->rgba_map[A]; +const uint8_t roffset = s->rgba_map[R]; +const uint8_t goffset = s->rgba_map[G]; +const uint8_t boffset = s->rgba_map[B]; +const uint8_t aoffset = s->rgba_map[A]; const uint8_t *srcrow = in->data[0]; uint8_t *dstrow; AVFrame *out; @@ -175,15 +175,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) const uint8_t gin = src[j + goffset]; const uint8_t bin = src[j + boffset]; -dst[j + roffset] = av_clip_uint8(cm->lut[R][R][rin] + - cm->lut[R][G][gin] + - cm->lut[R][B][bin]); -dst[j + goffset] = av_clip_uint8(cm->lut[G][R][rin] + - cm->lut[G][G][gin] + - cm->lut[G][B][bin]); -dst[j + boffset] = av_clip_uint8(cm->lut[B][R][rin] + - cm->lut[B][G][gin] + - cm->lut[B][B][bin]); +dst[j + roffset] = av_clip_uint8(s->lut[R][R][rin] + + s->lut[R][G][gin] + + s->lut[R][B][bin]); +dst[j + goff
[FFmpeg-cvslog] avfilter/af_biquads: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:30:27 2015 +| [6121968a9e8711d61ea36e864bc8a5dbe195ce8d] | committer: Paul B Mahol avfilter/af_biquads: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6121968a9e8711d61ea36e864bc8a5dbe195ce8d --- libavfilter/af_biquads.c | 210 +++--- 1 file changed, 105 insertions(+), 105 deletions(-) diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 02bf9db..10de28d 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -118,12 +118,12 @@ typedef struct { static av_cold int init(AVFilterContext *ctx) { -BiquadsContext *p = ctx->priv; +BiquadsContext *s = ctx->priv; -if (p->filter_type != biquad) { -if (p->frequency <= 0 || p->width <= 0) { +if (s->filter_type != biquad) { +if (s->frequency <= 0 || s->width <= 0) { av_log(ctx, AV_LOG_ERROR, "Invalid frequency %f and/or width %f <= 0\n", - p->frequency, p->width); + s->frequency, s->width); return AVERROR(EINVAL); } } @@ -233,153 +233,153 @@ BIQUAD_FILTER(dbl, double, -1., 1., 0) static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx= outlink->src; -BiquadsContext *p = ctx->priv; +BiquadsContext *s = ctx->priv; AVFilterLink *inlink= ctx->inputs[0]; -double A = exp(p->gain / 40 * log(10.)); -double w0 = 2 * M_PI * p->frequency / inlink->sample_rate; +double A = exp(s->gain / 40 * log(10.)); +double w0 = 2 * M_PI * s->frequency / inlink->sample_rate; double alpha; if (w0 > M_PI) { av_log(ctx, AV_LOG_ERROR, "Invalid frequency %f. Frequency must be less than half the sample-rate %d.\n", - p->frequency, inlink->sample_rate); + s->frequency, inlink->sample_rate); return AVERROR(EINVAL); } -switch (p->width_type) { +switch (s->width_type) { case NONE: alpha = 0.0; break; case HERTZ: -alpha = sin(w0) / (2 * p->frequency / p->width); +alpha = sin(w0) / (2 * s->frequency / s->width); break; case OCTAVE: -alpha = sin(w0) * sinh(log(2.) / 2 * p->width * w0 / sin(w0)); +alpha = sin(w0) * sinh(log(2.) / 2 * s->width * w0 / sin(w0)); break; case QFACTOR: -alpha = sin(w0) / (2 * p->width); +alpha = sin(w0) / (2 * s->width); break; case SLOPE: -alpha = sin(w0) / 2 * sqrt((A + 1 / A) * (1 / p->width - 1) + 2); +alpha = sin(w0) / 2 * sqrt((A + 1 / A) * (1 / s->width - 1) + 2); break; default: av_assert0(0); } -switch (p->filter_type) { +switch (s->filter_type) { case biquad: break; case equalizer: -p->a0 = 1 + alpha / A; -p->a1 = -2 * cos(w0); -p->a2 = 1 - alpha / A; -p->b0 = 1 + alpha * A; -p->b1 = -2 * cos(w0); -p->b2 = 1 - alpha * A; +s->a0 = 1 + alpha / A; +s->a1 = -2 * cos(w0); +s->a2 = 1 - alpha / A; +s->b0 = 1 + alpha * A; +s->b1 = -2 * cos(w0); +s->b2 = 1 - alpha * A; break; case bass: -p->a0 = (A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha; -p->a1 =-2 * ((A - 1) + (A + 1) * cos(w0)); -p->a2 = (A + 1) + (A - 1) * cos(w0) - 2 * sqrt(A) * alpha; -p->b0 = A * ((A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha); -p->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0)); -p->b2 = A * ((A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha); +s->a0 = (A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha; +s->a1 =-2 * ((A - 1) + (A + 1) * cos(w0)); +s->a2 = (A + 1) + (A - 1) * cos(w0) - 2 * sqrt(A) * alpha; +s->b0 = A * ((A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha); +s->b1 = 2 * A * ((A - 1) - (A + 1) * cos(w0)); +s->b2 = A * ((A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha); break; case treble: -p->a0 = (A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha; -p->a1 = 2 * ((A - 1) - (A + 1) * cos(w0)); -p->a2 = (A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha; -p->b0 = A * ((A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha); -p->b1 =-2 * A * ((A - 1) + (A + 1) * cos(w0)); -p->b2 = A * ((A + 1) + (A - 1) * cos(w0) - 2 * sqrt(A) * alpha); +s->a0 = (A + 1) - (A - 1) * cos(w0) + 2 * sqrt(A) * alpha; +s->a1 = 2 * ((A - 1) - (A + 1) * cos(w0)); +s->a2 = (A + 1) - (A - 1) * cos(w0) - 2 * sqrt(A) * alpha; +s->b0 = A * ((A + 1) + (A - 1) * cos(w0) + 2 * sqrt(A) * alpha); +s->b1
[FFmpeg-cvslog] avfilter/vf_extractplanes: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:26:13 2015 +| [f27cda48ec6463fb18d13b4003f67e0fe45dc0d9] | committer: Paul B Mahol avfilter/vf_extractplanes: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f27cda48ec6463fb18d13b4003f67e0fe45dc0d9 --- libavfilter/vf_extractplanes.c | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/libavfilter/vf_extractplanes.c b/libavfilter/vf_extractplanes.c index fadd2dd..b0fa1bb 100644 --- a/libavfilter/vf_extractplanes.c +++ b/libavfilter/vf_extractplanes.c @@ -134,7 +134,7 @@ static int query_formats(AVFilterContext *ctx) static int config_input(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; -ExtractPlanesContext *e = ctx->priv; +ExtractPlanesContext *s = ctx->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); int plane_avail, ret, i; uint8_t rgba_map[4]; @@ -143,20 +143,20 @@ static int config_input(AVFilterLink *inlink) PLANE_Y | ((desc->nb_components > 2) ? PLANE_U|PLANE_V : 0)) | ((desc->flags & AV_PIX_FMT_FLAG_ALPHA) ? PLANE_A : 0); -if (e->requested_planes & ~plane_avail) { +if (s->requested_planes & ~plane_avail) { av_log(ctx, AV_LOG_ERROR, "Requested planes not available.\n"); return AVERROR(EINVAL); } -if ((ret = av_image_fill_linesizes(e->linesize, inlink->format, inlink->w)) < 0) +if ((ret = av_image_fill_linesizes(s->linesize, inlink->format, inlink->w)) < 0) return ret; -e->depth = (desc->comp[0].depth_minus1 + 1) >> 3; -e->step = av_get_padded_bits_per_pixel(desc) >> 3; -e->is_packed_rgb = !(desc->flags & AV_PIX_FMT_FLAG_PLANAR); +s->depth = (desc->comp[0].depth_minus1 + 1) >> 3; +s->step = av_get_padded_bits_per_pixel(desc) >> 3; +s->is_packed_rgb = !(desc->flags & AV_PIX_FMT_FLAG_PLANAR); if (desc->flags & AV_PIX_FMT_FLAG_RGB) { ff_fill_rgba_map(rgba_map, inlink->format); for (i = 0; i < 4; i++) -e->map[i] = rgba_map[e->map[i]]; +s->map[i] = rgba_map[s->map[i]]; } return 0; @@ -166,11 +166,11 @@ static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; AVFilterLink *inlink = ctx->inputs[0]; -ExtractPlanesContext *e = ctx->priv; +ExtractPlanesContext *s = ctx->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format); const int output = outlink->srcpad - ctx->output_pads; -if (e->map[output] == 1 || e->map[output] == 2) { +if (s->map[output] == 1 || s->map[output] == 2) { outlink->h = FF_CEIL_RSHIFT(inlink->h, desc->log2_chroma_h); outlink->w = FF_CEIL_RSHIFT(inlink->w, desc->log2_chroma_w); } @@ -206,12 +206,12 @@ static void extract_from_packed(uint8_t *dst, int dst_linesize, static int filter_frame(AVFilterLink *inlink, AVFrame *frame) { AVFilterContext *ctx = inlink->dst; -ExtractPlanesContext *e = ctx->priv; +ExtractPlanesContext *s = ctx->priv; int i, eof = 0, ret = 0; for (i = 0; i < ctx->nb_outputs; i++) { AVFilterLink *outlink = ctx->outputs[i]; -const int idx = e->map[i]; +const int idx = s->map[i]; AVFrame *out; if (outlink->closed) @@ -224,16 +224,16 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) } av_frame_copy_props(out, frame); -if (e->is_packed_rgb) { +if (s->is_packed_rgb) { extract_from_packed(out->data[0], out->linesize[0], frame->data[0], frame->linesize[0], outlink->w, outlink->h, -e->depth, -e->step, idx); +s->depth, +s->step, idx); } else { av_image_copy_plane(out->data[0], out->linesize[0], frame->data[idx], frame->linesize[idx], -e->linesize[idx], outlink->h); +s->linesize[idx], outlink->h); } ret = ff_filter_frame(outlink, out); @@ -253,8 +253,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) static av_cold int init(AVFilterContext *ctx) { -ExtractPlanesContext *e = ctx->priv; -int planes = (e->requested_planes & 0xf) | (e->requested_planes >> 4); +ExtractPlanesContext *s = ctx->priv; +int planes = (s->requested_planes & 0xf) | (s->requested_planes >> 4); int i; for (i = 0; i < 4; i++) { @@ -267,7 +267,7 @@ static av_cold int init(AVFilterContext *ctx) name = av_asprintf("out%d", ctx->nb_outputs); if (!name)
[FFmpeg-cvslog] avfilter/vf_colorbalance: use the name 's' for the pointer to the private context
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 14:11:30 2015 +| [231bf4d1c21cb3b2678cd2b7cf5a64314c5bb63d] | committer: Paul B Mahol avfilter/vf_colorbalance: use the name 's' for the pointer to the private context Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=231bf4d1c21cb3b2678cd2b7cf5a64314c5bb63d --- libavfilter/vf_colorbalance.c | 48 - 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index c151c33..c8f2747 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -84,7 +84,7 @@ static int query_formats(AVFilterContext *ctx) static int config_output(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; -ColorBalanceContext *cb = ctx->priv; +ColorBalanceContext *s = ctx->priv; const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(outlink->format); double *shadows, *midtones, *highlights, *buffer; int i, r, g, b; @@ -110,27 +110,27 @@ static int config_output(AVFilterLink *outlink) for (i = 0; i < 256; i++) { r = g = b = i; -r = av_clip_uint8(r + cb->cyan_red.shadows * shadows[r]); -r = av_clip_uint8(r + cb->cyan_red.midtones* midtones[r]); -r = av_clip_uint8(r + cb->cyan_red.highlights * highlights[r]); +r = av_clip_uint8(r + s->cyan_red.shadows * shadows[r]); +r = av_clip_uint8(r + s->cyan_red.midtones* midtones[r]); +r = av_clip_uint8(r + s->cyan_red.highlights * highlights[r]); -g = av_clip_uint8(g + cb->magenta_green.shadows* shadows[g]); -g = av_clip_uint8(g + cb->magenta_green.midtones * midtones[g]); -g = av_clip_uint8(g + cb->magenta_green.highlights * highlights[g]); +g = av_clip_uint8(g + s->magenta_green.shadows* shadows[g]); +g = av_clip_uint8(g + s->magenta_green.midtones * midtones[g]); +g = av_clip_uint8(g + s->magenta_green.highlights * highlights[g]); -b = av_clip_uint8(b + cb->yellow_blue.shadows * shadows[b]); -b = av_clip_uint8(b + cb->yellow_blue.midtones * midtones[b]); -b = av_clip_uint8(b + cb->yellow_blue.highlights * highlights[b]); +b = av_clip_uint8(b + s->yellow_blue.shadows * shadows[b]); +b = av_clip_uint8(b + s->yellow_blue.midtones * midtones[b]); +b = av_clip_uint8(b + s->yellow_blue.highlights * highlights[b]); -cb->lut[R][i] = r; -cb->lut[G][i] = g; -cb->lut[B][i] = b; +s->lut[R][i] = r; +s->lut[G][i] = g; +s->lut[B][i] = b; } av_free(buffer); -ff_fill_rgba_map(cb->rgba_map, outlink->format); -cb->step = av_get_padded_bits_per_pixel(desc) >> 3; +ff_fill_rgba_map(s->rgba_map, outlink->format); +s->step = av_get_padded_bits_per_pixel(desc) >> 3; return 0; } @@ -138,13 +138,13 @@ static int config_output(AVFilterLink *outlink) static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; -ColorBalanceContext *cb = ctx->priv; +ColorBalanceContext *s = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; -const uint8_t roffset = cb->rgba_map[R]; -const uint8_t goffset = cb->rgba_map[G]; -const uint8_t boffset = cb->rgba_map[B]; -const uint8_t aoffset = cb->rgba_map[A]; -const int step = cb->step; +const uint8_t roffset = s->rgba_map[R]; +const uint8_t goffset = s->rgba_map[G]; +const uint8_t boffset = s->rgba_map[B]; +const uint8_t aoffset = s->rgba_map[A]; +const int step = s->step; const uint8_t *srcrow = in->data[0]; uint8_t *dstrow; AVFrame *out; @@ -167,9 +167,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) uint8_t *dst = dstrow; for (j = 0; j < outlink->w * step; j += step) { -dst[j + roffset] = cb->lut[R][src[j + roffset]]; -dst[j + goffset] = cb->lut[G][src[j + goffset]]; -dst[j + boffset] = cb->lut[B][src[j + boffset]]; +dst[j + roffset] = s->lut[R][src[j + roffset]]; +dst[j + goffset] = s->lut[G][src[j + goffset]]; +dst[j + boffset] = s->lut[B][src[j + boffset]]; if (in != out && step == 4) dst[j + aoffset] = src[j + aoffset]; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_fspp: Fix frame-alignment in FSPP
ffmpeg | branch: master | Arwa Arif | Wed Jan 28 19:51:19 2015 +0530| [622936424c69698159582902534591722ccd58fb] | committer: Michael Niedermayer avfilter/vf_fspp: Fix frame-alignment in FSPP Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=622936424c69698159582902534591722ccd58fb --- libavfilter/vf_fspp.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c index fe15db0..a4c8a95 100644 --- a/libavfilter/vf_fspp.c +++ b/libavfilter/vf_fspp.c @@ -626,6 +626,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return AVERROR(ENOMEM); } av_frame_copy_props(out, in); +out->width = in->width; +out->height = in->height; } filter(fspp, out->data[0], in->data[0], out->linesize[0], in->linesize[0], ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/x86/vf_fspp: Fix loop condition for column_fidct()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 16:30:44 2015 +0100| [a6f9a5d0f63500564d857df12269a1c6e43bd563] | committer: Michael Niedermayer avfilter/x86/vf_fspp: Fix loop condition for column_fidct() Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a6f9a5d0f63500564d857df12269a1c6e43bd563 --- libavfilter/x86/vf_fspp.asm |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/x86/vf_fspp.asm b/libavfilter/x86/vf_fspp.asm index fbf531b..e88feb9 100644 --- a/libavfilter/x86/vf_fspp.asm +++ b/libavfilter/x86/vf_fspp.asm @@ -472,13 +472,13 @@ cglobal column_fidct, 4, 5, 0, 32, thr, src, out, cnt, tmp .fdct2: COLUMN_FDCT .idct2, 8, 16 subcntd, 2 -jnz .fdct1 +jg .fdct1 RET .idct2: COLUMN_IDCT 16 subcntd, 2 -jnz .fdct1 +jg .fdct1 RET ;void ff_row_idct_mmx(int16_t *workspace, int16_t *output_adr, ptrdiff_t output_stride, int cnt); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_fspp: check count before calling row_idct()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 16:26:00 2015 +0100| [375a0273cec41a329c9cca01fb8805e9a0dc3d72] | committer: Michael Niedermayer avfilter/vf_fspp: check count before calling row_idct() Fixes crash with odd widths Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=375a0273cec41a329c9cca01fb8805e9a0dc3d72 --- libavfilter/vf_fspp.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_fspp.c b/libavfilter/vf_fspp.c index a4c8a95..e4de0f5 100644 --- a/libavfilter/vf_fspp.c +++ b/libavfilter/vf_fspp.c @@ -221,7 +221,8 @@ static void filter(FSPPContext *p, uint8_t *dst, uint8_t *src, p->row_fdct(block + 8 * 8, p->src + y * stride + 8 + x0 + 2 - (y & 1), stride, (es - 4) >> 2); p->column_fidct((int16_t *)(&p->threshold_mtx[0]), block, block3, es&(~1)); -p->row_idct(block3 + 0 * 8, p->temp + (y & 15) * stride + x0 + 2 - (y & 1), stride, es >> 2); +if (es > 3) +p->row_idct(block3 + 0 * 8, p->temp + (y & 15) * stride + x0 + 2 - (y & 1), stride, es >> 2); if (!(y1 & 7) && y1) { if (y1 & 8) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/nsvdec: remove case which is no longer possible
ffmpeg | branch: master | Paul B Mahol | Wed Jan 28 09:34:31 2015 +| [c099783316cf706c61e97256778fb77635f5e6e8] | committer: Paul B Mahol avformat/nsvdec: remove case which is no longer possible Check of channels !=0 is right above. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c099783316cf706c61e97256778fb77635f5e6e8 --- libavformat/nsvdec.c |5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c index 531e273..632667c 100644 --- a/libavformat/nsvdec.c +++ b/libavformat/nsvdec.c @@ -630,10 +630,7 @@ null_chunk_retry: if (bps != 16) { av_dlog(s, "NSV AUDIO bit/sample != 16 (%d)!!!\n", bps); } -if(channels) -bps /= channels; // ??? -else -av_log(s, AV_LOG_WARNING, "Channels is 0\n"); +bps /= channels; // ??? if (bps == 8) st[NSV_ST_AUDIO]->codec->codec_id = AV_CODEC_ID_PCM_U8; samplerate /= 4;/* UGH ??? XXX */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '6a808f5ae17f1fcdbcfb18055872c12aef70ffff'
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 20:29:12 2015 +0100| [37984ca13334f1715d33fd490ef243aea6c97c09] | committer: Michael Niedermayer Merge commit '6a808f5ae17f1fcdbcfb18055872c12aef70' * commit '6a808f5ae17f1fcdbcfb18055872c12aef70': libdc1394: Add support for MONO8 (gray) video mode Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=37984ca13334f1715d33fd490ef243aea6c97c09 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libdc1394: Add support for MONO8 (gray) video mode
ffmpeg | branch: master | Clay McClure | Sun Jan 4 00:30:44 2015 -0700| [6a808f5ae17f1fcdbcfb18055872c12aef70] | committer: Luca Barbato libdc1394: Add support for MONO8 (gray) video mode Signed-off-by: Luca Barbato > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6a808f5ae17f1fcdbcfb18055872c12aef70 --- libavdevice/libdc1394.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c index f030e3e..cc348d4 100644 --- a/libavdevice/libdc1394.c +++ b/libavdevice/libdc1394.c @@ -75,6 +75,7 @@ struct dc1394_frame_format { int frame_size_id; } dc1394_frame_formats[] = { { 320, 240, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_320x240_YUV422 }, +{ 640, 480, AV_PIX_FMT_GRAY8, DC1394_VIDEO_MODE_640x480_MONO8 }, { 640, 480, AV_PIX_FMT_UYYVYY411, DC1394_VIDEO_MODE_640x480_YUV411 }, { 640, 480, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_640x480_YUV422 }, { 0, 0, 0, 0 } /* gotta be the last one */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avio: Do not consider the end-of-buffer position valid
ffmpeg | branch: master | Luca Barbato | Sat Jan 24 13:06:19 2015 +0100| [3c18a7b18807de81566381a1bcbe9f6103c0296b] | committer: Luca Barbato avio: Do not consider the end-of-buffer position valid Trigger a refill if the seek action moves the pointer at the end of the buffer. Before this patch the read action following the seek would trigger the refill, while write action would write outside the buffer. In the Libav codebase few muxers seek forward outside of what already has been written so it is quite unlikely to experience the problem with the default buffer size. CC: libav-sta...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c18a7b18807de81566381a1bcbe9f6103c0296b --- libavformat/aviobuf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 6923b78..5f848b2 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -206,7 +206,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) } offset1 = offset - pos; if (!s->must_flush && -offset1 >= 0 && offset1 <= (s->buf_end - s->buffer)) { +offset1 >= 0 && offset1 < (s->buf_end - s->buffer)) { /* can do the seek inside the buffer */ s->buf_ptr = s->buffer + offset1; } else if ((!s->seekable || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat/aviobuf: Allow seeking to the end of the buffer for read only buffers
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 20:55:42 2015 +0100| [58ed1528574f7e8bfa916b1e03b1406908ebc9f5] | committer: Michael Niedermayer avformat/aviobuf: Allow seeking to the end of the buffer for read only buffers This undoes the effect of 3c18a7b18807de81566381a1bcbe9f6103c0296b for reading Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=58ed1528574f7e8bfa916b1e03b1406908ebc9f5 --- libavformat/aviobuf.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 6a1f83a..3d77a7f 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -228,7 +228,7 @@ int64_t avio_seek(AVIOContext *s, int64_t offset, int whence) offset1 = offset - pos; if (!s->must_flush && (!s->direct || !s->seek) && -offset1 >= 0 && offset1 < buffer_size) { +offset1 >= 0 && offset1 <= buffer_size - s->write_flag) { /* can do the seek inside the buffer */ s->buf_ptr = s->buffer + offset1; } else if ((!s->seekable || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '3c18a7b18807de81566381a1bcbe9f6103c0296b'
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 20:37:28 2015 +0100| [0b4fc4bacd866b14b74bcfb1656a1f469da6ad46] | committer: Michael Niedermayer Merge commit '3c18a7b18807de81566381a1bcbe9f6103c0296b' * commit '3c18a7b18807de81566381a1bcbe9f6103c0296b': avio: Do not consider the end-of-buffer position valid Conflicts: libavformat/aviobuf.c Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0b4fc4bacd866b14b74bcfb1656a1f469da6ad46 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '61928b68dc28e080b8c8191afe5541123c682bbd'
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 28 22:41:39 2015 +0100| [72db3c79dfddbeae82c540c785c680654a77b063] | committer: Michael Niedermayer Merge commit '61928b68dc28e080b8c8191afe5541123c682bbd' * commit '61928b68dc28e080b8c8191afe5541123c682bbd': h264: Do not share rbsp_buffer across threads Conflicts: libavcodec/h264.c See: ecbf838c7d81ebd3b89fe75d83ff29150dbda27a Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72db3c79dfddbeae82c540c785c680654a77b063 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: Do not share rbsp_buffer across threads
ffmpeg | branch: master | Michael Niedermayer | Sun Aug 25 03:01:19 2013 +0200| [61928b68dc28e080b8c8191afe5541123c682bbd] | committer: Luca Barbato h264: Do not share rbsp_buffer across threads Signed-off-by: Luca Barbato CC: libav-sta...@libav.org > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61928b68dc28e080b8c8191afe5541123c682bbd --- libavcodec/h264.c |4 1 file changed, 4 insertions(+) diff --git a/libavcodec/h264.c b/libavcodec/h264.c index be0dca4..c70b259 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -685,6 +685,10 @@ static int decode_init_thread_copy(AVCodecContext *avctx) memset(h->sps_buffers, 0, sizeof(h->sps_buffers)); memset(h->pps_buffers, 0, sizeof(h->pps_buffers)); +h->rbsp_buffer[0] = NULL; +h->rbsp_buffer[1] = NULL; +h->rbsp_buffer_size[0] = 0; +h->rbsp_buffer_size[1] = 0; h->context_initialized = 0; return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavutil: Added twofish symmetric block cipher
ffmpeg | branch: master | Supraja Meedinti | Mon Jan 26 00:27:20 2015 +0530| [6ad749b5335444e5ca2223997d2ab2a215363327] | committer: Michael Niedermayer libavutil: Added twofish symmetric block cipher Signed-off-by: Supraja Meedinti Reviewed-by: Giorgio Vazzana Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6ad749b5335444e5ca2223997d2ab2a215363327 --- Changelog |1 + libavutil/Makefile |3 + libavutil/twofish.c | 375 +++ libavutil/twofish.h | 70 ++ 4 files changed, 449 insertions(+) diff --git a/Changelog b/Changelog index 04f1728..109f4b1 100644 --- a/Changelog +++ b/Changelog @@ -16,6 +16,7 @@ version : - Closed caption Decoder - fspp, uspp, pp7 MPlayer postprocessing filters ported to native filters - showpalette filter +- Twofish symmetric block cipher version 2.5: diff --git a/libavutil/Makefile b/libavutil/Makefile index 4db89b8..6caf896 100644 --- a/libavutil/Makefile +++ b/libavutil/Makefile @@ -60,6 +60,7 @@ HEADERS = adler32.h \ time.h\ timecode.h\ timestamp.h \ + twofish.h \ version.h \ xtea.h\ @@ -129,6 +130,7 @@ OBJS = adler32.o \ time.o \ timecode.o \ tree.o \ + twofish.o\ utils.o \ xga_font_data.o \ xtea.o \ @@ -184,6 +186,7 @@ TESTPROGS = adler32 \ sha512 \ softfloat \ tree\ +twofish \ utf8\ xtea\ diff --git a/libavutil/twofish.c b/libavutil/twofish.c new file mode 100644 index 000..337c099 --- /dev/null +++ b/libavutil/twofish.c @@ -0,0 +1,375 @@ +/* + * An implementation of the TwoFish algorithm + * Copyright (c) 2015 Supraja Meedinti + * + * 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 "twofish.h" +#include "common.h" +#include "intreadwrite.h" +#include "attributes.h" + +#define LR(x, n) ((x) << (n) | (x) >> (32 - (n))) +#define RR(x, n) ((x) >> (n) | (x) << (32 - (n))) + +typedef struct AVTWOFISH { +uint32_t K[40]; +uint32_t S[4]; +int ksize; +} AVTWOFISH; + +static const uint8_t MD1[256] = { +0x00, 0x5b, 0xb6, 0xed, 0x05, 0x5e, 0xb3, 0xe8, 0x0a, 0x51, 0xbc, 0xe7, 0x0f, 0x54, 0xb9, 0xe2, +0x14, 0x4f, 0xa2, 0xf9, 0x11, 0x4a, 0xa7, 0xfc, 0x1e, 0x45, 0xa8, 0xf3, 0x1b, 0x40, 0xad, 0xf6, +0x28, 0x73, 0x9e, 0xc5, 0x2d, 0x76, 0x9b, 0xc0, 0x22, 0x79, 0x94, 0xcf, 0x27, 0x7c, 0x91, 0xca, +0x3c, 0x67, 0x8a, 0xd1, 0x39, 0x62, 0x8f, 0xd4, 0x36, 0x6d, 0x80, 0xdb, 0x33, 0x68, 0x85, 0xde, +0x50, 0x0b, 0xe6, 0xbd, 0x55, 0x0e, 0xe3, 0xb8, 0x5a, 0x01, 0xec, 0xb7, 0x5f, 0x04, 0xe9, 0xb2, +0x44, 0x1f, 0xf2, 0xa9, 0x41, 0x1a, 0xf7, 0xac, 0x4e, 0x15, 0xf8, 0xa3, 0x4b, 0x10, 0xfd, 0xa6, +0x78, 0x23, 0xce, 0x95, 0x7d, 0x26, 0xcb, 0x90, 0x72, 0x29, 0xc4, 0x9f, 0x77, 0x2c, 0xc1, 0x9a, +0x6c, 0x37, 0xda, 0x81, 0x69, 0x32, 0xdf, 0x84, 0x66, 0x3d, 0xd0, 0x8b, 0x63, 0x38, 0xd5, 0x8e, +0xa0, 0xfb, 0x16, 0x4d, 0xa5, 0xfe, 0x13
[FFmpeg-cvslog] Add an ARES atom to extradata when encoding avui.
ffmpeg | branch: master | Carl Eugen Hoyos | Thu Jan 29 01:07:08 2015 +0100| [3ea97767e49c599813d6a09c640a657d71c1a0de] | committer: Carl Eugen Hoyos Add an ARES atom to extradata when encoding avui. Allows playback with QuickTime and the original codec. Tested by Olaf Matthes, olaf matthes gmx de > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ea97767e49c599813d6a09c640a657d71c1a0de --- libavcodec/avuienc.c |9 +++-- libavcodec/version.h |2 +- tests/ref/vsynth/vsynth1-avui |4 ++-- tests/ref/vsynth/vsynth2-avui |4 ++-- tests/ref/vsynth/vsynth_lena-avui |4 ++-- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c index db640bb..4b1b408 100644 --- a/libavcodec/avuienc.c +++ b/libavcodec/avuienc.c @@ -22,6 +22,7 @@ #include "avcodec.h" #include "internal.h" +#include "libavutil/intreadwrite.h" static av_cold int avui_encode_init(AVCodecContext *avctx) { @@ -29,15 +30,19 @@ static av_cold int avui_encode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_ERROR, "Only 720x486 and 720x576 are supported.\n"); return AVERROR(EINVAL); } -if (!(avctx->extradata = av_mallocz(24 + FF_INPUT_BUFFER_PADDING_SIZE))) +if (!(avctx->extradata = av_mallocz(144 + FF_INPUT_BUFFER_PADDING_SIZE))) return AVERROR(ENOMEM); -avctx->extradata_size = 24; +avctx->extradata_size = 144; memcpy(avctx->extradata, "\0\0\0\x18""APRGAPRG0001", 16); if (avctx->field_order > AV_FIELD_PROGRESSIVE) { avctx->extradata[19] = 2; } else { avctx->extradata[19] = 1; } +memcpy(avctx->extradata + 24, "\0\0\0\x78""ARESARES0001""\0\0\0\x98", 20); +AV_WB32(avctx->extradata + 44, avctx->width); +AV_WB32(avctx->extradata + 48, avctx->height); +memcpy(avctx->extradata + 52, "\0\0\0\x1\0\0\0\x20\0\0\0\x2", 12); avctx->coded_frame = av_frame_alloc(); if (!avctx->coded_frame) { diff --git a/libavcodec/version.h b/libavcodec/version.h index dfb95e0..3827c38 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -30,7 +30,7 @@ #define LIBAVCODEC_VERSION_MAJOR 56 #define LIBAVCODEC_VERSION_MINOR 21 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/tests/ref/vsynth/vsynth1-avui b/tests/ref/vsynth/vsynth1-avui index 53591e1..1f08053 100644 --- a/tests/ref/vsynth/vsynth1-avui +++ b/tests/ref/vsynth/vsynth1-avui @@ -1,4 +1,4 @@ -87ef06cbd15934c282d4aa83e2a5cf0a *tests/data/fate/vsynth1-avui.mov -42624917 tests/data/fate/vsynth1-avui.mov +25ef49e1aee0b20d4feee89b8dc093b4 *tests/data/fate/vsynth1-avui.mov +42625037 tests/data/fate/vsynth1-avui.mov c5ccac874dbf808e9088bc3107860042 *tests/data/fate/vsynth1-avui.out.rawvideo stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth2-avui b/tests/ref/vsynth/vsynth2-avui index 1500386..2423916 100644 --- a/tests/ref/vsynth/vsynth2-avui +++ b/tests/ref/vsynth/vsynth2-avui @@ -1,4 +1,4 @@ -4d46be4cf21d2f0dc0a857bb2603b899 *tests/data/fate/vsynth2-avui.mov -42624917 tests/data/fate/vsynth2-avui.mov +8f6ab410bb6b5dc4599e12968dbd0366 *tests/data/fate/vsynth2-avui.mov +42625037 tests/data/fate/vsynth2-avui.mov 36d7ca943916e1743cefa609eba0205c *tests/data/fate/vsynth2-avui.out.rawvideo stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 diff --git a/tests/ref/vsynth/vsynth_lena-avui b/tests/ref/vsynth/vsynth_lena-avui index 02154a6..c2fced8 100644 --- a/tests/ref/vsynth/vsynth_lena-avui +++ b/tests/ref/vsynth/vsynth_lena-avui @@ -1,4 +1,4 @@ -df5efcfd2170df82e466be4deb7ce4a9 *tests/data/fate/vsynth_lena-avui.mov -42624917 tests/data/fate/vsynth_lena-avui.mov +26805e15d9e732cd24aea91ae564d5c3 *tests/data/fate/vsynth_lena-avui.mov +42625037 tests/data/fate/vsynth_lena-avui.mov dde5895817ad9d219f79a52d0bdfb001 *tests/data/fate/vsynth_lena-avui.out.rawvideo stddev:0.00 PSNR:999.99 MAXDIFF:0 bytes: 7603200/ 7603200 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge remote-tracking branch 'cehoyos/master'
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 29 03:02:04 2015 +0100| [4155f2d7cc6a6413bbc6c40741e4d07e6612cac5] | committer: Michael Niedermayer Merge remote-tracking branch 'cehoyos/master' * cehoyos/master: Add an ARES atom to extradata when encoding avui. Merged-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4155f2d7cc6a6413bbc6c40741e4d07e6612cac5 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Fix frame-alignment in PP7
ffmpeg | branch: master | Arwa Arif | Wed Jan 28 19:53:06 2015 +0530| [a21acd554a253d8515f54f84526eae5aa867ae07] | committer: Michael Niedermayer Fix frame-alignment in PP7 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a21acd554a253d8515f54f84526eae5aa867ae07 --- libavfilter/vf_pp7.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index 3f8e746..0a70902 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -347,6 +347,8 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return AVERROR(ENOMEM); } av_frame_copy_props(out, in); +out->width = in->width; +out->height = in->height; } if (qp_table || pp7->qp) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog