[FFmpeg-devel] [PATCH 1/5] avfilter/formats: remove unused COPY_INT_LIST() macro
This macro is unused since 247fa6c27c4589d0f7a427c520d782edbb6de060. --- libavfilter/formats.c | 12 1 file changed, 12 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index f25328c..1fc7fa6 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -262,18 +262,6 @@ int ff_fmt_is_in(int fmt, const int *fmts) return 0; } -#define COPY_INT_LIST(list_copy, list, type) { \ -int count = 0; \ -if (list) \ -for (count = 0; list[count] != -1; count++) \ -; \ -list_copy = av_calloc(count+1, sizeof(type)); \ -if (list_copy) {\ -memcpy(list_copy, list, sizeof(type) * count); \ -list_copy[count] = -1; \ -} \ -} - #define MAKE_FORMAT_LIST(type, field, count_field) \ type *formats; \ int count = 0; \ -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 4/5] avfilter/formats: proper error handling in ff_set_common_*() functions
--- libavfilter/formats.c | 45 - libavfilter/formats.h | 10 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 6393416..4f9773b 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -401,7 +401,12 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) } #define FORMATS_REF(f, ref) \ -void *tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ +void *tmp; \ + \ +if (!ref) \ +return AVERROR_BUG; \ + \ +tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ if (!tmp) \ return AVERROR(ENOMEM); \ f-refs = tmp; \ @@ -485,18 +490,24 @@ void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref) } #define SET_COMMON_FORMATS(ctx, fmts, in_fmts, out_fmts, ref, list) \ -if (fmts) { \ int count = 0, i; \ \ +if (!fmts) \ +return AVERROR_BUG; \ +\ for (i = 0; i ctx-nb_inputs; i++) { \ if (ctx-inputs[i] !ctx-inputs[i]-out_fmts) { \ -ref(fmts, ctx-inputs[i]-out_fmts); \ +int ret = ref(fmts, ctx-inputs[i]-out_fmts); \ +if (ret 0)\ +return ret; \ count++;\ } \ } \ for (i = 0; i ctx-nb_outputs; i++) { \ if (ctx-outputs[i] !ctx-outputs[i]-in_fmts) { \ -ref(fmts, ctx-outputs[i]-in_fmts); \ +int ret = ref(fmts, ctx-outputs[i]-in_fmts); \ +if (ret 0)\ +return ret; \ count++;\ } \ } \ @@ -506,17 +517,18 @@ if (fmts) { \ av_freep(fmts-refs); \ av_freep(fmts);\ } \ -} +\ +return 0; -void ff_set_common_channel_layouts(AVFilterContext *ctx, - AVFilterChannelLayouts *layouts) +int ff_set_common_channel_layouts(AVFilterContext *ctx, + AVFilterChannelLayouts *layouts) { SET_COMMON_FORMATS(ctx, layouts, in_channel_layouts, out_channel_layouts, ff_channel_layouts_ref, channel_layouts); } -void ff_set_common_samplerates(AVFilterContext *ctx, - AVFilterFormats *samplerates) +int ff_set_common_samplerates(AVFilterContext *ctx, + AVFilterFormats *samplerates) { SET_COMMON_FORMATS(ctx, samplerates, in_samplerates, out_samplerates, ff_formats_ref, formats); @@ -527,7 +539,7 @@ void ff_set_common_samplerates(AVFilterContext *ctx, * formats. If there are no links hooked to this filter, the list of formats is * freed. */ -void ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) +int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) { SET_COMMON_FORMATS(ctx, formats, in_formats, out_formats, ff_formats_ref, formats); @@ -536,14 +548,21 @@ void ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) static int default_query_formats_common(AVFilterContext *ctx, AVFilterChannelLayouts
[FFmpeg-devel] [PATCH 5/5] avfilter: handle error in query_formats() of a bunch of random video filters
--- libavfilter/f_select.c | 9 - libavfilter/vf_codecview.c | 6 -- libavfilter/vf_colorbalance.c | 7 --- libavfilter/vf_colormatrix.c| 8 libavfilter/vf_curves.c | 6 -- libavfilter/vf_dctdnoiz.c | 6 -- libavfilter/vf_decimate.c | 6 -- libavfilter/vf_delogo.c | 7 --- libavfilter/vf_deshake.c| 8 libavfilter/vf_drawbox.c| 7 --- libavfilter/vf_edgedetect.c | 15 ++- libavfilter/vf_elbg.c | 8 libavfilter/vf_eq.c | 8 libavfilter/vf_fieldmatch.c | 6 -- libavfilter/vf_gradfun.c| 8 libavfilter/vf_histeq.c | 7 --- libavfilter/vf_hqdn3d.c | 8 libavfilter/vf_hqx.c| 6 -- libavfilter/vf_hue.c| 8 libavfilter/vf_idet.c | 8 libavfilter/vf_lenscorrection.c | 7 --- libavfilter/vf_libopencv.c | 7 --- libavfilter/vf_lut.c| 7 --- libavfilter/vf_lut3d.c | 6 -- libavfilter/vf_mcdeint.c| 8 libavfilter/vf_mpdecimate.c | 8 libavfilter/vf_owdenoise.c | 6 -- 27 files changed, 118 insertions(+), 83 deletions(-) diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 546a940..3e7cf78 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -416,11 +416,18 @@ static int query_formats(AVFilterContext *ctx) if (!select-do_scene_detect) { return ff_default_query_formats(ctx); } else { +int ret; static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }; -ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); +AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); + +if (!fmts_list) +return AVERROR(ENOMEM); +ret = ff_set_common_formats(ctx, fmts_list); +if (ret 0) +return ret; } return 0; } diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index d777f97..27fac3f 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -62,8 +62,10 @@ static int query_formats(AVFilterContext *ctx) // TODO: we can probably add way more pixel formats without any other // changes; anything with 8-bit luma in first plane should be working static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE}; -ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); -return 0; +AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); +if (!fmts_list) +return AVERROR(ENOMEM); +return ff_set_common_formats(ctx, fmts_list); } static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx) diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index c8f2747..e37f199 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -76,9 +76,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, AV_PIX_FMT_NONE }; - -ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); -return 0; +AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); +if (!fmts_list) +return AVERROR(ENOMEM); +return ff_set_common_formats(ctx, fmts_list); } static int config_output(AVFilterLink *outlink) diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index f5835cb..cec0e3a 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -353,10 +353,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE }; - -ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); - -return 0; +AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); +if (!fmts_list) +return AVERROR(ENOMEM); +return ff_set_common_formats(ctx, fmts_list); } static int filter_frame(AVFilterLink *link, AVFrame *in) diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index 29b469f..1c51c1b 100644 --- a/libavfilter/vf_curves.c +++ b/libavfilter/vf_curves.c @@ -464,8 +464,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, AV_PIX_FMT_NONE }; -ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); -return 0; +AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); +if (!fmts_list) +return AVERROR(ENOMEM); +return ff_set_common_formats(ctx, fmts_list); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index 098a119..37306bb 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -600,8 +600,10 @@ static int query_formats(AVFilterContext *ctx)
[FFmpeg-devel] [PATCH 3/5] avfilter/formats: proper error handling in ff_channel_layouts_ref() and ff_formats_ref()
Also make sure the allocation and its check are properly done. --- libavfilter/formats.c | 22 +++--- libavfilter/formats.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 896ceeb..6393416 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -400,21 +400,21 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) return ret; } -#define FORMATS_REF(f, ref) \ -do { \ -*ref = f;\ -f-refs = av_realloc(f-refs, sizeof(*f-refs) * ++f-refcount); \ -if (!f-refs)\ -return; \ -f-refs[f-refcount-1] = ref;\ -} while (0) - -void ff_channel_layouts_ref(AVFilterChannelLayouts *f, AVFilterChannelLayouts **ref) +#define FORMATS_REF(f, ref) \ +void *tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ +if (!tmp) \ +return AVERROR(ENOMEM); \ +f-refs = tmp; \ +f-refs[f-refcount++] = ref; \ +*ref = f; \ +return 0 + +int ff_channel_layouts_ref(AVFilterChannelLayouts *f, AVFilterChannelLayouts **ref) { FORMATS_REF(f, ref); } -void ff_formats_ref(AVFilterFormats *f, AVFilterFormats **ref) +int ff_formats_ref(AVFilterFormats *f, AVFilterFormats **ref) { FORMATS_REF(f, ref); } diff --git a/libavfilter/formats.h b/libavfilter/formats.h index 468eac8..f94855d 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -159,8 +159,8 @@ int ff_add_channel_layout(AVFilterChannelLayouts **l, uint64_t channel_layout); /** * Add *ref as a new reference to f. */ -void ff_channel_layouts_ref(AVFilterChannelLayouts *f, -AVFilterChannelLayouts **ref); +int ff_channel_layouts_ref(AVFilterChannelLayouts *f, + AVFilterChannelLayouts **ref); /** * Remove a reference to a channel layouts list. @@ -233,7 +233,7 @@ AVFilterFormats *ff_merge_formats(AVFilterFormats *a, AVFilterFormats *b, * | || || || * ||| */ -void ff_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref); +int ff_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref); /** * If *ref is non-NULL, remove *ref as a reference to the format list -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/5] avfilter/formats: use av_realloc_array in ADD_FORMAT()
--- libavfilter/formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 1fc7fa6..896ceeb 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -308,8 +308,8 @@ do { \ if (!(*f) !(*f = av_mallocz(sizeof(**f \ return AVERROR(ENOMEM); \ \ -fmts = av_realloc((*f)-list, \ - sizeof(*(*f)-list) * ((*f)-nb + 1));\ +fmts = av_realloc_array((*f)-list, (*f)-nb + 1, \ +sizeof(*(*f)-list)); \ if (!fmts) {\ if (!oldf) \ av_freep(f);\ -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi/eq: factorize code in process_command through a macro
On date Friday 2015-03-13 20:05:35 +0100, Michael Niedermayer encoded: On Fri, Mar 13, 2015 at 05:16:53PM +0100, Stefano Sabatini wrote: --- libavfilter/vf_eq.c | 56 ++--- 1 file changed, 15 insertions(+), 41 deletions(-) i would be more in favor of a function than a macro but LGTM either way, macros are harder to debug and all kind of line number based outputs are basically useless with multiline macros, be that static analyzers of dynamic ... set_param(cmd, gamma_g, eq-gamma_g_pexp, args, ctx, eq, ret); set_param(cmd, gamma_r, eq-gamma_r_pexp, args, ctx, eq, ret); if (ret 0) Up. -- FFmpeg = Fantastic Fundamental Miracolous Patchable Elitarian Gargoyle From ee2157da84a30e043dfa55cf25a86ef751451bba Mon Sep 17 00:00:00 2001 From: Stefano Sabatini stefa...@gmail.com Date: Fri, 13 Mar 2015 16:45:08 +0100 Subject: [PATCH] lavfi/eq: factorize code in process_command() --- libavfilter/vf_eq.c | 66 +++-- 1 file changed, 23 insertions(+), 43 deletions(-) diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index a370032..5ce59cb 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -276,54 +276,34 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) return ff_filter_frame(outlink, out); } +static inline int set_param(AVExpr **pexpr, const char *args, const char *cmd, +void (*set_fn)(EQContext *eq), AVFilterContext *ctx) +{ +EQContext *eq = ctx-priv; +int ret; +if ((ret = set_expr(pexpr, args, cmd, ctx)) 0) +return ret; +set_fn(eq); +return 0; +} + static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags) { EQContext *eq = ctx-priv; -int ret; -if (!strcmp(cmd, contrast)) { -ret = set_expr(eq-contrast_pexpr, args, cmd, ctx); -set_contrast(eq); -return ret; -} -else if (!strcmp(cmd, brightness)) { -ret = set_expr(eq-brightness_pexpr, args, cmd, ctx); -set_brightness(eq); -return ret; -} -else if (!strcmp(cmd, saturation)) { -ret = set_expr(eq-saturation_pexpr, args, cmd, ctx); -set_saturation(eq); -return ret; -} -else if (!strcmp(cmd, gamma)) { -ret = set_expr(eq-gamma_pexpr, args, cmd, ctx); -set_gamma(eq); -return ret; -} -else if (!strcmp(cmd, gamma_r)) { -ret = set_expr(eq-gamma_r_pexpr, args, cmd, ctx); -set_gamma(eq); -return ret; -} -else if (!strcmp(cmd, gamma_g)) { -ret = set_expr(eq-gamma_g_pexpr, args, cmd, ctx); -set_gamma(eq); -return ret; -} -else if (!strcmp(cmd, gamma_b)) { -ret = set_expr(eq-gamma_b_pexpr, args, cmd, ctx); -set_gamma(eq); -return ret; -} -else if (!strcmp(cmd, gamma_weight)) { -ret = set_expr(eq-gamma_weight_pexpr, args, cmd, ctx); -set_gamma(eq); -return ret; -} -else -return AVERROR(ENOSYS); +#define SET_PARAM(param_name, set_fn_name) \ +if (!strcmp(cmd, #param_name)) return set_param(eq-param_name##_pexpr, args, cmd, set_##set_fn_name, ctx); + + SET_PARAM(contrast, contrast) +else SET_PARAM(brightness, brightness) +else SET_PARAM(saturation, saturation) +else SET_PARAM(gamma, gamma) +else SET_PARAM(gamma_r, gamma) +else SET_PARAM(gamma_g, gamma) +else SET_PARAM(gamma_b, gamma) +else SET_PARAM(gamma_weight, gamma) +else return AVERROR(ENOSYS); } static const AVFilterPad eq_inputs[] = { -- 1.8.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/mxfenc: write user comment metadata
On Sat, 2015-03-14 at 17:59 -0700, Mark Reid wrote: --- libavformat/mxfenc.c | 66 +-- tests/ref/lavf/mxf| 6 ++--- tests/ref/lavf/mxf_d10| 2 +- tests/ref/lavf/mxf_opatom | 2 +- 4 files changed, 69 insertions(+), 7 deletions(-) Looks OK /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] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe()
在 2015/3/15 20:38, Michael Niedermayer 写道: On Sun, Mar 15, 2015 at 04:46:22PM +0800, zhaoxiu.zeng wrote: From 60cdc9161881cdf86e428a0d6812785938ae6667 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:56:53 +0800 Subject: [PATCH 2/7] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/mpegvideodec.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index ade76d8..c2fa6c2 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -24,6 +24,7 @@ #include rawdec.h #include libavutil/intreadwrite.h +#include libavcodec/internal.h #define SEQ_START_CODE 0x01b3 #define GOP_START_CODE 0x01b8 @@ -37,33 +38,30 @@ static int mpegvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice=0, pspack=0, vpes=0, apes=0, res=0, sicle=0; -int i, j; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; uint32_t last = 0; +int j; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { -switch(code){ +switch (code) { case SEQ_START_CODE: -if (!(p-buf[i+1+3+1+2] 0x20)) +if (!(ptr[3 + 1 + 2] 0x20)) break; -j = i; -if (p-buf[j+8] 2) -j+= 64; -if (j = p-buf_size) +j = -1 + (ptr[-1 + 8] 2) * 32; +if (ptr + j = end) break; -if (p-buf[j+8] 1) -j+= 64; -if (j = p-buf_size) +j += (ptr[j + 8] 1) * 64; +if (ptr + j = end) break; -if (AV_RB24(p-buf + j + 9) 0xFE) +if (AV_RB24(ptr + j + 9) 0xFE) break; seq++; -break; -case PICTURE_START_CODE: pic++; break; +break; +case PICTURE_START_CODE:pic++; break; casePACK_START_CODE: pspack++; break; -case 0x1b6: -res++; break; +case 0x1b6:res++; break; } if (code = SLICE_START_CODE code = 0x1af) { if (last = SLICE_START_CODE last = 0x1af) { cleaned up and applied also please do not mix unrelated cosmetic changes in the code see for example the diff with these cosmetics removed, which i applied its much more readable: (this is important for being reviewable) I see! Thanks! diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index ade76d86..5ea5569 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -24,6 +24,7 @@ #include rawdec.h #include libavutil/intreadwrite.h +#include libavcodec/internal.h #define SEQ_START_CODE 0x01b3 #define GOP_START_CODE 0x01b8 @@ -37,26 +38,27 @@ static int mpegvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice=0, pspack=0, vpes=0, apes=0, res=0, sicle=0; -int i, j; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; uint32_t last = 0; +int j; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { switch(code){ case SEQ_START_CODE: -if (!(p-buf[i+1+3+1+2] 0x20)) +if (!(ptr[3 + 1 + 2] 0x20)) break; -j = i; -if (p-buf[j+8] 2) +j = -1; +if (ptr[j + 8] 2) j+= 64; -if (j = p-buf_size) +if (ptr + j = end) break; -if (p-buf[j+8] 1) +if (ptr[j + 8] 1) j+= 64; -if (j = p-buf_size) +if (ptr + j = end) break; -if (AV_RB24(p-buf + j + 9) 0xFE) +if (AV_RB24(ptr + j + 9) 0xFE) break; seq++; break; [...] ___ 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] avformat/avidec: use avpriv_find_start_code in avi_read_packet()
From 50cefc3b62bf45e16b858f5e414777afb1a9bd36 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:54:13 +0800 Subject: [PATCH 1/7] avformat/avidec: use avpriv_find_start_code in avi_read_packet() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/avidec.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 00f0037..42599bf 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -36,7 +36,8 @@ #include riff.h #include libavcodec/bytestream.h #include libavcodec/exif.h -#include libavformat/isom.h +#include libavcodec/internal.h +#include isom.h typedef struct AVIStream { int64_t frame_offset; /* current frame (video) or byte (audio) counter @@ -1444,19 +1445,17 @@ FF_ENABLE_DEPRECATION_WARNINGS e = st-index_entries[index]; if (index = 0 e-timestamp == ast-frame_offset) { -if (index == st-nb_index_entries-1) { -int key=1; -int i; -uint32_t state=-1; -for (i=0; iFFMIN(size,256); i++) { -if (st-codec-codec_id == AV_CODEC_ID_MPEG4) { -if (state == 0x1B6) { -key= !(pkt-data[i]0xC0); -break; -} -}else +if (index == st-nb_index_entries - 1 +st-codec-codec_id == AV_CODEC_ID_MPEG4) { +const uint8_t *ptr = pkt-data, *end = ptr + FFMIN(size, 256); +int key = 1; +uint32_t state = -1; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, state); +if (state == 0x1B6 ptr end) { +key = !(*ptr 0xC0); break; -state= (state8) + pkt-data[i]; +} } if (!key) e-flags = ~AVINDEX_KEYFRAME; -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/5] avfilter/formats: proper error handling in ff_set_common_*() functions
On date Sunday 2015-03-15 14:24:29 +0100, Clément Bœsch encoded: --- libavfilter/formats.c | 45 - libavfilter/formats.h | 10 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 6393416..4f9773b 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -401,7 +401,12 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) } #define FORMATS_REF(f, ref) \ -void *tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ +void *tmp; \ + \ +if (!ref) \ +return AVERROR_BUG; \ I'd prefer to crash or assert here, assuming the function doesn't assume NULL, same below. (Unrelated note: bug is a silly term, defect is more proper - I'm with Dijkstra here). [...] LGTM otherwise, thanks. -- FFmpeg = Fierce Fiendish Magnificient Philosophical Erudite Game ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/samidec: process more of the SAMI tags
On Sun, Mar 15, 2015 at 05:28:15PM +0900, Won-woo Choi wrote: Made some changes to samidec so that it can process SAMI tags. Processes B and FONT(font face, color). --- libavcodec/samidec.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/libavcodec/samidec.c b/libavcodec/samidec.c index 47850e2..b47204d 100644 --- a/libavcodec/samidec.c +++ b/libavcodec/samidec.c @@ -25,6 +25,7 @@ */ #include ass.h +#include libavformat/subtitles.h #include libavutil/avstring.h #include libavutil/bprint.h @@ -77,13 +78,45 @@ static int sami_paragraph_to_ass(AVCodecContext *avctx, const char *src) goto end; } -/* extract the text, stripping most of the tags */ +/* extract the text, processing some of the tags */ while (*p) { +int bold = 0; if (*p == '') { -if (!av_strncasecmp(p, P, 2) (p[2] == '' || av_isspace(p[2]))) +if ( !av_strncasecmp(p, P, 2) + (p[2] == '' || av_isspace(p[2])) ) break; +if ( !av_strncasecmp(p, B, 2) + (p[2] == '' || av_isspace(p[2])) ) { +bold = 1; +av_bprintf(dst, {\\b1}); +} +if (!av_strncasecmp(p, /B, 4)) { +bold = 0; +av_bprintf(dst, {\\b0}); +} if (!av_strncasecmp(p, BR, 3)) av_bprintf(dst, \\N); +if (!av_strncasecmp(p, FONT, 5)) { +const char *p_color = ff_smil_get_attr_ptr(p, Color); +const char *p_face = ff_smil_get_attr_ptr(p, Face); +const char *p_face_end = p_face; + +if (p_color) { +/* ASS color code order is BGR, opposite to SAMI */ +av_bprintf(dst, {\\cH%.2s%.2s%.2s}, + p_color+4, p_color+2, p_color); +} +if (p_face) { +while (*p_face_end != '\' *p_face_end != ' ') +p_face_end++; +av_bprintf(dst, {\\fn%.*s}, + (int)(p_face_end - p_face), p_face); +} +} +if (!av_strncasecmp(p, /FONT, 7)) { +av_bprintf(dst, {\\r}); +if (bold) av_bprintf(dst, {\\b1}); +} p++; while (*p *p != '') p++; While this might work as a temporary workaround, it is not correct. For example, it won't properly handle nested tags. It doesn't handle the HTML color names either, and will generate a mess out of it. Someone I know is working on refactoring this code with the HTML-like tag parsing from SubRip, which is the correct way of dealing with that issue. I hope it will get done soon. If not, feel free to ping in a month or so. Regards, -- Clément B. pgpB4gmNSQ2uT.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/5] avfilter/formats: proper error handling in ff_set_common_*() functions
On Sun, Mar 15, 2015 at 03:11:14PM +0100, Clément Bœsch wrote: On Sun, Mar 15, 2015 at 03:07:16PM +0100, Stefano Sabatini wrote: On date Sunday 2015-03-15 14:24:29 +0100, Clément Bœsch encoded: --- libavfilter/formats.c | 45 - libavfilter/formats.h | 10 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 6393416..4f9773b 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -401,7 +401,12 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) } #define FORMATS_REF(f, ref) \ -void *tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ +void *tmp; \ + \ +if (!ref) \ +return AVERROR_BUG; \ I'd prefer to crash or assert here, assuming the function doesn't assume NULL, same below. In the current state, these functions could be called with a NULL parameter. Random examples: libavfilter/src_movie.c: ff_formats_ref(ff_make_format_list(list), outlink-in_formats); libavfilter/src_movie.c: ff_formats_ref(ff_make_format_list(list), outlink-in_samplerates); libavfilter/vf_extractplanes.c: ff_formats_ref(ff_make_format_list(in_pixfmts), ctx-inputs[0]-out_formats); libavfilter/vf_extractplanes.c: ff_formats_ref(ff_make_format_list(out_pixfmts), ctx-outputs[i]-in_formats); So I'd better not do that. (Unrelated note: bug is a silly term, defect is more proper - I'm with Dijkstra here). To elaborate on this, the bug here is referring to an allocation check not done in the caller (there are many currently since I'm just introducing the error handling). -- Clément B. pgpNeAQSKQ__V.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe()
On Sun, Mar 15, 2015 at 04:46:22PM +0800, zhaoxiu.zeng wrote: From 60cdc9161881cdf86e428a0d6812785938ae6667 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:56:53 +0800 Subject: [PATCH 2/7] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/mpegvideodec.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index ade76d8..c2fa6c2 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -24,6 +24,7 @@ #include rawdec.h #include libavutil/intreadwrite.h +#include libavcodec/internal.h #define SEQ_START_CODE 0x01b3 #define GOP_START_CODE 0x01b8 @@ -37,33 +38,30 @@ static int mpegvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice=0, pspack=0, vpes=0, apes=0, res=0, sicle=0; -int i, j; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; uint32_t last = 0; +int j; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { -switch(code){ +switch (code) { case SEQ_START_CODE: -if (!(p-buf[i+1+3+1+2] 0x20)) +if (!(ptr[3 + 1 + 2] 0x20)) break; -j = i; -if (p-buf[j+8] 2) -j+= 64; -if (j = p-buf_size) +j = -1 + (ptr[-1 + 8] 2) * 32; +if (ptr + j = end) break; -if (p-buf[j+8] 1) -j+= 64; -if (j = p-buf_size) +j += (ptr[j + 8] 1) * 64; +if (ptr + j = end) break; -if (AV_RB24(p-buf + j + 9) 0xFE) +if (AV_RB24(ptr + j + 9) 0xFE) break; seq++; -break; -case PICTURE_START_CODE: pic++; break; +break; +case PICTURE_START_CODE:pic++; break; casePACK_START_CODE: pspack++; break; -case 0x1b6: -res++; break; +case 0x1b6:res++; break; } if (code = SLICE_START_CODE code = 0x1af) { if (last = SLICE_START_CODE last = 0x1af) { cleaned up and applied also please do not mix unrelated cosmetic changes in the code see for example the diff with these cosmetics removed, which i applied its much more readable: (this is important for being reviewable) diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index ade76d86..5ea5569 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -24,6 +24,7 @@ #include rawdec.h #include libavutil/intreadwrite.h +#include libavcodec/internal.h #define SEQ_START_CODE 0x01b3 #define GOP_START_CODE 0x01b8 @@ -37,26 +38,27 @@ static int mpegvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice=0, pspack=0, vpes=0, apes=0, res=0, sicle=0; -int i, j; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; uint32_t last = 0; +int j; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { switch(code){ case SEQ_START_CODE: -if (!(p-buf[i+1+3+1+2] 0x20)) +if (!(ptr[3 + 1 + 2] 0x20)) break; -j = i; -if (p-buf[j+8] 2) +j = -1; +if (ptr[j + 8] 2) j+= 64; -if (j = p-buf_size) +if (ptr + j = end) break; -if (p-buf[j+8] 1) +if (ptr[j + 8] 1) j+= 64; -if (j = p-buf_size) +if (ptr + j = end) break; -if (AV_RB24(p-buf + j + 9) 0xFE) +if (AV_RB24(ptr + j + 9) 0xFE) break; seq++; break; [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB He who knows, does not speak. He who speaks, does not know. -- Lao Tsu 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/5] avfilter/formats: remove unused COPY_INT_LIST() macro
On date Sunday 2015-03-15 14:24:26 +0100, Clément Bœsch encoded: This macro is unused since 247fa6c27c4589d0f7a427c520d782edbb6de060. --- libavfilter/formats.c | 12 1 file changed, 12 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index f25328c..1fc7fa6 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -262,18 +262,6 @@ int ff_fmt_is_in(int fmt, const int *fmts) return 0; } -#define COPY_INT_LIST(list_copy, list, type) { \ -int count = 0; \ -if (list) \ -for (count = 0; list[count] != -1; count++) \ -; \ -list_copy = av_calloc(count+1, sizeof(type)); \ -if (list_copy) {\ -memcpy(list_copy, list, sizeof(type) * count); \ -list_copy[count] = -1; \ -} \ -} - LGTM. -- FFmpeg = Forgiving Fiendish Mysterious Powerful Evil Ghost ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/5] avfilter/formats: use av_realloc_array in ADD_FORMAT()
On date Sunday 2015-03-15 14:24:27 +0100, Clément Bœsch encoded: --- libavfilter/formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 1fc7fa6..896ceeb 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -308,8 +308,8 @@ do { \ if (!(*f) !(*f = av_mallocz(sizeof(**f \ return AVERROR(ENOMEM); \ \ -fmts = av_realloc((*f)-list, \ - sizeof(*(*f)-list) * ((*f)-nb + 1));\ +fmts = av_realloc_array((*f)-list, (*f)-nb + 1, \ +sizeof(*(*f)-list)); \ if (!fmts) {\ if (!oldf) \ av_freep(f);\ LGTM. -- FFmpeg = Faithless Freak Meaningless Powerful Ecumenical Guru ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/5] avfilter/formats: proper error handling in ff_channel_layouts_ref() and ff_formats_ref()
On date Sunday 2015-03-15 14:24:28 +0100, Clément Bœsch encoded: Also make sure the allocation and its check are properly done. --- libavfilter/formats.c | 22 +++--- libavfilter/formats.h | 6 +++--- 2 files changed, 14 insertions(+), 14 deletions(-) LGTM, thanks. -- FFmpeg = Foolish and Faithless Merciful Ponderous Embarassing God ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/mxfenc: write user comment metadata
On Sun, Mar 15, 2015 at 04:05:16PM +0100, Tomas Härdin wrote: On Sat, 2015-03-14 at 17:59 -0700, Mark Reid wrote: --- libavformat/mxfenc.c | 66 +-- tests/ref/lavf/mxf| 6 ++--- tests/ref/lavf/mxf_d10| 2 +- tests/ref/lavf/mxf_opatom | 2 +- 4 files changed, 69 insertions(+), 7 deletions(-) Looks OK applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/avidec: use avpriv_find_start_code in avi_read_packet()
On Sun, Mar 15, 2015 at 04:38:27PM +0800, zhaoxiu.zeng wrote: From 50cefc3b62bf45e16b858f5e414777afb1a9bd36 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:54:13 +0800 Subject: [PATCH 1/7] avformat/avidec: use avpriv_find_start_code in avi_read_packet() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/avidec.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) split and applied btw i was wondering as you worked alot on vc1 if you would be interrested to look at some of the long stading bugs: https://trac.ffmpeg.org/ticket/2557 and https://trac.ffmpeg.org/ticket/3262 Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/5] avfilter/formats: proper error handling in ff_set_common_*() functions
On Sun, Mar 15, 2015 at 03:07:16PM +0100, Stefano Sabatini wrote: On date Sunday 2015-03-15 14:24:29 +0100, Clément Bœsch encoded: --- libavfilter/formats.c | 45 - libavfilter/formats.h | 10 +- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 6393416..4f9773b 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -401,7 +401,12 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) } #define FORMATS_REF(f, ref) \ -void *tmp = av_realloc_array(f-refs, sizeof(*f-refs), f-refcount + 1); \ +void *tmp; \ + \ +if (!ref) \ +return AVERROR_BUG; \ I'd prefer to crash or assert here, assuming the function doesn't assume NULL, same below. In the current state, these functions could be called with a NULL parameter. Random examples: libavfilter/src_movie.c: ff_formats_ref(ff_make_format_list(list), outlink-in_formats); libavfilter/src_movie.c: ff_formats_ref(ff_make_format_list(list), outlink-in_samplerates); libavfilter/vf_extractplanes.c: ff_formats_ref(ff_make_format_list(in_pixfmts), ctx-inputs[0]-out_formats); libavfilter/vf_extractplanes.c: ff_formats_ref(ff_make_format_list(out_pixfmts), ctx-outputs[i]-in_formats); So I'd better not do that. (Unrelated note: bug is a silly term, defect is more proper - I'm with Dijkstra here). [...] LGTM otherwise, thanks. -- Clément B. pgpVmWS5sWcJY.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavf/segment: do not set default value for segment_time option
Also allows a negative value to allow to never split the input. This changes the default behavior, to never split the input if an explicit value is not set. TODO: bump micro. --- doc/muxers.texi | 11 +++ libavformat/segment.c | 9 - 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index a8225fc..fe419ac 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -966,8 +966,11 @@ If not specified the type is guessed from the list file name suffix. @item segment_time @var{time} Set segment duration to @var{time}, the value must be a duration -specification. Default value is 2. See also the -@option{segment_times} option. +specification. A value of 0 means that it will try to split the +segment as soon as possible. A negative value make the muxer never +splits. If not specified, assumes a negative value. + +See also the @option{segment_times} option. Note that splitting may not be accurate, unless you force the reference stream key-frames at the given time. See the introductory @@ -1049,7 +1052,7 @@ Remux the content of file @file{in.mkv} to a list of segments @file{out-000.nut}, @file{out-001.nut}, etc., and write the list of generated segments to @file{out.list}: @example -ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.list out%03d.nut +ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_time 2 -segment_list out.list out%03d.nut @end example @item @@ -1088,7 +1091,7 @@ ffmpeg -i in.mkv -codec copy -map 0 -f segment -segment_list out.csv -segment_fr Convert the @file{in.mkv} to TS segments using the @code{libx264} and @code{libfaac} encoders: @example -ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_list out.list out%03d.ts +ffmpeg -i in.mkv -map 0 -codec:v libx264 -codec:a libfaac -f ssegment -segment_time 2 -segment_list out.list out%03d.ts @end example @item diff --git a/libavformat/segment.c b/libavformat/segment.c index b65a2eb..8255843 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -606,16 +606,15 @@ static int seg_write_header(AVFormatContext *s) } else if (seg-frames_str) { if ((ret = parse_frames(s, seg-frames, seg-nb_frames, seg-frames_str)) 0) return ret; -} else { -/* set default value if not specified */ -if (!seg-time_str) -seg-time_str = av_strdup(2); +} else if (seg-time_str) { if ((ret = av_parse_time(seg-time, seg-time_str, 1)) 0) { av_log(s, AV_LOG_ERROR, Invalid time duration specification '%s' for segment_time option\n, seg-time_str); return ret; } +} else { +seg-time = -1; } if (seg-format_options_str) { @@ -738,7 +737,7 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt) } else if (seg-frames) { start_frame = seg-segment_count seg-nb_frames ? seg-frames[seg-segment_count] : INT_MAX; -} else { +} else if (seg-time = 0) { if (seg-use_clocktime) { int64_t avgt = av_gettime(); time_t sec = avgt / 100; -- 1.8.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/cavsvideodec: use avpriv_find_start_code in cavsvideo_probe()
From 9a97b5559a8c4ea9a03560d59e1725b6c99d0960 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:58:12 +0800 Subject: [PATCH 3/7] avformat/cavsvideodec: use avpriv_find_start_code in cavsvideo_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/cavsvideodec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/cavsvideodec.c b/libavformat/cavsvideodec.c index 880f4ab..d985dd5 100644 --- a/libavformat/cavsvideodec.c +++ b/libavformat/cavsvideodec.c @@ -21,6 +21,7 @@ #include avformat.h #include rawdec.h +#include libavcodec/internal.h #define CAVS_SEQ_START_CODE 0x01b0 #define CAVS_PIC_I_START_CODE 0x01b3 @@ -33,10 +34,10 @@ static int cavsvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice_pos = 0; -int i; +const uint8_t *ptr = p-buf, *end = p-buf + p-buf_size; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { if(code CAVS_SEQ_START_CODE) { /* slices have to be consecutive */ @@ -49,7 +50,7 @@ static int cavsvideo_probe(AVProbeData *p) if (code == CAVS_SEQ_START_CODE) { seq++; /* check for the only currently supported profile */ -if(p-buf[i+1] != CAVS_PROFILE_JIZHUN) +if (*ptr != CAVS_PROFILE_JIZHUN) return 0; } else if ((code == CAVS_PIC_I_START_CODE) || (code == CAVS_PIC_PB_START_CODE)) { -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/mpeg: use avpriv_find_start_code in mpegps_probe()
From 520c5898f2c0372188f17f98e10a40174dde4aac Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 12:01:51 +0800 Subject: [PATCH 5/7] avformat/mpeg: use avpriv_find_start_code in mpegps_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/mpeg.c | 51 --- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index a0b5738..ffba786 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -29,6 +29,7 @@ #endif #include libavutil/avassert.h +#include libavcodec/internal.h /*/ /* demux code */ @@ -38,12 +39,12 @@ static int check_pes(const uint8_t *p, const uint8_t *end) { int pes1; -int pes2 = (p[3] 0xC0) == 0x80 - (p[4] 0xC0) != 0x40 - ((p[4] 0xC0) == 0x00 || -(p[4] 0xC0) 2 == (p[6] 0xF0)); +int pes2 = (p[2] 0xC0) == 0x80 + (p[3] 0xC0) != 0x40 + ((p[3] 0xC0) == 0x00 || +(p[3] 0xC0) 2 == (p[5] 0xF0)); -for (p += 3; p end *p == 0xFF; p++) ; +for (p += 2; p end *p == 0xFF; p++) ; if ((*p 0xC0) == 0x40) p += 2; @@ -59,41 +60,37 @@ static int check_pes(const uint8_t *p, const uint8_t *end) static int check_pack_header(const uint8_t *buf) { -return (buf[1] 0xC0) == 0x40 || (buf[1] 0xF0) == 0x20; +return (buf[0] 0xC0) == 0x40 || (buf[0] 0xF0) == 0x20; } static int mpegps_probe(AVProbeData *p) { uint32_t code = -1; -int i; int sys = 0, pspack = 0, priv1 = 0, vid = 0; int audio = 0, invalid = 0, score = 0; -int endpes = 0; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; +const uint8_t *endpes = ptr; -for (i = 0; i p-buf_size; i++) { -code = (code 8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { -int len = p-buf[i + 1] 8 | p-buf[i + 2]; -int pes = endpes = i check_pes(p-buf + i, p-buf + p-buf_size); -int pack = check_pack_header(p-buf + i); - if (code == SYSTEM_HEADER_START_CODE) sys++; -else if (code == PACK_START_CODE pack) +else if (code == PACK_START_CODE check_pack_header(ptr)) pspack++; -else if ((code 0xf0) == VIDEO_ID pes) { -endpes = i + len; -vid++; +else if (endpes ptr check_pes(ptr, end)) { +int len = AV_RB16(ptr); + if ((code 0xf0) == VIDEO_ID) { vid++; endpes = ptr + len; } +// skip pes payload to avoid start code emulation for private +// and audio streams +else if ((code 0xe0) == AUDIO_ID) { audio++; ptr += len; code = -1; } +else if (code == PRIVATE_STREAM_1 ) { priv1++; ptr += len; code = -1; } +else if (code == 0x1fd) vid++; //VC1 +} else { + if ((code 0xf0) == VIDEO_ID) invalid++; +else if ((code 0xe0) == AUDIO_ID) invalid++; +else if (code == PRIVATE_STREAM_1 ) invalid++; } -// skip pes payload to avoid start code emulation for private -// and audio streams -else if ((code 0xe0) == AUDIO_ID pes) {audio++; i+=len;} -else if (code == PRIVATE_STREAM_1pes) {priv1++; i+=len;} -else if (code == 0x1fd pes) vid++; //VC1 - -else if ((code 0xf0) == VIDEO_ID !pes) invalid++; -else if ((code 0xe0) == AUDIO_ID !pes) invalid++; -else if (code == PRIVATE_STREAM_1 !pes) invalid++; } } -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavf/segment: [WIP] add support to segmentation expression
On date Friday 2015-03-13 19:34:14 +0100, Stefano Sabatini encoded: TODO: add documentation, add support to chapters. --- libavformat/segment.c | 57 +++ 1 file changed, 57 insertions(+) Up, I'm a bit dissatisfied by the variable names verbosity, suggestions are welcome. About chapter support, I'm going to add it with another patch (my initial use case was to have the ability to split an input file - a ripped CD in my case - to multiple files each one containing a single chapter). -- FFmpeg = Forgiving Fiendish Meaningless Pitiless Enlightened Generator From 787e19206a0a1b75bc2bf53fb39ceb72b4c5dade Mon Sep 17 00:00:00 2001 From: Stefano Sabatini stefa...@gmail.com Date: Fri, 13 Mar 2015 19:30:46 +0100 Subject: [PATCH] lavf/segment: add support to segmentation expression TODO: bump micro --- doc/muxers.texi | 34 ++ libavformat/segment.c | 66 +++ 2 files changed, 100 insertions(+) diff --git a/doc/muxers.texi b/doc/muxers.texi index fe419ac..3e9476c 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -964,6 +964,40 @@ A list file with the suffix @code{.m3u8} will auto-select this format. If not specified the type is guessed from the list file name suffix. +@item segment_expr @var{expression} +Set an expression, when evaluates to a value different from 0 enables +segmentation. + +The expression accepts the following parameters: +@table +@table @option +@item segment_n +segment count, starting from 0 + +@item segment_packets_n +segment packets count + +@item segment_ref_packets_n +segment reference stream packets count + +@item segment_packets_size +total packets size in the segment, in bytes. Note that this only +expresses the size of the packets payload, unregarding the container +size overhead. + +@item packet_pos +packet position, NAN if unspecified + +@item packet_n +packet count, starting from 0 + +@item packet_t +packet time, expressed in seconds +@end table + +For example to cut a file when a size of 10Mi bytes is reached, use +the expression @code{gt(segment_packets_size,10Mi)}. + @item segment_time @var{time} Set segment duration to @var{time}, the value must be a duration specification. A value of 0 means that it will try to split the diff --git a/libavformat/segment.c b/libavformat/segment.c index 8255843..0cf5360 100644 --- a/libavformat/segment.c +++ b/libavformat/segment.c @@ -33,6 +33,7 @@ #include internal.h #include libavutil/avassert.h +#include libavutil/eval.h #include libavutil/log.h #include libavutil/opt.h #include libavutil/avstring.h @@ -62,6 +63,32 @@ typedef enum { LIST_TYPE_NB, } ListType; +static const char *const var_names[] = { +segment_n, /// segment count +segment_packets_n, /// segment frame count +segment_ref_packets_n, /// segment reference stream frame count +segment_packets_size, /// total packets size + +packet_pos, /// packet position in the file +packet_n, /// packet count +packet_t, /// packet time + +NULL +}; + +enum var_name { +VAR_SEGMENT_N, +VAR_SEGMENT_PACKETS_N, +VAR_SEGMENT_REF_PACKETS_N, +VAR_SEGMENT_PACKETS_SIZE, + +VAR_PACKET_POS, +VAR_PACKET_N, +VAR_PACKET_T, + +VAR_VARS_NB +}; + #define SEGMENT_LIST_FLAG_CACHE 1 #define SEGMENT_LIST_FLAG_LIVE 2 @@ -71,6 +98,11 @@ typedef struct SegmentContext { int segment_idx_wrap; /// number after which the index wraps int segment_idx_wrap_nb; /// number of time the index has wraped int segment_count; /// number of segment files already written + +char *segment_expr; +AVExpr *segment_pexpr; +double var_values[VAR_VARS_NB]; + AVOutputFormat *oformat; AVFormatContext *avf; char *format; /// format to use for output segment files @@ -225,6 +257,12 @@ static int segment_start(AVFormatContext *s, int write_header) } seg-segment_idx++; + +seg-var_values[VAR_SEGMENT_N] = seg-segment_count; +seg-var_values[VAR_SEGMENT_PACKETS_SIZE] = 0; +seg-var_values[VAR_SEGMENT_PACKETS_N] = 0; +seg-var_values[VAR_SEGMENT_REF_PACKETS_N] = 0; + if ((seg-segment_idx_wrap) (seg-segment_idx%seg-segment_idx_wrap == 0)) seg-segment_idx_wrap_nb++; @@ -617,6 +655,17 @@ static int seg_write_header(AVFormatContext *s) seg-time = -1; } +if (seg-segment_expr) { +ret = av_expr_parse(seg-segment_pexpr, seg-segment_expr, var_names, +NULL, NULL, NULL, NULL, 0, s); +if (ret 0) { +av_log(s, AV_LOG_ERROR, + Error when evaluating the segment expression '%s'\n, + seg-segment_expr); +return ret; +} +} + if (seg-format_options_str) { ret = av_dict_parse_string(seg-format_options, seg-format_options_str, =, :, 0); if (ret 0) { @@ -731,6 +780,21
[FFmpeg-devel] [PATCH] avformat/m4vdec: use avpriv_find_start_code in mpeg4video_probe()
From 7d57cb0e822ac755ba7e3d9c09d90bf62c7da24d Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:59:27 +0800 Subject: [PATCH 4/7] avformat/m4vdec: use avpriv_find_start_code in mpeg4video_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/m4vdec.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libavformat/m4vdec.c b/libavformat/m4vdec.c index d8ee530..aa0ee36 100644 --- a/libavformat/m4vdec.c +++ b/libavformat/m4vdec.c @@ -21,6 +21,7 @@ #include avformat.h #include rawdec.h +#include libavcodec/internal.h #define VISUAL_OBJECT_START_CODE 0x01b5 #define VOP_START_CODE 0x01b6 @@ -29,22 +30,20 @@ static int mpeg4video_probe(AVProbeData *probe_packet) { uint32_t temp_buffer = -1; int VO = 0, VOL = 0, VOP = 0, VISO = 0, res = 0; -int i; +const uint8_t *ptr = probe_packet-buf, *end = ptr + probe_packet-buf_size; -for (i = 0; i probe_packet-buf_size; i++) { -temp_buffer = (temp_buffer 8) + probe_packet-buf[i]; -if (temp_buffer 0xfe00) -continue; -if (temp_buffer 2) -continue; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, temp_buffer); +if ((temp_buffer 0xff00) != 0x100) +break; if (temp_buffer == VOP_START_CODE) VOP++; else if (temp_buffer == VISUAL_OBJECT_START_CODE) VISO++; -else if (temp_buffer = 0x100 temp_buffer 0x120) +else if (temp_buffer 0x120) VO++; -else if (temp_buffer = 0x120 temp_buffer 0x130) +else if (temp_buffer 0x130) VOL++; else if (!(0x1AF temp_buffer temp_buffer 0x1B7) !(0x1B9 temp_buffer temp_buffer 0x1C4)) -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe()
From 60cdc9161881cdf86e428a0d6812785938ae6667 Mon Sep 17 00:00:00 2001 From: Zeng Zhaoxiu zhaoxiu.z...@gmail.com Date: Sun, 15 Mar 2015 11:56:53 +0800 Subject: [PATCH 2/7] avformat/mpegvideodec: use avpriv_find_start_code in mpegvideo_probe() Signed-off-by: Zeng Zhaoxiu zhaoxiu.z...@gmail.com --- libavformat/mpegvideodec.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c index ade76d8..c2fa6c2 100644 --- a/libavformat/mpegvideodec.c +++ b/libavformat/mpegvideodec.c @@ -24,6 +24,7 @@ #include rawdec.h #include libavutil/intreadwrite.h +#include libavcodec/internal.h #define SEQ_START_CODE 0x01b3 #define GOP_START_CODE 0x01b8 @@ -37,33 +38,30 @@ static int mpegvideo_probe(AVProbeData *p) { uint32_t code= -1; int pic=0, seq=0, slice=0, pspack=0, vpes=0, apes=0, res=0, sicle=0; -int i, j; +const uint8_t *ptr = p-buf, *end = ptr + p-buf_size; uint32_t last = 0; +int j; -for(i=0; ip-buf_size; i++){ -code = (code8) + p-buf[i]; +while (ptr end) { +ptr = avpriv_find_start_code(ptr, end, code); if ((code 0xff00) == 0x100) { -switch(code){ +switch (code) { case SEQ_START_CODE: -if (!(p-buf[i+1+3+1+2] 0x20)) +if (!(ptr[3 + 1 + 2] 0x20)) break; -j = i; -if (p-buf[j+8] 2) -j+= 64; -if (j = p-buf_size) +j = -1 + (ptr[-1 + 8] 2) * 32; +if (ptr + j = end) break; -if (p-buf[j+8] 1) -j+= 64; -if (j = p-buf_size) +j += (ptr[j + 8] 1) * 64; +if (ptr + j = end) break; -if (AV_RB24(p-buf + j + 9) 0xFE) +if (AV_RB24(ptr + j + 9) 0xFE) break; seq++; -break; -case PICTURE_START_CODE: pic++; break; +break; +case PICTURE_START_CODE:pic++; break; casePACK_START_CODE: pspack++; break; -case 0x1b6: -res++; break; +case 0x1b6:res++; break; } if (code = SLICE_START_CODE code = 0x1af) { if (last = SLICE_START_CODE last = 0x1af) { -- 2.1.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/3] lavu: LOCAL_ALIGNED is for arrays
Force an additional parameter then. --- libavutil/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/internal.h b/libavutil/internal.h index 9ba2ea0..8081fdb 100644 --- a/libavutil/internal.h +++ b/libavutil/internal.h @@ -107,9 +107,9 @@ t (*v) o = la_##v #if HAVE_LOCAL_ALIGNED -# define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_D(a, t, v, __VA_ARGS__,,)) +# define LOCAL_ALIGNED(a, t, v, s, ...) E1(LOCAL_ALIGNED_D(a, t, v, s, __VA_ARGS__)) #else -# define LOCAL_ALIGNED(a, t, v, ...) E1(LOCAL_ALIGNED_A(a, t, v, __VA_ARGS__,,)) +# define LOCAL_ALIGNED(a, t, v, s, ...) E1(LOCAL_ALIGNED_A(a, t, v, s, __VA_ARGS__)) #endif #define FF_ALLOC_OR_GOTO(ctx, p, size, label)\ -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/3] ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED
The later may yield incorrect code for on-stack variables. --- libavcodec/ppc/h264dsp.c| 8 +++ libavcodec/ppc/h264qpel.c | 50 - libavcodec/ppc/vp8dsp_altivec.c | 2 +- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c index da118a4..818ce46 100644 --- a/libavcodec/ppc/h264dsp.c +++ b/libavcodec/ppc/h264dsp.c @@ -391,7 +391,7 @@ static void h264_idct_add8_altivec(uint8_t **dest, const int *block_offset, static inline void write16x4(uint8_t *dst, int dst_stride, register vec_u8 r0, register vec_u8 r1, register vec_u8 r2, register vec_u8 r3) { -DECLARE_ALIGNED(16, unsigned char, result)[64]; +LOCAL_ALIGNED(16, unsigned char, result, [64]); uint32_t *src_int = (uint32_t *)result, *dst_int = (uint32_t *)dst; int int_dst_stride = dst_stride/4; @@ -571,7 +571,7 @@ static inline vec_u8 h264_deblock_q1(register vec_u8 p0, } #define h264_loop_filter_luma_altivec(p2, p1, p0, q0, q1, q2, alpha, beta, tc0) {\ -DECLARE_ALIGNED(16, unsigned char, temp)[16]; \ +LOCAL_ALIGNED(16, unsigned char, temp, [16]); \ register vec_u8 alphavec; \ register vec_u8 betavec; \ register vec_u8 mask; \ @@ -652,7 +652,7 @@ void weight_h264_W_altivec(uint8_t *block, int stride, int height, vec_u8 vblock; vec_s16 vtemp, vweight, voffset, v0, v1; vec_u16 vlog2_denom; -DECLARE_ALIGNED(16, int32_t, temp)[4]; +LOCAL_ALIGNED(16, int32_t, temp, [4]); LOAD_ZERO; offset = log2_denom; @@ -701,7 +701,7 @@ void biweight_h264_W_altivec(uint8_t *dst, uint8_t *src, int stride, int height, vec_u8 vsrc, vdst; vec_s16 vtemp, vweights, vweightd, voffset, v0, v1, v2, v3; vec_u16 vlog2_denom; -DECLARE_ALIGNED(16, int32_t, temp)[4]; +LOCAL_ALIGNED(16, int32_t, temp, [4]); LOAD_ZERO; offset = ((offset + 1) | 1) log2_denom; diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c index 575f504..ecf99c8 100644 --- a/libavcodec/ppc/h264qpel.c +++ b/libavcodec/ppc/h264qpel.c @@ -73,7 +73,7 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc00_ ## CODETYPE (uint8_t *dst, con \ static void OPNAME ## h264_qpel ## SIZE ## _mc10_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ { \ -DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ +LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\ }\ @@ -85,14 +85,14 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc20_ ## CODETYPE(uint8_t *dst, cons \ static void OPNAME ## h264_qpel ## SIZE ## _mc30_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ {\ -DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ +LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+1, half, stride, stride, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc01_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ {\ -DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ +LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src, half, stride, stride, SIZE);\ }\ @@ -104,15 +104,15 @@ static void OPNAME ## h264_qpel ## SIZE ## _mc02_ ## CODETYPE(uint8_t *dst, cons \ static void OPNAME ## h264_qpel ## SIZE ## _mc03_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ {\ -DECLARE_ALIGNED(16, uint8_t, half)[SIZE*SIZE];\ +LOCAL_ALIGNED(16, uint8_t, half, [SIZE*SIZE]);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(half, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, src+stride, half, stride, stride, SIZE);\ }\ \ static void OPNAME ## h264_qpel ## SIZE ## _mc11_ ## CODETYPE(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)\ {\ -DECLARE_ALIGNED(16, uint8_t, halfH)[SIZE*SIZE];\ -DECLARE_ALIGNED(16, uint8_t, halfV)[SIZE*SIZE];\ +LOCAL_ALIGNED(16, uint8_t, halfH, [SIZE*SIZE]);\ +LOCAL_ALIGNED(16, uint8_t, halfV, [SIZE*SIZE]);\ put_h264_qpel ## SIZE ## _h_lowpass_ ## CODETYPE(halfH, src, SIZE, stride);\ put_h264_qpel ## SIZE ## _v_lowpass_ ## CODETYPE(halfV, src, SIZE, stride);\ OPNAME ## pixels ## SIZE ## _l2_ ## CODETYPE(dst, halfH, halfV, stride, SIZE, SIZE);\
[FFmpeg-devel] [PATCH 1/3] lavc/lavu: remove LOCAL_ALIGNED_*
They were duplicating LOCAL_ALIGNED() without benefit. --- configure | 8 +++- libavcodec/aacps.c | 6 +++--- libavcodec/aacsbr.c| 6 +++--- libavcodec/ac3enc.c| 2 +- libavcodec/ac3enc_template.c | 4 ++-- libavcodec/bink.c | 10 +- libavcodec/dcadec.c| 2 +- libavcodec/dnxhdenc.c | 2 +- libavcodec/dvdec.c | 6 +++--- libavcodec/dvenc.c | 4 ++-- libavcodec/imc.c | 2 +- libavcodec/ituh263dec.c| 2 +- libavcodec/me_cmp.c| 16 libavcodec/mips/aacsbr_mips.c | 6 +++--- libavcodec/mpc7.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/mpegvideo_motion.c | 2 +- libavcodec/ppc/mpegaudiodsp_altivec.c | 8 libavcodec/proresdec2.c| 6 +++--- libavcodec/rv34.c | 4 ++-- libavcodec/vp9.c | 4 ++-- libavcodec/x86/hevcdsp_init.c | 4 ++-- libavcodec/x86/mpegaudiodsp.c | 10 +- libavcodec/x86/mpegvideoenc_template.c | 2 +- libavcodec/x86/simple_idct.c | 2 +- libavcodec/x86/vp9dsp_init.c | 2 +- libavutil/internal.h | 20 +++- 27 files changed, 64 insertions(+), 80 deletions(-) diff --git a/configure b/configure index 7ade46d..2bac433 100755 --- a/configure +++ b/configure @@ -1609,9 +1609,7 @@ ARCH_FEATURES= fast_64bit fast_clz fast_cmov -local_aligned_8 -local_aligned_16 -local_aligned_32 +local_aligned simd_align_16 @@ -4611,7 +4609,7 @@ elif enabled parisc; then elif enabled ppc; then -enable local_aligned_8 local_aligned_16 local_aligned_32 +enable local_aligned check_inline_asm dcbzl 'dcbzl 0, %0 :: r(0)' check_inline_asm ibm_asm 'add 0, 0, 0' @@ -4646,7 +4644,7 @@ elif enabled x86; then check_builtin rdtscintrin.h __rdtsc() check_builtin mm_empty mmintrin.h _mm_empty() -enable local_aligned_8 local_aligned_16 local_aligned_32 +enable local_aligned # check whether EBP is available on x86 # As 'i' is stored on the stack, this program will crash diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c index ea5a5d2..2d00473 100644 --- a/libavcodec/aacps.c +++ b/libavcodec/aacps.c @@ -327,7 +327,7 @@ static void hybrid6_cx(PSDSPContext *dsp, float (*in)[2], float (*out)[32][2], { int i; int N = 8; -LOCAL_ALIGNED_16(float, temp, [8], [2]); +LOCAL_ALIGNED(16, float, temp, [8], [2]); for (i = 0; i len; i++, in++) { dsp-hybrid_analysis(temp, in, (const float (*)[8][2]) filter, 1, N); @@ -628,8 +628,8 @@ static void map_val_20_to_34(float par[PS_MAX_NR_IIDICC]) static void decorrelation(PSContext *ps, float (*out)[32][2], const float (*s)[32][2], int is34) { -LOCAL_ALIGNED_16(float, power, [34], [PS_QMF_TIME_SLOTS]); -LOCAL_ALIGNED_16(float, transient_gain, [34], [PS_QMF_TIME_SLOTS]); +LOCAL_ALIGNED(16, float, power, [34], [PS_QMF_TIME_SLOTS]); +LOCAL_ALIGNED(16, float, transient_gain, [34], [PS_QMF_TIME_SLOTS]); float *peak_decay_nrg = ps-peak_decay_nrg; float *power_smooth = ps-power_smooth; float *peak_decay_diff_smooth = ps-peak_decay_diff_smooth; diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index 94a5685..bf60736 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -1260,7 +1260,7 @@ static void sbr_hf_inverse_filter(SBRDSPContext *dsp, { int k; for (k = 0; k k0; k++) { -LOCAL_ALIGNED_16(float, phi, [3], [2][2]); +LOCAL_ALIGNED(16, float, phi, [3], [2][2]); float dk; dsp-autocorrelate(X_low[k], phi); @@ -1631,8 +1631,8 @@ static void sbr_hf_assemble(float Y1[38][64][2], for (e = 0; e ch_data-bs_num_env; e++) { for (i = 2 * ch_data-t_env[e]; i 2 * ch_data-t_env[e + 1]; i++) { -LOCAL_ALIGNED_16(float, g_filt_tab, [48]); -LOCAL_ALIGNED_16(float, q_filt_tab, [48]); +LOCAL_ALIGNED(16, float, g_filt_tab, [48]); +LOCAL_ALIGNED(16, float, q_filt_tab, [48]); float *g_filt, *q_filt; if (h_SL e != e_a[0] e != e_a[1]) { diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index dc52908..b3db2df 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -1037,7 +1037,7 @@ static void count_mantissa_bits_update_ch(AC3EncodeContext *s, int ch, static int count_mantissa_bits(AC3EncodeContext *s) { int ch, max_end_freq; -LOCAL_ALIGNED_16(uint16_t, mant_cnt, [AC3_MAX_BLOCKS], [16]); +LOCAL_ALIGNED(16, uint16_t, mant_cnt, [AC3_MAX_BLOCKS], [16]); count_mantissa_bits_init(mant_cnt); diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c index
[FFmpeg-devel] ffmpeg issues
Hello does anyone know why libflite will not compile I tried everything from yum versions as well I have compiled my own using the following compile of flite ./configure --prefix=/usr --enable-shared \ --with-audio=alsa \ --with-vox=cmu_us_kal16 I am using Centos 7 but I have also tried 6.6 as I trying create an auto installer version of ffmpeg with all libs enabled ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 0/3] Clean-up for LOCAL_ALIGNED
The second patch is the most interesting, because it prevents incorrect uses of LOCAL_ALIGNED that may have only caused warnings. This patch is of course smaller because of the code duplication removal of the first patch. Christophe Gisquet (3): lavc/lavu: remove LOCAL_ALIGNED_* lavu: LOCAL_ALIGNED is for arrays ppc: lavc: use LOCAL_ALIGNED instead of DECLARE_ALIGNED configure | 8 ++ libavcodec/aacps.c | 6 ++-- libavcodec/aacsbr.c| 6 ++-- libavcodec/ac3enc.c| 2 +- libavcodec/ac3enc_template.c | 4 +-- libavcodec/bink.c | 10 +++ libavcodec/dcadec.c| 2 +- libavcodec/dnxhdenc.c | 2 +- libavcodec/dvdec.c | 6 ++-- libavcodec/dvenc.c | 4 +-- libavcodec/imc.c | 2 +- libavcodec/ituh263dec.c| 2 +- libavcodec/me_cmp.c| 16 +-- libavcodec/mips/aacsbr_mips.c | 6 ++-- libavcodec/mpc7.c | 2 +- libavcodec/mpegvideo_enc.c | 2 +- libavcodec/mpegvideo_motion.c | 2 +- libavcodec/ppc/h264dsp.c | 8 +++--- libavcodec/ppc/h264qpel.c | 50 +- libavcodec/ppc/mpegaudiodsp_altivec.c | 8 +++--- libavcodec/ppc/vp8dsp_altivec.c| 2 +- libavcodec/proresdec2.c| 6 ++-- libavcodec/rv34.c | 4 +-- libavcodec/vp9.c | 4 +-- libavcodec/x86/hevcdsp_init.c | 4 +-- libavcodec/x86/mpegaudiodsp.c | 10 +++ libavcodec/x86/mpegvideoenc_template.c | 2 +- libavcodec/x86/simple_idct.c | 2 +- libavcodec/x86/vp9dsp_init.c | 2 +- libavutil/internal.h | 20 ++ 30 files changed, 94 insertions(+), 110 deletions(-) -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 0/3] Clean-up for LOCAL_ALIGNED
2015-03-15 8:48 GMT+01:00 Christophe Gisquet christophe.gisq...@gmail.com: The second patch is the most interesting, because it prevents incorrect uses of LOCAL_ALIGNED that may have only caused warnings. This patch is of course smaller because of the code duplication removal of the first patch. Patch series dropped. -- Christophe ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg issues
On Sun, Mar 15, 2015 at 01:15:27AM -0600, Dazzle Software wrote: Hello does anyone know why libflite will not compile I tried everything from yum versions as well I have compiled my own using the following compile of flite ./configure --prefix=/usr --enable-shared \ --with-audio=alsa \ --with-vox=cmu_us_kal16 I am using Centos 7 but I have also tried 6.6 as I trying create an auto installer version of ffmpeg with all libs enabled what is the relation between libflite not compiling and ffmpeg ? [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB DNS cache poisoning attacks, popular search engine, Google internet authority dont be evil, please signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/hevc_refs: Silence Could not find ref with POC for CRA/BLA
Avoids error messages during seeking Found-by: cousin_luigi Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavcodec/hevc_refs.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c index f6596e8..fea3d12 100644 --- a/libavcodec/hevc_refs.c +++ b/libavcodec/hevc_refs.c @@ -386,8 +386,9 @@ static HEVCFrame *find_ref_idx(HEVCContext *s, int poc) } } -av_log(s-avctx, AV_LOG_ERROR, - Could not find ref with POC %d\n, poc); +if (s-nal_unit_type != NAL_CRA_NUT !IS_BLA(s)) +av_log(s-avctx, AV_LOG_ERROR, + Could not find ref with POC %d\n, poc); return NULL; } -- 1.7.9.5 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 3/3] x86/proresdsp: remove ff_prores_idct_put_10_sse4
It's exactly the same as the sse2 version. Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm| 2 -- libavcodec/x86/proresdsp_init.c | 7 --- 2 files changed, 9 deletions(-) diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm index b18de53..7f41061 100644 --- a/libavcodec/x86/proresdsp.asm +++ b/libavcodec/x86/proresdsp.asm @@ -301,8 +301,6 @@ cglobal prores_idct_put_10, 4, 4, 15 INIT_XMM sse2 idct_put_fn -INIT_XMM sse4 -idct_put_fn %if HAVE_AVX_EXTERNAL INIT_XMM avx idct_put_fn diff --git a/libavcodec/x86/proresdsp_init.c b/libavcodec/x86/proresdsp_init.c index d647788..ead11ae 100644 --- a/libavcodec/x86/proresdsp_init.c +++ b/libavcodec/x86/proresdsp_init.c @@ -27,8 +27,6 @@ void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, int16_t *block, const int16_t *qmat); -void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, -int16_t *block, const int16_t *qmat); void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, int16_t *block, const int16_t *qmat); @@ -42,11 +40,6 @@ av_cold void ff_proresdsp_init_x86(ProresDSPContext *dsp, AVCodecContext *avctx) dsp-idct_put = ff_prores_idct_put_10_sse2; } -if (EXTERNAL_SSE4(cpu_flags)) { -dsp-idct_permutation_type = FF_IDCT_PERM_TRANSPOSE; -dsp-idct_put = ff_prores_idct_put_10_sse4; -} - if (EXTERNAL_AVX(cpu_flags)) { dsp-idct_permutation_type = FF_IDCT_PERM_TRANSPOSE; dsp-idct_put = ff_prores_idct_put_10_avx; -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/3] x86/proresdsp: remove unused macro
Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm | 14 -- 1 file changed, 14 deletions(-) diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm index 255eb24..752e504 100644 --- a/libavcodec/x86/proresdsp.asm +++ b/libavcodec/x86/proresdsp.asm @@ -300,20 +300,6 @@ cglobal prores_idct_put_10, 4, 4, %1 RET %endmacro -%macro SIGNEXTEND 2-3 -%if cpuflag(sse4) ; dstlow, dsthigh -movhlps %2, %1 -pmovsxwd%1, %1 -pmovsxwd%2, %2 -%elif cpuflag(sse2) ; dstlow, dsthigh, tmp -pxor%3, %3 -pcmpgtw %3, %1 -mova%2, %1 -punpcklwd %1, %3 -punpckhwd %2, %3 -%endif -%endmacro - INIT_XMM sse2 idct_put_fn 16 INIT_XMM sse4 -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/3] x86/proresdsp: remove an unnecessary pxor
Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm index 752e504..b18de53 100644 --- a/libavcodec/x86/proresdsp.asm +++ b/libavcodec/x86/proresdsp.asm @@ -233,10 +233,9 @@ section .text align=16 ; void ff_prores_idct_put_10_opt(uint8_t *pixels, int stride, ; int16_t *block, const int16_t *qmat); -%macro idct_put_fn 1 -cglobal prores_idct_put_10, 4, 4, %1 +%macro idct_put_fn 0 +cglobal prores_idct_put_10, 4, 4, 15 movsxd r1, r1d -pxorm15, m15 ; zero ; for (i = 0; i 8; i++) ; idctRowCondDC(block + i*8); @@ -301,12 +300,12 @@ cglobal prores_idct_put_10, 4, 4, %1 %endmacro INIT_XMM sse2 -idct_put_fn 16 +idct_put_fn INIT_XMM sse4 -idct_put_fn 16 +idct_put_fn %if HAVE_AVX_EXTERNAL INIT_XMM avx -idct_put_fn 16 +idct_put_fn %endif %endif -- 2.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] x86/proresdsp: remove unused macro
On Sun, Mar 15, 2015 at 03:08:33PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm | 14 -- 1 file changed, 14 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] libavformat/mxfdec: export user comments metadata
On 13/03/15 10:58 PM, Mark Reid wrote: --- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 94 +--- 2 files changed, 91 insertions(+), 4 deletions(-) From fate-mxf-missing-index-demux using valgrind ==6422== ==6422== HEAP SUMMARY: ==6422== in use at exit: 128 bytes in 3 blocks ==6422== total heap usage: 481 allocs, 478 frees, 276,837 bytes allocated ==6422== ==6422== 48 bytes in 1 blocks are definitely lost in loss record 3 of 3 ==6422==at 0x4C2C526: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0x4C2C641: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0xD454CF: av_malloc (mem.c:95) ==6422==by 0xD454CF: av_mallocz (mem.c:252) ==6422==by 0xD454CF: av_calloc (mem.c:262) ==6422==by 0x5CA3B7: mxf_read_strong_ref_array (mxfdec.c:693) ==6422==by 0x5CA3B7: mxf_read_package (mxfdec.c:874) ==6422==by 0x5CD352: mxf_read_local_tags (mxfdec.c:2292) ==6422==by 0x5CD352: mxf_parse_klv (mxfdec.c:2340) ==6422==by 0x5CD352: mxf_read_header (mxfdec.c:2735) ==6422==by 0x639701: avformat_open_input (utils.c:466) ==6422==by 0x476B14: open_input_file (ffmpeg_opt.c:890) ==6422==by 0x477F77: open_files (ffmpeg_opt.c:2733) ==6422==by 0x477F77: ffmpeg_parse_options (ffmpeg_opt.c:2770) ==6422==by 0x468E46: main (ffmpeg.c:4010) ==6422== { ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Fix changed channel layout log info
Hi! It seems to me that the line that is shown when the channel layout changes uses an incorrect new layout. The current output can be (line breaks for readability): Input stream #0:1 frame changed from rate:48000 fmt:fltp ch:8 chl:7.1 to rate:48000 fmt:fltp ch:8 chl:7.1 if the channel layout changes to 8 channels). Please review, Carl Eugen diff --git a/ffmpeg.c b/ffmpeg.c index 0f67b11..4e6e471 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1870,13 +1870,13 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ist-st-index); exit_program(1); } -decoded_frame-channel_layout = avctx-channel_layout; - av_get_channel_layout_string(layout1, sizeof(layout1), ist-resample_channels, ist-resample_channel_layout); av_get_channel_layout_string(layout2, sizeof(layout2), avctx-channels, decoded_frame-channel_layout); +decoded_frame-channel_layout = avctx-channel_layout; + av_log(NULL, AV_LOG_INFO, Input stream #%d:%d frame changed from rate:%d fmt:%s ch:%d chl:%s to rate:%d fmt:%s ch:%d chl:%s\n, ist-file_index, ist-st-index, ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] store cookies returned in HLS key responses
On Sun, Mar 15, 2015 at 10:00:38AM +1100, Micah Galizia wrote: Hello, Neulion has added Set-Cookie fields in the response headers of their HLS key files. Those cookie values must be echoed back in the next key request or authentication on the subsequent key will fail. This fix will exacerbate the existing bug where the cookie field of ffmpeg requests keeps getting larger (since cookies are append when they should be replaced). However, those streams will fail sooner without this fix. Also, I have a fix for that bug too, but I'll start with this. Thanks in advance! -- The mark of an immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one. --W. Stekel hls.c |5 + 1 file changed, 5 insertions(+) 0105a89eff5edb6fbc2751a369447dd743496476 0001-store-cookies-returned-in-HLS-key-response.patch From 7f2db07b91407a970b99655da96c8c2532e2c1ad Mon Sep 17 00:00:00 2001 From: Micah Galizia micahgali...@gmail.com Date: Sun, 15 Mar 2015 09:31:59 +1100 Subject: [PATCH] store cookies returned in HLS key response applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] libavformat/mxfdec: export user comments metadata
On Sun, Mar 15, 2015 at 1:59 PM, James Almer jamr...@gmail.com wrote: On 13/03/15 10:58 PM, Mark Reid wrote: --- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 94 +--- 2 files changed, 91 insertions(+), 4 deletions(-) From fate-mxf-missing-index-demux using valgrind ==6422== ==6422== HEAP SUMMARY: ==6422== in use at exit: 128 bytes in 3 blocks ==6422== total heap usage: 481 allocs, 478 frees, 276,837 bytes allocated ==6422== ==6422== 48 bytes in 1 blocks are definitely lost in loss record 3 of 3 ==6422==at 0x4C2C526: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0x4C2C641: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0xD454CF: av_malloc (mem.c:95) ==6422==by 0xD454CF: av_mallocz (mem.c:252) ==6422==by 0xD454CF: av_calloc (mem.c:262) ==6422==by 0x5CA3B7: mxf_read_strong_ref_array (mxfdec.c:693) ==6422==by 0x5CA3B7: mxf_read_package (mxfdec.c:874) ==6422==by 0x5CD352: mxf_read_local_tags (mxfdec.c:2292) ==6422==by 0x5CD352: mxf_parse_klv (mxfdec.c:2340) ==6422==by 0x5CD352: mxf_read_header (mxfdec.c:2735) ==6422==by 0x639701: avformat_open_input (utils.c:466) ==6422==by 0x476B14: open_input_file (ffmpeg_opt.c:890) ==6422==by 0x477F77: open_files (ffmpeg_opt.c:2733) ==6422==by 0x477F77: ffmpeg_parse_options (ffmpeg_opt.c:2770) ==6422==by 0x468E46: main (ffmpeg.c:4010) ==6422== { Forgot to free MXFPackage-comment_refs, attached patch should fix memory leak 0001-libavformat-mxfdec-fix-MXFPackage-comment_refs-memor.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] store cookies returned in HLS key responses
Excellent, thank you -- patch to refactor that repeated free/opt_get/free code (it happens four times) will be submitted shortly... On Mon, Mar 16, 2015 at 12:00 PM, Michael Niedermayer michae...@gmx.at wrote: On Sun, Mar 15, 2015 at 10:00:38AM +1100, Micah Galizia wrote: Hello, Neulion has added Set-Cookie fields in the response headers of their HLS key files. Those cookie values must be echoed back in the next key request or authentication on the subsequent key will fail. This fix will exacerbate the existing bug where the cookie field of ffmpeg requests keeps getting larger (since cookies are append when they should be replaced). However, those streams will fail sooner without this fix. Also, I have a fix for that bug too, but I'll start with this. Thanks in advance! -- The mark of an immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one. --W. Stekel hls.c |5 + 1 file changed, 5 insertions(+) 0105a89eff5edb6fbc2751a369447dd743496476 0001-store-cookies-returned-in-HLS-key-response.patch From 7f2db07b91407a970b99655da96c8c2532e2c1ad Mon Sep 17 00:00:00 2001 From: Micah Galizia micahgali...@gmail.com Date: Sun, 15 Mar 2015 09:31:59 +1100 Subject: [PATCH] store cookies returned in HLS key response applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel -- The mark of an immature man is that he wants to die nobly for a cause, while the mark of the mature man is that he wants to live humbly for one. --W. Stekel ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/3] x86/proresdsp: remove unused macro
On 15/03/15 5:10 PM, Michael Niedermayer wrote: On Sun, Mar 15, 2015 at 03:08:33PM -0300, James Almer wrote: Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm | 14 -- 1 file changed, 14 deletions(-) LGTM Pushed, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] x86/proresdsp: remove ff_prores_idct_put_10_sse4
On Sun, Mar 15, 2015 at 03:08:35PM -0300, James Almer wrote: It's exactly the same as the sse2 version. Signed-off-by: James Almer jamr...@gmail.com --- libavcodec/x86/proresdsp.asm| 2 -- libavcodec/x86/proresdsp_init.c | 7 --- 2 files changed, 9 deletions(-) if they are the same, sure ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mov: Disallow .. in dref unless use_absolute_path is set
On Sat, Mar 14, 2015 at 09:43:07PM +0100, Michael Niedermayer wrote: as this kind of allows to circumvent it to some extend. We also could add a separate parameter or value to choose this Found-by: ramiro Signed-off-by: Michael Niedermayer michae...@gmx.at --- libavformat/mov.c |3 +++ 1 file changed, 3 insertions(+) applied [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB DNS cache poisoning attacks, popular search engine, Google internet authority dont be evil, please signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2] libavformat/mxfdec: export user comments metadata
On Sun, Mar 15, 2015 at 02:46:57PM -0700, Mark Reid wrote: On Sun, Mar 15, 2015 at 1:59 PM, James Almer jamr...@gmail.com wrote: On 13/03/15 10:58 PM, Mark Reid wrote: --- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 94 +--- 2 files changed, 91 insertions(+), 4 deletions(-) From fate-mxf-missing-index-demux using valgrind ==6422== ==6422== HEAP SUMMARY: ==6422== in use at exit: 128 bytes in 3 blocks ==6422== total heap usage: 481 allocs, 478 frees, 276,837 bytes allocated ==6422== ==6422== 48 bytes in 1 blocks are definitely lost in loss record 3 of 3 ==6422==at 0x4C2C526: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0x4C2C641: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==6422==by 0xD454CF: av_malloc (mem.c:95) ==6422==by 0xD454CF: av_mallocz (mem.c:252) ==6422==by 0xD454CF: av_calloc (mem.c:262) ==6422==by 0x5CA3B7: mxf_read_strong_ref_array (mxfdec.c:693) ==6422==by 0x5CA3B7: mxf_read_package (mxfdec.c:874) ==6422==by 0x5CD352: mxf_read_local_tags (mxfdec.c:2292) ==6422==by 0x5CD352: mxf_parse_klv (mxfdec.c:2340) ==6422==by 0x5CD352: mxf_read_header (mxfdec.c:2735) ==6422==by 0x639701: avformat_open_input (utils.c:466) ==6422==by 0x476B14: open_input_file (ffmpeg_opt.c:890) ==6422==by 0x477F77: open_files (ffmpeg_opt.c:2733) ==6422==by 0x477F77: ffmpeg_parse_options (ffmpeg_opt.c:2770) ==6422==by 0x468E46: main (ffmpeg.c:4010) ==6422== { Forgot to free MXFPackage-comment_refs, attached patch should fix memory leak mxfdec.c |1 + 1 file changed, 1 insertion(+) 202cb7a00fecba77e27403225c24add3b46dd2c0 0001-libavformat-mxfdec-fix-MXFPackage-comment_refs-memor.patch From d5b242850ddbec4e7ed2d9afdabf3169604b952e Mon Sep 17 00:00:00 2001 From: Mark Reid mindm...@gmail.com Date: Sun, 15 Mar 2015 14:43:32 -0700 Subject: [PATCH] libavformat/mxfdec: fix MXFPackage-comment_refs memory leak applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] AAC: [PATCH] AAC: Add support for 7350Hz sampling rates
On Fri, Mar 13, 2015 at 03:53:56PM -0300, Claudio Freire wrote: On Fri, Mar 13, 2015 at 3:06 PM, Michael Niedermayer michae...@gmx.at wrote: On Fri, Mar 13, 2015 at 02:34:08PM -0300, Claudio Freire wrote: On Fri, Mar 13, 2015 at 12:39 PM, Nedeljko Babic nedeljko.ba...@imgtec.com wrote: btw, i use the qemu from https://github.com/ssvb/QEMU.git for mips as it at least years ago supported more extensions, i would have guessed these where merged into main qemu but as you list all the disables in the wiki, maybe i was guessing wrong I can confirm that main qemu supports both fpu and dspr1/dspr2 extension. Appropriate cpu model needs to be selected in order for the extension to be available. 74Kf supports all extensions, so adding -cpu 74Kf in --target-exec should enable fpu, dspr1 and dspr2 extensions. As I was building on a more complete reply, the problem I have is with the glibc, which is built with the soft float ABI. As soon as I finish all the tests (they take a while) I'll post more they really shouldnt take much time a build (with ccache) should be quite fast and you only need to test make -jnum fate-aac-s7350-encode can it be that theres some float rounding somewhere that leads to a different decission that causes this ? Soft float is slow, add emulation and it's worse. The build is fast enough, it's the tests the ones that are slow. I'm going to try adding a hard-float version of the glibc in opensuse's build service. But first I want to get the patch that fixes mips tests verified. btw, if you cant reproduce this issue, maybe it would be best to just leave this one fate test out and continue, maybe one of the subsequent bug fixes will fix this too [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] ffmpeg issues
Tested this with different both 1.7 and 2.0 release but the same issue still applies I have also tried static and shared but same issue always seems to come up it either shows the following when it does compile /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../libflite_cmu_us_awb.so: undefined reference to `flite_feat_set_int' /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../libflite_cmu_us_awb.so: undefined reference to `cg_db_val' /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../libflite_cmu_us_awb.so: undefined reference to `flite_feat_set' /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../libflite_cmu_us_awb.so: undefined reference to `cg_synth' /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../libflite_cmu_us_awb.so: undefined reference to `flite_feat_set_string' but other times it just says ERROR: libflite not found but even it exists and have it installed to /usr/lib Stephen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel