Re: [FFmpeg-devel] [PATCH] Add NVENC encoder
I haven't looked in detail, but this doesn't seem like a good idea to me. For example it can't handle having different encoders using different cards/hardware. I don't know what other options there might be, maybe this is the best, but it seems not particularly good. The only other option would be to assume it's always only NV12, which is true for all hardware currently in existence. Unfortunately it needs a full CUDA and NVENC init to query the supported formats. signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [Patch 2/5]Fix h264 on POWER LE: libavcodec/ppc/h264dsp.c
On Thu, Nov 27, 2014 at 02:35:24PM +0800, rongyan wrote: Hi, We present 5 patches to fix h264 bugs for POWER8 little endian, which are sent in 5 seperate emails. This is the second, to fix the functions h264_idct8_add_altivec(); h264_idct_dc_add_internal(); h264_loop_filter_luma_altivec(); write16x4() VEC_1D_DCT(); weight_h264_W_altivec(); biweight_h264_W_altivec(); VEC_LOAD_U8_ADD_S16_STORE_U8(); ALTIVEC_STORE_SUM_CLIP(); And add marcos GET_2PERM(), dstv_load(),vdst_load(), dest_unligned_store(). The fate test result after merge these 5 patches can be found on website by searching ibmcrl, also attached in the below to facilitate the review. The passed test cases change from 2017/2243 to 2209/2245. Thanks. Rong Yan -- The world has enough for everyone's need, but not enough for everyone's greed. h264dsp.c | 374 +- 1 file changed, 205 insertions(+), 169 deletions(-) dcaccec4338f960704148c933e1ec454dd4dc6a2 0002-libavcodec-ppc-h264dsp.c-fix-h264_idct8_add_altivec.patch From 130b20e650a2d83a4c66cd23c10fe943742339f8 Mon Sep 17 00:00:00 2001 From: Rong Yan rongyan...@gmail.com Date: Thu, 27 Nov 2014 05:49:53 + Subject: [PATCH 2/5] libavcodec/ppc/h264dsp.c : fix h264_idct8_add_altivec() h264_idct_dc_add_internal() h264_loop_filter_luma_altivec() write16x4() VEC_1D_DCT() weight_h264_W_altivec() biweight_h264_W_altivec() VEC_LOAD_U8_ADD_S16_STORE_U8() ALTIVEC_STORE_SUM_CLIP() add marcos GET_2PERM() dstv_load() vdst_load() dest_unligned_store() for POWER LE --- libavcodec/ppc/h264dsp.c | 374 ++- 1 file changed, 205 insertions(+), 169 deletions(-) diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c index 7fc7e0b..cfce32d 100644 --- a/libavcodec/ppc/h264dsp.c +++ b/libavcodec/ppc/h264dsp.c @@ -34,7 +34,7 @@ * IDCT transform: / -#define VEC_1D_DCT(vb0,vb1,vb2,vb3,va0,va1,va2,va3) \ +#define VEC_1D_DCT(vb0,vb1,vb2,vb3,va0,va1,va2,va3) {\ /* 1st stage */ \ vz0 = vec_add(vb0,vb2); /* temp[0] = Y[0] + Y[2] */ \ vz1 = vec_sub(vb0,vb2); /* temp[1] = Y[0] - Y[2] */ \ @@ -46,7 +46,8 @@ va0 = vec_add(vz0,vz3); /* x[0] = temp[0] + temp[3] */ \ va1 = vec_add(vz1,vz2); /* x[1] = temp[1] + temp[2] */ \ va2 = vec_sub(vz1,vz2); /* x[2] = temp[1] - temp[2] */ \ -va3 = vec_sub(vz0,vz3)/* x[3] = temp[0] - temp[3] */ +va3 = vec_sub(vz0,vz3);/* x[3] = temp[0] - temp[3] */\ +} #define VEC_TRANSPOSE_4(a0,a1,a2,a3,b0,b1,b2,b3) \ b0 = vec_mergeh( a0, a0 ); \ @@ -62,14 +63,23 @@ b2 = vec_mergeh( a1, a3 ); \ b3 = vec_mergel( a1, a3 ) -#define VEC_LOAD_U8_ADD_S16_STORE_U8(va) \ -vdst_orig = vec_ld(0, dst); \ -vdst = vec_perm(vdst_orig, zero_u8v, vdst_mask); \ -vdst_ss = (vec_s16) vec_mergeh(zero_u8v, vdst); \ -va = vec_add(va, vdst_ss);\ -va_u8 = vec_packsu(va, zero_s16v);\ -va_u32 = vec_splat((vec_u32)va_u8, 0); \ -vec_ste(va_u32, element, (uint32_t*)dst); +#if HAVE_BIGENDIAN +#define vdst_load(d)\ +vdst_orig = vec_ld(0, dst); \ +vdst = vec_perm(vdst_orig, zero_u8v, vdst_mask) +#else +#define vdst_load(d)\ +vdst = vec_vsx_ld(0, dst) +#endif + +#define VEC_LOAD_U8_ADD_S16_STORE_U8(va) {\ +vdst_load();\ +vdst_ss = (vec_s16) VEC_MERGEH(zero_u8v, vdst);\ +va = vec_add(va, vdst_ss);\ +va_u8 = vec_packsu(va, zero_s16v);\ +va_u32 = vec_splat((vec_u32)va_u8, 0);\ +vec_ste(va_u32, element, (uint32_t*)dst);\ +} please dont mix whitespace changes with functional changes this makes the patch and commit unreadable it also can cause problems for other developers as rebasing their work becomes harder if the code changed alot please leave the whitespaces in place git show HEAD^^^ -w --stat libavcodec/ppc/h264dsp.c | 106 +++--- 1 file changed, 71 insertions(+), 35 deletions(-) git show HEAD^^^ --stat libavcodec/ppc/h264dsp.c | 374 +- 1 file changed, 205 insertions(+), 169 deletions(-) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship naturally arises out of democracy, and the most aggravated form of tyranny and slavery out of the most extreme liberty. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays
On Thu, Nov 27, 2014 at 12:29:12PM +0100, Stefano Sabatini wrote: --- libavutil/imgutils.c | 3 --- 1 file changed, 3 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] msvc: Fix compilation errors due to header include order.
The patch lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink that was recently added has broken msvc/icl builds. see: http://fate.ffmpeg.org/report.cgi?time=20141126233318slot=x86_32-msvc12-windows-native This is because winsock2.h must be included before windows.h. There are many other files that include windows.h that dont check for winsock2.h (as they dont need it) but include avformat/internal.h which now includes winsock2.h but after all the files that explicitly include their own windows.h. As a result all these files now wont compile under msvc/icl and generate warnings under mingw. The attached patch fixes that by ensuring the correct header include order. Matt 0001-msvc-Fix-compilation-errors-due-to-header-include-or.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays
On Thu, Nov 27, 2014 at 12:36:42PM +0100, Michael Niedermayer wrote: On Thu, Nov 27, 2014 at 12:29:12PM +0100, Stefano Sabatini wrote: --- libavutil/imgutils.c | 3 --- 1 file changed, 3 deletions(-) LGTM that is assuming its ok if the output arrays change on error, i think the function can change them in that case [...] -- 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] msvc: Fix compilation errors due to header include order.
On Thu, Nov 27, 2014 at 10:38:01PM +1100, Matt Oliver wrote: The patch lavf: Use wchar functions for filenames on windows for mkdir/rmdir/rename/unlink that was recently added has broken msvc/icl builds. see: http://fate.ffmpeg.org/report.cgi?time=20141126233318slot=x86_32-msvc12-windows-native This is because winsock2.h must be included before windows.h. There are many other files that include windows.h that dont check for winsock2.h (as they dont need it) but include avformat/internal.h which now includes winsock2.h but after all the files that explicitly include their own windows.h. As a result all these files now wont compile under msvc/icl and generate warnings under mingw. The attached patch fixes that by ensuring the correct header include order. Matt libavdevice/dshow_capture.h |1 + libavdevice/opengl_enc.c|1 + libavformat/matroskadec.c | 13 +++-- libavutil/atomic_win32.h|1 + 4 files changed, 10 insertions(+), 6 deletions(-) 9e42eb2c99e61e5a0a250c4bc0e9e9fc29c31ab9 0001-msvc-Fix-compilation-errors-due-to-header-include-or.patch From fe33232f3991796b4c8437016cfe66ac5599f36e Mon Sep 17 00:00:00 2001 From: Matthew Oliver protogo...@gmail.com Date: Thu, 27 Nov 2014 19:00:36 +1100 Subject: [PATCH] msvc: Fix compilation errors due to header include order. Ensures that the header include order is such that winsock2.h is always included before windows.h or that windows.h does not include winsock.h. applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] Move extralibs variables using ldl after ldl definition
From: Timo Rothenpieler t...@rothenpieler.org --- configure | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 38619c4..8ecc7fa 100755 --- a/configure +++ b/configure @@ -2569,16 +2569,13 @@ drawtext_filter_deps=libfreetype ebur128_filter_deps=gpl flite_filter_deps=libflite frei0r_filter_deps=frei0r dlopen -frei0r_filter_extralibs='$ldl' frei0r_src_filter_deps=frei0r dlopen -frei0r_src_filter_extralibs='$ldl' geq_filter_deps=gpl histeq_filter_deps=gpl hqdn3d_filter_deps=gpl interlace_filter_deps=gpl kerndeint_filter_deps=gpl ladspa_filter_deps=ladspa dlopen -ladspa_filter_extralibs='$ldl' mcdeint_filter_deps=avcodec gpl movie_filter_deps=avcodec avformat mp_filter_deps=gpl avcodec swscale @@ -4650,6 +4647,10 @@ elif check_func dlopen -ldl; then ldl=-ldl fi +frei0r_filter_extralibs='$ldl' +frei0r_src_filter_extralibs='$ldl' +ladspa_filter_extralibs='$ldl' + if ! disabled network; then check_func getaddrinfo $network_extralibs check_func getservbyport $network_extralibs -- 2.1.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Add NVENC encoder
On 26 Nov, Nicolas George wrote : Le sextidi 6 frimaire, an CCXXIII, Hendrik Leppkes a écrit : Thats just wrong. There is not one line of proprietary/non-free code that gets included or linked in libavcodec. (IANAL) I do not think it works that way. You could apply the same reasoning when linking a proprietary software with a GPL shared library and deduce that it is ok to distribute the resulting binary: this is not the usual doctrine. Unfortunately, I have to agree with Nicolas. This is the reason why the MingW and Wine projects reimplemented all the headers based on the MSDN documentation. Because using non-free headers is very debatable and usually considered as not ok by US lawyers (and nVidia is a US company) Additionally, the API in use is part of the GPU driver, which I would strongly consider to be a system library (if a driver is not system, what is?), and as such falls under the system library exemption in any case. This one looks valid to me. It only covers the GPL side of the question though. Yes, but not for the header. With my kindest regards, -- Jean-Baptiste Kempf http://www.jbkempf.com/ - +33 672 704 734 Sent from my Electronic Device ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavu/imgutils: remove redundant and wrong check in av_image_fill_arrays
On date Thursday 2014-11-27 12:38:21 +0100, Michael Niedermayer encoded: On Thu, Nov 27, 2014 at 12:36:42PM +0100, Michael Niedermayer wrote: On Thu, Nov 27, 2014 at 12:29:12PM +0100, Stefano Sabatini wrote: --- libavutil/imgutils.c | 3 --- 1 file changed, 3 deletions(-) LGTM that is assuming its ok if the output arrays change on error, i think the function can change them in that case I remember that assumption in legacy code (data pointers were set to NULL in case of error), that was the reason for the double check, but I couldn't find any instance requiring that condition, and that's not documented so it's probably fine to remove the check. Patch was already applied when I read your message. -- FFmpeg = Fiendish Fiendish Moronic Philosophical Exxagerate God ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu/opt: add escaping to av_opt_serialize
On date Tuesday 2014-11-25 20:38:59 +0100, Lukasz Marek encoded: Patch attached. From 2a9de161df4e1d0083264dde94ec5b8af59cec35 Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Tue, 25 Nov 2014 20:25:10 +0100 Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c| 12 +++- libavutil/opt.h| 1 + tests/ref/fate/opt | 7 +-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 0546a37..5b9cc35 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1843,6 +1843,11 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, uint8_t *buf; AVBPrint bprint; int ret, cnt = 0; +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; + +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == key_val_sep || +pairs_sep == '\\' || key_val_sep == '\\') +return AVERROR(EINVAL); maybe send a log here if (!obj || !buffer) return AVERROR(EINVAL); @@ -1866,7 +1871,9 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, if (buf) { if (cnt++) av_bprint_append_data(bprint, pairs_sep, 1); -av_bprintf(bprint, %s%c%s, o-name, key_val_sep, buf); +av_bprint_escape(bprint, o-name, special_chars, AV_ESCAPE_MODE_BACKSLASH, 0); +av_bprint_append_data(bprint, key_val_sep, 1); +av_bprint_escape(bprint, buf, special_chars, AV_ESCAPE_MODE_BACKSLASH, 0); av_freep(buf); } } @@ -1900,6 +1907,7 @@ typedef struct TestContext int64_t num64; float flt; double dbl; +char *escape; } TestContext; #define OFFSET(x) offsetof(TestContext, x) @@ -1913,6 +1921,7 @@ static const AVOption test_options[]= { {toggle, set toggle, OFFSET(toggle), AV_OPT_TYPE_INT, {.i64 = 1}, 0,1 }, {rational, set rational, OFFSET(rational), AV_OPT_TYPE_RATIONAL, {.dbl = 1}, 0,10 }, {string, set string, OFFSET(string), AV_OPT_TYPE_STRING, {.str = default}, CHAR_MIN, CHAR_MAX }, +{escape, set escape str, OFFSET(escape), AV_OPT_TYPE_STRING, {.str = \\=,}, CHAR_MIN, CHAR_MAX }, {flags,set flags, OFFSET(flags),AV_OPT_TYPE_FLAGS,{.i64 = 1}, 0,INT_MAX, 0, flags }, {cool, set cool flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_COOL}, INT_MIN, INT_MAX, 0, flags }, {lame, set lame flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_LAME}, INT_MIN, INT_MAX, 0, flags }, @@ -1957,6 +1966,7 @@ int main(void) printf(num=%d\n, test_ctx.num); printf(toggle=%d\n, test_ctx.toggle); printf(string=%s\n, test_ctx.string); +printf(escape=%s\n, test_ctx.escape); printf(flags=%d\n, test_ctx.flags); printf(rational=%d/%d\n, test_ctx.rational.num, test_ctx.rational.den); printf(video_rate=%d/%d\n, test_ctx.video_rate.num, test_ctx.video_rate.den); diff --git a/libavutil/opt.h b/libavutil/opt.h index 7338e78..777fc3b 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -887,6 +887,7 @@ int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_fla * @param[in] key_val_sep character used to separate key from value * @param[in] pairs_sep character used to separate two pairs from each other * @return = 0 on success, negative on error + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. */ You could mention escaping in the docs, for example: A key/value or pairs separator occurring in the serialized value or name string are escaped through the av_escape() function. int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, const char key_val_sep, const char pairs_sep); diff --git a/tests/ref/fate/opt b/tests/ref/fate/opt index 16f3387..084a222 100644 --- a/tests/ref/fate/opt +++ b/tests/ref/fate/opt @@ -2,6 +2,7 @@ Testing default values num=0 toggle=1 string=default +escape=\=, flags=1 rational=1/1 video_rate=25/1 @@ -22,6 +23,7 @@ name: num default:1 error: name:toggle default:0 error: name: rational default:0 error: name:string default:0 error: +name:escape default:0 error: name: flags default:0 error: name: cool default:1 error:Option not found name: lame default:1 error:Option not found @@ -43,6 +45,7 @@ name: num default:1 error: name:toggle default:1 error: name: rational default:1 error: name:string default:1 error: +name:escape default:1 error: name: flags default:1 error: name: cool default:1
[FFmpeg-devel] [PATCH 1/2] avcodec/pngdec: split P frames handling to a separate function.
--- libavcodec/pngdec.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 35dcd76..8529956 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -825,6 +825,22 @@ static int decode_fctl_chunk(AVCodecContext *avctx, PNGDecContext *s, return 0; } +static void handle_p_frame_png(PNGDecContext *s, AVFrame *p) +{ +int i, j; +uint8_t *pd = p-data[0]; +uint8_t *pd_last = s-last_picture.f-data[0]; +int ls = FFMIN(av_image_get_linesize(p-format, s-width, 0), s-width * s-bpp); + +ff_thread_await_progress(s-last_picture, INT_MAX, 0); +for (j = 0; j s-height; j++) { +for (i = 0; i ls; i++) +pd[i] += pd_last[i]; +pd += s-image_linesize; +pd_last += s-image_linesize; +} +} + static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s, AVFrame *p, AVPacket *avpkt) { @@ -936,18 +952,7 @@ exit_loop: s-last_picture.f-height== p-height s-last_picture.f-format== p-format ) { -int i, j; -uint8_t *pd = p-data[0]; -uint8_t *pd_last = s-last_picture.f-data[0]; -int ls = FFMIN(av_image_get_linesize(p-format, s-width, 0), s-width * s-bpp); - -ff_thread_await_progress(s-last_picture, INT_MAX, 0); -for (j = 0; j s-height; j++) { -for (i = 0; i ls; i++) -pd[i] += pd_last[i]; -pd += s-image_linesize; -pd_last += s-image_linesize; -} +handle_p_frame_png(s, p); } } ff_thread_report_progress(s-picture, INT_MAX, 0); -- 2.2.0.rc2.23.gca0107e ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] lavc/options: fix leaks in avcodec_copy_context
On 27 November 2014 at 04:17, Michael Niedermayer michae...@gmx.at wrote: On Thu, Nov 27, 2014 at 12:43:57AM +0100, Lukasz Marek wrote: On 24.11.2014 05:16, Lukasz Marek wrote: Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavcodec/options.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 7f9fb07..8ba997c 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -190,6 +190,11 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) } av_opt_free(dest); +av_freep(dest-rc_override); +av_freep(dest-intra_matrix); +av_freep(dest-inter_matrix); +av_freep(dest-extradata); +av_freep(dest-subtitle_header); memcpy(dest, src, sizeof(*dest)); av_opt_copy(dest, src); @@ -205,13 +210,7 @@ int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src) dest-slice_offset= NULL; dest-hwaccel = NULL; dest-internal= NULL; - -/* reallocate values that should be allocated separately */ -dest-extradata = NULL; -dest-intra_matrix= NULL; -dest-inter_matrix= NULL; -dest-rc_override = NULL; -dest-subtitle_header = NULL; This should stay. Updated version attched options.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) 971d1769e50d2e853d7359003f8c924092a96e6b 0001-lavc-options-fix-leaks-in-avcodec_copy_context.patch From 722d7e837093212d6e6e6b17814ed408300d25a6 Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Thu, 27 Nov 2014 00:41:16 +0100 Subject: [PATCH] lavc/options: fix leaks in avcodec_copy_context Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavcodec/options.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) breaks make fate-lavf-yuv4mpeg --- ./tests/ref/lavf/yuv4mpeg 2014-11-26 20:04:48.466295490 +0100 +++ tests/data/fate/lavf-yuv4mpeg 2014-11-27 04:16:07.234916526 +0100 @@ -1,2 +0,0 @@ -ec8178cb152f9cdbfd9cb724d977db2e *./tests/data/lavf/lavf.y4m -3801808 ./tests/data/lavf/lavf.y4m Test lavf-yuv4mpeg failed. Look at tests/data/fate/lavf-yuv4mpeg.err for details. make: *** [fate-lavf-yuv4mpeg] Error 139 This is because ffmpeg copy opened codec context and assumes copy is also opened, but this is against docs: Copy the settings of the source AVCodecContext into the destination AVCodecContext. The resulting destination codec context will be unopened, i.e. you are required to call avcodec_open2() before you can use this AVCodecContext to decode/encode video/audio data. I will push a patch for ffmpeg later and this patch have to be cleary postponed until ffmpeg is fixed. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/mov: strengthen some table allocations
On Thu, Nov 27, 2014 at 12:20:07AM +0100, Michael Niedermayer wrote: On Wed, Nov 26, 2014 at 10:48:10PM +0100, Clément Bœsch wrote: From: Clément Bœsch clem...@stupeflix.com --- libavformat/mov.c | 48 +++- 1 file changed, 27 insertions(+), 21 deletions(-) LGTM thanks Applied. -- Clément B. pgpoegOp55HVL.pgp Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu/opt: add escaping to av_opt_serialize
On 27 November 2014 at 15:05, Stefano Sabatini stefa...@gmail.com wrote: On date Tuesday 2014-11-25 20:38:59 +0100, Lukasz Marek encoded: Patch attached. From 2a9de161df4e1d0083264dde94ec5b8af59cec35 Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Tue, 25 Nov 2014 20:25:10 +0100 Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c| 12 +++- libavutil/opt.h| 1 + tests/ref/fate/opt | 7 +-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 0546a37..5b9cc35 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1843,6 +1843,11 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, uint8_t *buf; AVBPrint bprint; int ret, cnt = 0; +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; + +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == key_val_sep || +pairs_sep == '\\' || key_val_sep == '\\') +return AVERROR(EINVAL); maybe send a log here Added. --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -887,6 +887,7 @@ int av_opt_is_set_to_default_by_name(void *obj, const char *name, int search_fla * @param[in] key_val_sep character used to separate key from value * @param[in] pairs_sep character used to separate two pairs from each other * @return = 0 on success, negative on error + * @warning Separators cannot be neither '\\' nor '\0'. They also cannot be the same. */ You could mention escaping in the docs, for example: A key/value or pairs separator occurring in the serialized value or name string are escaped through the av_escape() function. Added. Updated patch attached. From e84ba5a67d74f58b59f5fa30bdb60df856c4c29e Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Tue, 25 Nov 2014 20:25:10 +0100 Subject: [PATCH] lavu/opt: add escaping to av_opt_serialize Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c| 14 +- libavutil/opt.h| 3 +++ tests/ref/fate/opt | 7 +-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 5b26a00..2f8ea0c 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1846,6 +1846,13 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, uint8_t *buf; AVBPrint bprint; int ret, cnt = 0; +const char special_chars[] = {pairs_sep, key_val_sep, '\0'}; + +if (pairs_sep == '\0' || key_val_sep == '\0' || pairs_sep == key_val_sep || +pairs_sep == '\\' || key_val_sep == '\\') { +av_log(obj, AV_LOG_ERROR, Invalid separator(s).); +return AVERROR(EINVAL); +} if (!obj || !buffer) return AVERROR(EINVAL); @@ -1869,7 +1876,9 @@ int av_opt_serialize(void *obj, int opt_flags, int flags, char **buffer, if (buf) { if (cnt++) av_bprint_append_data(bprint, pairs_sep, 1); -av_bprintf(bprint, %s%c%s, o-name, key_val_sep, buf); +av_bprint_escape(bprint, o-name, special_chars, AV_ESCAPE_MODE_BACKSLASH, 0); +av_bprint_append_data(bprint, key_val_sep, 1); +av_bprint_escape(bprint, buf, special_chars, AV_ESCAPE_MODE_BACKSLASH, 0); av_freep(buf); } } @@ -1903,6 +1912,7 @@ typedef struct TestContext int64_t num64; float flt; double dbl; +char *escape; } TestContext; #define OFFSET(x) offsetof(TestContext, x) @@ -1916,6 +1926,7 @@ static const AVOption test_options[]= { {toggle, set toggle, OFFSET(toggle), AV_OPT_TYPE_INT, {.i64 = 1}, 0,1 }, {rational, set rational, OFFSET(rational), AV_OPT_TYPE_RATIONAL, {.dbl = 1}, 0,10 }, {string, set string, OFFSET(string), AV_OPT_TYPE_STRING, {.str = default}, CHAR_MIN, CHAR_MAX }, +{escape, set escape str, OFFSET(escape), AV_OPT_TYPE_STRING, {.str = \\=,}, CHAR_MIN, CHAR_MAX }, {flags,set flags, OFFSET(flags),AV_OPT_TYPE_FLAGS,{.i64 = 1}, 0,INT_MAX, 0, flags }, {cool, set cool flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_COOL}, INT_MIN, INT_MAX, 0, flags }, {lame, set lame flag , 0,AV_OPT_TYPE_CONST,{.i64 = TEST_FLAG_LAME}, INT_MIN, INT_MAX, 0, flags }, @@ -1960,6 +1971,7 @@ int main(void) printf(num=%d\n, test_ctx.num); printf(toggle=%d\n, test_ctx.toggle); printf(string=%s\n, test_ctx.string); +printf(escape=%s\n, test_ctx.escape); printf(flags=%d\n, test_ctx.flags); printf(rational=%d/%d\n, test_ctx.rational.num, test_ctx.rational.den); printf(video_rate=%d/%d\n, test_ctx.video_rate.num,
[FFmpeg-devel] DVB subtitles with multiple langage
hello I just uploaded a few minutes ago a sample of a movie in the incoming folder, as requested by ffmpeg as you can see on the picture in attach I recorded this movie on french sat tv, it contains 2 audio streams and 2 subtitles stream, voir for french langage and the other one for deaf people hope it can help for improving the features thank you PS: the file is named 14-11-27_sample_DVBsub_multiple_langage_frenchTV.ts ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/3] lavf/ffmenc: store recommended encoder configuration
On 27.11.2014 01:10, Michael Niedermayer wrote: On Wed, Nov 26, 2014 at 11:53:41PM +0100, Lukasz Marek wrote: ffmenc will store recommended encoder configuration if present. This will allow the user to base on local defaults and apply only explicitly set options. If recommended encoder configuration is not present, then non-default context's options are stored. Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavformat/ffmenc.c | 74 +--- 1 file changed, 70 insertions(+), 4 deletions(-) this should bump micro or minor version of avformat bumped micro otherwise looks ok pushed all 3, thx ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavu/opt: add const to av_opt_copy arg
On 27.11.2014 04:06, Michael Niedermayer wrote: On Thu, Nov 27, 2014 at 12:37:38AM +0100, Lukasz Marek wrote: On 24.11.2014 02:06, Michael Niedermayer wrote: On Sun, Nov 23, 2014 at 10:25:39PM +0100, Lukasz Marek wrote: On 23.11.2014 02:29, Michael Niedermayer wrote: On Sun, Nov 23, 2014 at 01:01:19AM +0100, Lukasz Marek wrote: On 23.11.2014 00:58, Lukasz Marek wrote: Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 2 +- libavutil/opt.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 0546a37..47b1f0c 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -1570,7 +1570,7 @@ static int opt_size(enum AVOptionType type) return 0; } -int av_opt_copy(void *dst, void *src) +int av_opt_copy(void *dst, FF_CONST_AVUTIL53 void *src) { const AVOption *o = NULL; const AVClass *c; diff --git a/libavutil/opt.h b/libavutil/opt.h index 7338e78..6b6c996 100644 --- a/libavutil/opt.h +++ b/libavutil/opt.h @@ -825,7 +825,7 @@ int av_opt_query_ranges(AVOptionRanges **, void *obj, const char *key, int flags * @param src Object to copy into * @return 0 on success, negative on error */ -int av_opt_copy(void *dest, void *src); +int av_opt_copy(void *dest, FF_CONST_AVUTIL53 void *src); /** * Get a default list of allowed ranges for the given option. I added FF_CONST_AVUTILS53 macro, but is this really needed? Cannot be just const? I'm asking because I think it doesn't fix anything. I guess is it API/ABI thing, but why? a user application could have a function pointer like all_ffmpeg_functions-opt_copy = av_opt_copy; and if we add const the prototype changes and this can fail to build with some compiler flags or C++ or whatever and yes i have seen an application that had function pointers to ffmpeg functions Thx for explanation. It would be good to have option to disable this compability mode too. Sometimes it is not helping but annoying for most users. I attached updated patch. I add const to av_next_option and av_opt_next to avoid warnings. It have to be applied on top of [PATCH 1/2] lavu/opt: handle NULL obj in av_opt_next There is much more places it could be added in opt.c, but this would again trigger adding in other files (like log.h) to avoid warnings. opt.c |6 +++--- opt.h |6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 8a3df1768aaaef53aa632d5515b5041e7ba7c8f0 0001-lavu-opt-add-const-to-av_opt_copy-arg-and-dependenci.patch From a8989702029f8c536b2153d3e6b52b1c3a9cc20f Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Sat, 22 Nov 2014 20:41:21 +0100 Subject: [PATCH] lavu/opt: add const to av_opt_copy arg and dependencies Signed-off-by: Lukasz Marek lukasz.m.lu...@gmail.com --- libavutil/opt.c | 6 +++--- libavutil/opt.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavutil/opt.c b/libavutil/opt.c index 5b26a00..5b305a4 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -42,13 +42,13 @@ #include float.h #if FF_API_OLD_AVOPTIONS -const AVOption *av_next_option(void *obj, const AVOption *last) +const AVOption *av_next_option(FF_CONST_AVUTIL53 void *obj, const AVOption *last) FF_CONST_AVUTIL53 is already set to const, a new FF_CONST_AVUTIL55 would be needed Updated version attached. const could be added almost everywhere, but av_opt_find2 is blocking a lot. opt.c |8 opt.h |7 --- version.h |7 +++ 3 files changed, 15 insertions(+), 7 deletions(-) dcd1e5a4a60083437e69810821b1b856f0a328dd 0001-lavu-opt-add-consts-where-possible.patch From 49c6d2bd65ee36bc7c6a5947be442f1c49b0d4f7 Mon Sep 17 00:00:00 2001 From: Lukasz Marek lukasz.m.lu...@gmail.com Date: Thu, 27 Nov 2014 00:11:01 +0100 Subject: [PATCH] lavu/opt: add consts where possible LGTM pushed ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Move extralibs variables using ldl after ldl definition
On Thu, Nov 27, 2014 at 01:35:48PM +0100, t...@rothenpieler.org wrote: From: Timo Rothenpieler t...@rothenpieler.org --- configure | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In a rich man's house there is no place to spit but his face. -- Diogenes of Sinope 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/2] avcodec/pngdec: split P frames handling to a separate function.
On Thu, Nov 27, 2014 at 03:26:26PM +0100, Benoit Fouet wrote: --- libavcodec/pngdec.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/pngdec: add support for 'over' blend operation for 'none' dispose operation.
On Thu, Nov 27, 2014 at 03:26:27PM +0100, Benoit Fouet wrote: --- libavcodec/pngdec.c | 160 +++- 1 file changed, 133 insertions(+), 27 deletions(-) applied thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] DVB subtitles with multiple langage
On November 27, 2014 2:27:59 PM IST, Frédéric HUGENELL fred.hugen...@gmail.com wrote: hello I just uploaded a few minutes ago a sample of a movie in the incoming folder, as requested by ffmpeg as you can see on the picture in attach I recorded this movie on french sat tv, it contains 2 audio streams and 2 subtitles stream, voir for french langage and the other one for deaf people hope it can help for improving the features thank you PS: the file is named 14-11-27_sample_DVBsub_multiple_langage_frenchTV.ts ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel Thanks I eill check it out -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [Patch 1/4]Fix h264 on POWER LE: libavcodec/ppc/h264dsp.c
Hi, We present 4 patches to fix h264 bugs for POWER8 little endian, which are sent in 4 seperate emails. This is the first, to fix the functions h264_idct8_add_altivec(), h264_idct_dc_add_internal(), h264_loop_filter_luma_altivec(), write16x4() VEC_1D_DCT(), weight_h264_W_altivec(), biweight_h264_W_altivec(), VEC_LOAD_U8_ADD_S16_STORE_U8(), ALTIVEC_STORE_SUM_CLIP(); And add marcos GET_2PERM(), dstv_load(),vdst_load(), dest_unligned_store(). The fate test result after merge these 4 patches can be found on website by searching ibmcrl, also attached in the below to facilitate the review. The passed test cases change from 2017/2243 to 2209/2245. Thanks. Rong Yan 0001-libavcodec-ppc-h264dsp.c-fix-h264_idct8_add_altivec.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [Patch 2/4]Fix h264 on POWER LE: libavcodec/ppc/h264chroma_template.c
Hi, We present 4 patches to fix h264 bugs for POWER8 little endian, which are sent in 4 seperate emails. This is the third, to fix the functions PREFIX_h264_chroma_mc8_altivec(), PREFIX_no_rnd_vc1_chroma_mc8_altivec(), CHROMA_MC8_ALTIVEC_CORE_SIMPLE(), CHROMA_MC8_ALTIVEC_CORE(), add marcos GET_VSRC1(), GET_VSRC(). The fate test result after merge these 5 patches can be found on website by searching ibmcrl, also attached in the below to facilitate the review. The passed test cases change from 2017/2243 to 2209/2245. Thanks. Rong Yan 0002-libavcodec-ppc-h264chroma_template.c-fix-PREFIX_h264.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [Patch 3/4]Fix h264 on POWER LE: libavcodec/ppc/h264qpel_template.c
Hi, We present 4 patches to fix h264 bugs for POWER8 little endian, which are sent in 4 seperate emails. This is the first, to fix functions PREFIX_h264_qpel16_h_lowpass_altivec(), PREFIX_h264_qpel16_v_lowpass_altivec(), PREFIX_h264_qpel16_hv_lowpass_altivec(), add marcos load_alignment(). The fate test result after merge these 4 patches can be found on website by searching ibmcrl, also attached in the below to facilitate the review. The passed test cases change from 2017/2243 to 2209/2245. Thanks. Rong Yan 0003-libavcodec-ppc-h264qpel_template.c-fix-PREFIX_h264_q.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [Patch 4/4]Fix h264 on POWER LE: libavcodec/ppc/h264qpel.c
Hi, We present 4 patches to fix h264 bugs for POWER8 little endian, which are sent in 4 seperate emails. This is the fifth, to fix the functions put_pixels16_l2_altivec(), avg_pixels16_l2_altivec(), add marcos put_unligned_store(), avg_unligned_store(). The fate test result after merge these 4 patches can be found on website by searching ibmcrl, also attached in the below to facilitate the review. The passed test cases change from 2017/2243 to 2209/2245. Thanks. Rong Yan 0004-libavcodec-ppc-h264qpel.c-fix-put_pixels16_l2_altive.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel