[FFmpeg-devel] [PATCH] movenc: Don't require a global sidx box to write the dash brand
There's no reason this should be required. Signed-off-by: Derek Buitenhuis--- As far as I know, anyway. --- libavformat/movenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index af03d1e..10cd044 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -3906,7 +3906,7 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s) else if (mov->mode == MODE_MP4) ffio_wfourcc(pb, "mp41"); -if (mov->flags & FF_MOV_FLAG_DASH && mov->flags & FF_MOV_FLAG_GLOBAL_SIDX) +if (mov->flags & FF_MOV_FLAG_DASH) ffio_wfourcc(pb, "dash"); return update_size(pb, pos); -- 1.8.3.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC][PATCH] ffmpeg: add option to transform metadata using iconv
On 2015-09-22 20:22, Nicolas George wrote: > Le primidi 1er vendémiaire, an CCXXIV, James Darnley a écrit : >> +@item -metadata_iconv_code_page_list @var{code_page_list} >> +Force the metadata from input files to be converted through the given >> codepages >> +using iconv. This allows the user to correct >> +@uref{https://en.wikipedia.org/wiki/Mojibake, mojibake} providing they know >> the >> +correct code pages to use. > > I will have some more technical comments later. For now, I would just remark > that I believe "code page" is not the wording I would suggest: it refers to > proprietary and obsolete implementations. IMHO, the best way to refer to > this is "character encoding". Then I will change all instances of "code page" to "character encoding" even in the code, except for one in the docs which I might change to "character encoding (code page)" unless that will be confusing for users. signature.asc Description: OpenPGP digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] fate: add chroma position scale test
The sample position is made weird and non-nominal to force catching such issues as default values or specialized operations hiding issues in corner cases. --- tests/fate/filter-video.mak | 4 tests/ref/fate/filter-scalechroma | 26 ++ 2 files changed, 30 insertions(+) create mode 100644 tests/ref/fate/filter-scalechroma diff --git a/tests/fate/filter-video.mak b/tests/fate/filter-video.mak index c208d04..3c84210 100644 --- a/tests/fate/filter-video.mak +++ b/tests/fate/filter-video.mak @@ -349,6 +349,10 @@ fate-filter-scale200: CMD = video_filter "scale=w=200:h=200" FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scale500 fate-filter-scale500: CMD = video_filter "scale=w=500:h=500" +FATE_FILTER_VSYNTH-$(CONFIG_SCALE_FILTER) += fate-filter-scalechroma +fate-filter-scalechroma: tests/data/vsynth1.yuv +fate-filter-scalechroma: CMD = framecrc -flags bitexact -s 352x288 -pix_fmt yuv444p -i tests/data/vsynth1.yuv -pix_fmt yuv420p -sws_flags +bitexact -vf scale=out_v_chr_pos=33:out_h_chr_pos=151 + FATE_FILTER_VSYNTH-$(CONFIG_VFLIP_FILTER) += fate-filter-vflip fate-filter-vflip: CMD = video_filter "vflip" diff --git a/tests/ref/fate/filter-scalechroma b/tests/ref/fate/filter-scalechroma new file mode 100644 index 000..930ffef --- /dev/null +++ b/tests/ref/fate/filter-scalechroma @@ -0,0 +1,26 @@ +#tb 0: 1/25 +0, 0, 0,1, 152064, 0xdcab783a +0, 1, 1,1, 152064, 0x79c7f1f6 +0, 2, 2,1, 152064, 0x3b810afb +0, 3, 3,1, 152064, 0x892aca1d +0, 4, 4,1, 152064, 0x52fdd093 +0, 5, 5,1, 152064, 0xaa643426 +0, 6, 6,1, 152064, 0x9ad020ed +0, 7, 7,1, 152064, 0x5c179057 +0, 8, 8,1, 152064, 0xa56bf155 +0, 9, 9,1, 152064, 0x61dcffca +0, 10, 10,1, 152064, 0x0d51a1d3 +0, 11, 11,1, 152064, 0x652f9e8d +0, 12, 12,1, 152064, 0xdc0bb4d8 +0, 13, 13,1, 152064, 0x561437cf +0, 14, 14,1, 152064, 0x69ef8e4f +0, 15, 15,1, 152064, 0xe7244350 +0, 16, 16,1, 152064, 0xe65651cf +0, 17, 17,1, 152064, 0xfc9ff646 +0, 18, 18,1, 152064, 0x6ae10bc4 +0, 19, 19,1, 152064, 0xd3d1898a +0, 20, 20,1, 152064, 0xf3f8b139 +0, 21, 21,1, 152064, 0x68c129be +0, 22, 22,1, 152064, 0xc3922593 +0, 23, 23,1, 152064, 0x2b14d96e +0, 24, 24,1, 152064, 0xab119489 -- 1.9.2.msysgit.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hls, libstagefright
On Wed, Sep 23, 2015 at 01:05:53PM +0800, 赵宇龙 wrote: > From f5ff9a07a755123c259f6483fa3c55be1bb41abf Mon Sep 17 00:00:00 2001 > From: zylthinking> Date: Wed, 23 Sep 2015 12:55:27 +0800 > Subject: [PATCH] initialize duration of a living hls stream to an known > value > > Signed-off-by: zylthinking > --- > libavformat/hls.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index adaa33a..23c541f 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -1380,6 +1380,7 @@ static int hls_read_header(AVFormatContext *s) > > /* If this isn't a live stream, calculate the total duration of the > * stream. */ > +s->duration = -1; > if (c->variants[0]->playlists[0]->finished) { > int64_t duration = 0; > for (i = 0; i < c->variants[0]->playlists[0]->n_segments; i++) can you explain why this does make a difference ? [...] > Subject: [PATCH] fix Stagefright_decode_frame may not exiting when source > done > > Signed-off-by: zylthinking > --- > libavcodec/libstagefright.cpp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If a bugfix only changes things apparently unrelated to the bug with no further explanation, that is a good sign that the bugfix is wrong. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC][PATCH] ffmpeg: add option to transform metadata using iconv
Le primidi 1er vendémiaire, an CCXXIV, James Darnley a écrit : > At present it only converts global metadata as that is what I wanted to do. > It > should be possible to extend it so that the conversion can be different for > different files or streams. > --- > doc/ffmpeg.texi | 6 +++ > ffmpeg.c| 15 ++ > ffmpeg.h| 1 + > ffmpeg_opt.c| 149 > +++- > 4 files changed, 169 insertions(+), 2 deletions(-) > > Then I will change all instances of "code page" to "character encoding" > even in the code, except for one in the docs which I might change to > "character encoding (code page)" unless that will be confusing for users. Having the words "code page" in the docs is good for users that know it by that name. In that case, I suggest to also include "charset", which is another incorrect way of calling it (incorrect because en encoding is not just a set). See the technical comments interleaved in the code. More globally, there are several issues with the patch as is that come from the direct use of iconv: - it uses an optional feature, with all the code noise and ifdefry that implies; - it has annoying buffer handling; - it does not let specify the replacement character for invalid encodings. There is already a place in lavc that uses iconv, with the exact same drawbacks. There will possibly be other similar places later if someone decides that vf_drawtext needs to accept legacy encodings for example. For some time, I have had in mind a generic text encoding conversion utility in libavutil, that would solve all this once and for all. It was rather low-priority for me, but since the question is raised now, I can get on with it. I will post the API I have in mind in a separate thread. > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > index f4ffc6c..d4c1c23 100644 > --- a/doc/ffmpeg.texi > +++ b/doc/ffmpeg.texi > @@ -855,6 +855,12 @@ such streams is attempted. > Allow input streams with unknown type to be copied instead of failing if > copying > such streams is attempted. > > +@item -metadata_iconv_code_page_list @var{code_page_list} Can you explain the case for having a list here? > +Force the metadata from input files to be converted through the given > codepages > +using iconv. This allows the user to correct > +@uref{https://en.wikipedia.org/wiki/Mojibake, mojibake} providing they know > the > +correct code pages to use. > + > @item -map_channel > [@var{input_file_id}.@var{stream_specifier}.@var{channel_id}|-1][:@var{output_file_id}.@var{stream_specifier}] > Map an audio channel from a given input to an output. If > @var{output_file_id}.@var{stream_specifier} is not set, the audio channel > will > diff --git a/ffmpeg.c b/ffmpeg.c > index e31a2c6..5c04571 100644 > --- a/ffmpeg.c > +++ b/ffmpeg.c > @@ -101,6 +101,10 @@ > #include > #endif > > +#if CONFIG_ICONV > +#include > +#endif > + > #include > > #include "ffmpeg.h" > @@ -564,6 +568,17 @@ static void ffmpeg_cleanup(int ret) > fclose(vstats_file); > av_freep(_filename); > > +#if CONFIG_ICONV > +if (metadata_iconv_contexts) { > +iconv_t *cd = metadata_iconv_contexts; > +for (i = 0; cd[i]; i++) { > +iconv_close(cd[i]); > +cd[i] = NULL; > +} > +} > +av_freep(_iconv_contexts); > +#endif > + > av_freep(_streams); > av_freep(_files); > av_freep(_streams); > diff --git a/ffmpeg.h b/ffmpeg.h > index 6544e6f..2b8cbd7 100644 > --- a/ffmpeg.h > +++ b/ffmpeg.h > @@ -495,6 +495,7 @@ extern intnb_filtergraphs; > > extern char *vstats_filename; > extern char *sdp_filename; > +extern void *metadata_iconv_contexts; I am not very comfortable with that structure. > > extern float audio_drift_threshold; > extern float dts_delta_threshold; > diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c > index 4edd118..d226f78 100644 > --- a/ffmpeg_opt.c > +++ b/ffmpeg_opt.c > @@ -42,6 +42,10 @@ > #include "libavutil/pixfmt.h" > #include "libavutil/time_internal.h" > > +#if CONFIG_ICONV > +# include > +#endif > + > #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" > > #define MATCH_PER_STREAM_OPT(name, type, outvar, fmtctx, st)\ > @@ -84,6 +88,7 @@ const HWAccel hwaccels[] = { > > char *vstats_filename; > char *sdp_filename; > +void *metadata_iconv_contexts; > > float audio_drift_threshold = 0.1; > float dts_delta_threshold = 10; > @@ -120,6 +125,7 @@ static int input_stream_potentially_available = 0; > static int ignore_unknown_streams = 0; > static int copy_unknown_streams = 0; > > + Stray. > static void uninit_options(OptionsContext *o) > { > const OptionDef *po = options; > @@ -196,6 +202,58 @@ static AVDictionary *strip_specifiers(AVDictionary *dict) > return ret; > } > > +static int opt_metadata_iconv(void *optctx, const char *opt, const char *arg) > +{ > +#if !CONFIG_ICONV > +av_log(NULL, AV_LOG_ERROR, "converting
[FFmpeg-devel] [PATCH] checkasm/x86: Correctly handle variadic functions
The System V ABI on x86-64 specifies that the al register contains an upper bound of the number of arguments passed in vector registers when calling variadic functions, so we aren't allowed to clobber it. checkasm_fail_func() is a variadic function so also zero al before calling it. --- tests/checkasm/x86/checkasm.asm | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/checkasm/x86/checkasm.asm b/tests/checkasm/x86/checkasm.asm index 5f3def9..20012f8 100644 --- a/tests/checkasm/x86/checkasm.asm +++ b/tests/checkasm/x86/checkasm.asm @@ -77,8 +77,10 @@ cglobal stack_clobber, 1,2 %if WIN64 %assign free_regs 7 +DECLARE_REG_TMP 4 %else %assign free_regs 9 +DECLARE_REG_TMP 7 %endif ;- @@ -86,7 +88,7 @@ cglobal stack_clobber, 1,2 ;- INIT_XMM cglobal checked_call, 2,15,16,max_args*8+8 -mov r6, r0 +mov t0, r0 ; All arguments have been pushed on the stack instead of registers in order to ; test for incorrect assumptions that 32-bit ints are zero-extended to 64-bit. @@ -129,7 +131,7 @@ cglobal checked_call, 2,15,16,max_args*8+8 mov r %+ i, [n %+ i] %assign i i-1 %endrep -call r6 +call t0 %assign i 14 %rep 15-free_regs xor r %+ i, [n %+ i] @@ -156,6 +158,7 @@ cglobal checked_call, 2,15,16,max_args*8+8 mov r9, rax mov r10, rdx lea r0, [error_message] +xor eax, eax call fail_func mov rdx, r10 mov rax, r9 -- 1.8.3.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hls, libstagefright
On Wed, Sep 23, 2015 at 7:09 AM, Michael Niedermayerwrote: > On Wed, Sep 23, 2015 at 01:05:53PM +0800, 赵宇龙 wrote: >> From f5ff9a07a755123c259f6483fa3c55be1bb41abf Mon Sep 17 00:00:00 2001 >> From: zylthinking >> Date: Wed, 23 Sep 2015 12:55:27 +0800 >> Subject: [PATCH] initialize duration of a living hls stream to an known >> value >> >> Signed-off-by: zylthinking >> --- >> libavformat/hls.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libavformat/hls.c b/libavformat/hls.c >> index adaa33a..23c541f 100644 >> --- a/libavformat/hls.c >> +++ b/libavformat/hls.c >> @@ -1380,6 +1380,7 @@ static int hls_read_header(AVFormatContext *s) >> >> /* If this isn't a live stream, calculate the total duration of the >> * stream. */ >> +s->duration = -1; >> if (c->variants[0]->playlists[0]->finished) { >> int64_t duration = 0; >> for (i = 0; i < c->variants[0]->playlists[0]->n_segments; i++) > > can you explain why this does make a difference ? > > > [...] >> Subject: [PATCH] fix Stagefright_decode_frame may not exiting when source >> done >> >> Signed-off-by: zylthinking >> --- >> libavcodec/libstagefright.cpp | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > patch applied Unrelated, but perhaps of interest more generally: https://en.wikipedia.org/wiki/Stagefright_%28bug%29 - this made a big splash as a security vulnerability. > > thanks > > [...] > -- > Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB > > If a bugfix only changes things apparently unrelated to the bug with no > further explanation, that is a good sign that the bugfix is wrong. > > ___ > 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
Re: [FFmpeg-devel] [PATCH] hevc: fix WPP mode
Hi, On Wed, Sep 23, 2015 at 10:33 AM, Christophe Gisquet < christophe.gisq...@gmail.com> wrote: > Hi, > > under highly-threaded loads, parallel decoding of WPP is subject to a > race condition. > > This basically fixes ticket #4365. Nice catch! Lgtm. Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] hevc: fix WPP mode
Hi Christophe, the fix looks weird to me. There is something else underlying. Mickaël 2015-09-23 16:53 GMT+02:00 Ronald S. Bultje: > Hi, > > On Wed, Sep 23, 2015 at 10:33 AM, Christophe Gisquet < > christophe.gisq...@gmail.com> wrote: > > > Hi, > > > > under highly-threaded loads, parallel decoding of WPP is subject to a > > race condition. > > > > This basically fixes ticket #4365. > > > Nice catch! Lgtm. > > Ronald > ___ > 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
Re: [FFmpeg-devel] [PATCH] hevc: fix WPP mode
Hi, 2015-09-23 17:06 GMT+02:00 Mickaël Raulet: > the fix looks weird to me. There is something else underlying. The issue appeared in d249e682 (not the hash I reported, for some reason). If you want to test, that commit is buggy (it causes crashes): commit 7117547 is needed to fix it. IIRC (the patch is rather old...), when this happens, s->sao_pixel_buffer* seems to have old data. This looked consistent with the thread for the following line accessing this buffer before it had been filled by the threading running on the line, and thus the patch. If I'm mistaken, do you see anything else that could cause the issue? Maybe I'm indeed missing something in the implementation of d249e682. -- Christophe ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] lavu: add text encoding conversion API
Hi. This is a proposal for an API in libavutil to perform text encoding conversions. I had it in mind to clean up the subtitles code initially, and now it could be useful for James' proposal about metadata. The issues are relying on the optional system feature iconv, clumsy and annoying buffer management, handling of errors and replacement characters. For now, this is just the API, not as a patch with the code, but I suspect designing the API cleanly is way harder than implementing it. The API would go in, probably, textconv.h, with the opaque parts in textconv.c. The structures are in logical order, not in the order required for compilation. Please comment. Regards, -- Nicolas George /** * Library for text encoding conversion. * * This structure holds the global state to perform text character encoding * (aka charset, aka code page) conversions. * It can contain different modules, depending on what was enabled at build * time, and can also get extra modules from the application. */ typedef struct AVTextEncConvLib AVTextEncConvLib; /* opaque */ struct AVTextEncConvLib { AVTextEncConvModule *modules; unsigned nb_modules; }; /** * Module for text encoding conversion. * * Different modules may support more or less character encodings with * various options. Module availability depends on the system and the build * options. */ typedef struct AVTextEncConvModule AVTextEncConvModule; /* public */ struct AVTextEncConvModule { char name[16]; int (*open)(AVTextEncConvContext *cxt, const char *from, const char *to); size_t priv_data_size; unsigned priority; }; /** * Allocate a text encoding conversion library. * * See the values below for the flags. */ int av_text_enc_conv_lib_alloc(AVTextEncConvLib **lib, unsigned flags); enum { /** * Disable registering the builtin conversion module. * * The builtin conversion modules handles UTF-8, UTF-16, UCS-2, UCS-4 * and is always available at priority -1000. */ AV_TEXT_ENC_CONV_NO_BUILTIN = 1 << 0, /** * Disable registering the extra builtin conversion modules. * * The extra builtin conversion modules may be, depending on the build * options: iconv. * They have all priority between -100 and 0. */ AV_TEXT_ENC_CONV_NO_EXTRA_BUILTINS = 1 << 1, }; void av_text_enc_conv_lib_freep(AVTextEncConvLib **lib); /** * Convert a text buffer directly with default options. */ int av_text_enc_conv_do(const AVTextEncConvLib *lib, uint8_t *in, size_t in_size, uint8_t **out, size_t *out_size); /** * Context for text encoding conversions. * * The context is initialized for a specific from→to conversion. * Options can be set on the context before each conversion operation. */ typedef struct AVTextEncConvContext AVTextEncConvContext; /* opaque */ struct AVTextEncConvContext { AVClass *av_class; void *priv_data; int (*convert)(AVTextEncConvContext *ctx, uint8_t **inbuf, unsigned inbuf_size, uint8_t **outbuf, unsigned outbuf_size); /** * Replacement string for invalid input or impossible output. * Must be in output encoding. * If replacement is not used, then an error is triggered. */ unsigned use_replacement; uint8_t *replacement; size_t replacement_size; }; /** * Register conversions module in the library. * * mod_size is the size of a module according to the application. * The module structures are copied to the library structure. */ int av_text_conv_lib_register_modules(AVTextEncConvLib *lib, const AVTextEncConvModule *mod, unsigned nb_mod, size_t mod_size); /** * Open a text conversion context. */ int av_text_enc_conv_open(const AVTextEncConvLib *lib, AVTextEncConvContext *ctx, const char *from, const char *to); void av_text_enc_conv_context_freep(AVTextEncConvContext **ctx); /** * Set the replacement string for a text conversion context. * * The string must be in UTF-8. * @return 0 on success or an AVERROR code on failure, * including AVERROR(EILSEQ) if the output is not possible * If status is neither 0 nor a return value indicating an error that * depends on the input string, then the function returns it immediately. It * allows to write the following pattern: * ret = av_text_enc_conv_set_replacement(lib, ctx, "�", 0); * ret = av_text_enc_conv_set_replacement(lib, ctx, "?", ret); * if (ret < 0) */ int av_text_enc_conv_set_replacement(const AVTextEncConvLib *lib, AVTextEncConvContext *ctx, const uint8_t *repl, int status); /** * Convert a text buffer. * * If out points to
[FFmpeg-devel] PATCH: gdigrab work for DPI in windows
See attached, tested locally. Cheers! -roger- 0001-gdigrab-grab-right-desktop-size-if-DPI-in-use-based-.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] Internet radio using ffmpeg?
Hey all, I am working on an internet radio, which will stream music continuosly. I plan on implementing the RTP/RTSP protocol. I plan to use java. Can this be done using ffmpeg? Are there java bindings for the same? How well do you guys think is ffmpeg suitable for the application? Is there a better/ more suitable api available for the same? Thanks! Regards, Abhilash Mhaisne ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] hls, libstagefright
From f5ff9a07a755123c259f6483fa3c55be1bb41abf Mon Sep 17 00:00:00 2001 From: zylthinkingDate: Wed, 23 Sep 2015 12:55:27 +0800 Subject: [PATCH] initialize duration of a living hls stream to an known value Signed-off-by: zylthinking --- libavformat/hls.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/hls.c b/libavformat/hls.c index adaa33a..23c541f 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1380,6 +1380,7 @@ static int hls_read_header(AVFormatContext *s) /* If this isn't a live stream, calculate the total duration of the * stream. */ +s->duration = -1; if (c->variants[0]->playlists[0]->finished) { int64_t duration = 0; for (i = 0; i < c->variants[0]->playlists[0]->n_segments; i++) -- 2.3.4 From 3d0f0ab34997f8ca6f466b18be5c8fc4366c8a2a Mon Sep 17 00:00:00 2001 From: zylthinking Date: Wed, 23 Sep 2015 13:01:44 +0800 Subject: [PATCH] fix Stagefright_decode_frame may not exiting when source done Signed-off-by: zylthinking --- libavcodec/libstagefright.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp index f4b38e6..07cac33 100644 --- a/libavcodec/libstagefright.cpp +++ b/libavcodec/libstagefright.cpp @@ -433,7 +433,7 @@ static int Stagefright_decode_frame(AVCodecContext *avctx, void *data, pthread_mutex_lock(>out_mutex); if (!s->out_queue->empty()) break; pthread_mutex_unlock(>out_mutex); -if (s->source_done) { +if (!s->source_done) { usleep(1); continue; } else { -- 2.3.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Set option flags for AV_CODEC_FLAG_TRUNCATED
Hi! The flag truncated is currently not shown by the help output. Please comment, Carl Eugen diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index 2171aea..8b32ae2 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -70,7 +70,7 @@ static const AVOption avcodec_options[] = { {"emu_edge", "do not draw edges", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_EMU_EDGE }, INT_MIN, INT_MAX, 0, "flags"}, #endif {"psnr", "error[?] variables will be set during encoding", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_PSNR }, INT_MIN, INT_MAX, V|E, "flags"}, -{"truncated", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, 0, "flags"}, +{"truncated", "Input bitstream might be randomly truncated", 0, AV_OPT_TYPE_CONST, {.i64 = AV_CODEC_FLAG_TRUNCATED }, INT_MIN, INT_MAX, V|D, "flags"}, #if FF_API_NORMALIZE_AQP {"naq", "normalize adaptive quantization", 0, AV_OPT_TYPE_CONST, {.i64 = CODEC_FLAG_NORMALIZE_AQP }, INT_MIN, INT_MAX, V|E, "flags"}, #endif ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Update Cookies on Setcookie playlist response
On Wed, 23 Sep 2015 00:55:39 + Lucas Andradewrote: > I've tested and this works. Cookies is being set correctly. As you can see, > I've removed the opts2 as it isn't needed anymore. I've added the cookie > update to open_url (setting the HLSContext->cookies and the opts (maybe > used on ciphered stream). > > diff --git a/libavformat/hls.c b/libavformat/hls.c > index adaa33a..a654924 100644 > --- a/libavformat/hls.c > +++ b/libavformat/hls.c > @@ -533,7 +533,11 @@ static int open_url(HLSContext *c, URLContext **uc, > const char *url, AVDictionar > av_dict_copy(, c->avio_opts, 0); > av_dict_copy(, opts, 0); > > -ret = ffurl_open(uc, url, AVIO_FLAG_READ, c->interrupt_callback, ); > +if(ret = ffurl_open(uc, url, AVIO_FLAG_READ, c->interrupt_callback, > ) == 0) { Missing (...). If I remember my operator precedences correctly, this will compare the ffurl_open() result with 0, and then assign it to ret - which is wrong. (Also, generally, successful returns are 0 or positive by convention, so you should compare with "< 0" too. But it's not so important, because ffurl_open() explicitly documents returning 0 on success, and some existing code in this file also compares directly with 0). > +// update cookies on http response with setcookies. > +update_options(>cookies, "cookies", uc->priv_data); > +av_dict_set(, "cookies", c->cookies, 0); > +} > > av_dict_free(); > > @@ -969,7 +973,6 @@ static void update_options(char **dest, const char > *name, void *src) > static int open_input(HLSContext *c, struct playlist *pls) > { > AVDictionary *opts = NULL; > -AVDictionary *opts2 = NULL; > int ret; > struct segment *seg = pls->segments[pls->cur_seq_no - > pls->start_seq_no]; > > @@ -979,9 +982,6 @@ static int open_input(HLSContext *c, struct playlist > *pls) > av_dict_set(, "headers", c->headers, 0); > av_dict_set(, "seekable", "0", 0); > > -// Same opts for key request (ffurl_open mutilates the opts so it > cannot be used twice) > -av_dict_copy(, opts, 0); > - > if (seg->size >= 0) { > /* try to restrict the HTTP request to the part we want > * (if this is in fact a HTTP request) */ > @@ -999,14 +999,12 @@ static int open_input(HLSContext *c, struct playlist > *pls) > char iv[33], key[33], url[MAX_URL_SIZE]; > if (strcmp(seg->key, pls->key_url)) { > URLContext *uc; > -if (open_url(pls->parent->priv_data, , seg->key, opts2) == > 0) { > +if (open_url(pls->parent->priv_data, , seg->key, opts) == > 0) { > if (ffurl_read_complete(uc, pls->key, sizeof(pls->key)) > != sizeof(pls->key)) { > av_log(NULL, AV_LOG_ERROR, "Unable to read key file > %s\n", > seg->key); > } > -update_options(>cookies, "cookies", uc->priv_data); > -av_dict_set(, "cookies", c->cookies, 0); > ffurl_close(uc); > } else { > av_log(NULL, AV_LOG_ERROR, "Unable to open key file %s\n", > @@ -1038,7 +1036,7 @@ static int open_input(HLSContext *c, struct playlist > *pls) > ret = AVERROR_PATCHWELCOME; > } > else > - ret = AVERROR(ENOSYS); > +ret = AVERROR(ENOSYS); Stray indentation fix. Normally we try to separate cosmetics and functional changes, though I don't care at all in this case. > /* Seek to the requested position. If this was a HTTP request, the > offset > * should already be where want it to, but this allows e.g. local > testing > @@ -1055,7 +1053,6 @@ static int open_input(HLSContext *c, struct playlist > *pls) > > cleanup: > av_dict_free(); > -av_dict_free(); > pls->cur_seg_offset = 0; > return ret; > } I think your patch is corrupted - you probably pasted this into your mail client, and it wrapped some lines. Either attach the patch as text file to your mail, or use git send-email (the latter might be too much effort to setup if you don't plan to post a lot of patches). ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/af_tremolo: make it bit-exact with sox effect of same name
Signed-off-by: Paul B Mahol--- libavfilter/Makefile | 2 +- libavfilter/af_tremolo.c | 45 ++--- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 7054275..c70887e 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -85,7 +85,7 @@ OBJS-$(CONFIG_SILENCEREMOVE_FILTER) += af_silenceremove.o OBJS-$(CONFIG_STEREOTOOLS_FILTER)+= af_stereotools.o OBJS-$(CONFIG_STEREOWIDEN_FILTER)+= af_stereowiden.o OBJS-$(CONFIG_TREBLE_FILTER) += af_biquads.o -OBJS-$(CONFIG_TREMOLO_FILTER)+= af_tremolo.o generate_wave_table.o +OBJS-$(CONFIG_TREMOLO_FILTER)+= af_tremolo.o OBJS-$(CONFIG_VOLUME_FILTER) += af_volume.o OBJS-$(CONFIG_VOLUMEDETECT_FILTER) += af_volumedetect.o diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c index 6335401..0ae7a7c 100644 --- a/libavfilter/af_tremolo.c +++ b/libavfilter/af_tremolo.c @@ -22,15 +22,13 @@ #include "avfilter.h" #include "internal.h" #include "audio.h" -#include "generate_wave_table.h" typedef struct TremoloContext { const AVClass *class; double freq; double depth; -double *wave_table; -int wave_table_index; -int sample_rate; +double *table; +int index; } TremoloContext; #define OFFSET(x) offsetof(TremoloContext, x) @@ -44,20 +42,11 @@ static const AVOption tremolo_options[] = { AVFILTER_DEFINE_CLASS(tremolo); -static double trem_env(AVFilterContext *ctx) -{ -TremoloContext *s = ctx->priv; -double env = s->wave_table[s->wave_table_index]; -s->wave_table_index++; -if (s->wave_table_index >= s->sample_rate / s->freq) -s->wave_table_index = 0; -return 1.0 - (s->depth * env); -} - static int filter_frame(AVFilterLink *inlink, AVFrame *in) { AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; +TremoloContext *s = ctx->priv; const double *src = (const double *)in->data[0]; const int channels = inlink->channels; const int nb_samples = in->nb_samples; @@ -78,12 +67,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) dst = (double *)out->data[0]; for (n = 0; n < nb_samples; n++) { -const double env = trem_env(ctx); - for (c = 0; c < channels; c++) -dst[c] = src[c] * env; +dst[c] = src[c] * s->table[s->index]; dst += channels; src += channels; +s->index++; +if (s->index >= inlink->sample_rate) +s->index = 0; } if (in != out) @@ -125,21 +115,30 @@ static int query_formats(AVFilterContext *ctx) static av_cold void uninit(AVFilterContext *ctx) { TremoloContext *s = ctx->priv; -av_freep(>wave_table); +av_freep(>table); } static int config_input(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; TremoloContext *s = ctx->priv; +const double offset = 1. - s->depth / 2.; +int i; -s->sample_rate = inlink->sample_rate; -s->wave_table = av_malloc_array(s->sample_rate / s->freq, sizeof(*s->wave_table)); -if (!s->wave_table) +s->table = av_malloc_array(inlink->sample_rate, sizeof(*s->table)); +if (!s->table) return AVERROR(ENOMEM); -ff_generate_wave_table(WAVE_SIN, AV_SAMPLE_FMT_DBL, s->wave_table, s->sample_rate / s->freq, 0.0, 1.0, 0.0); -s->wave_table_index = 0; +for (i = 0; i < inlink->sample_rate; i++) { +double env = s->freq * i / inlink->sample_rate; + +env = sin(2 * M_PI * fmod(env + 0.25, 1.0)); + +s->table[i] = env * (1 - fabs(offset)) + offset; +} + +s->index = 0; + return 0; } -- 1.9.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] lavu: add text encoding conversion API
On 2015-09-23 19:28, Nicolas George wrote: > Hi. > > This is a proposal for an API in libavutil to perform text encoding > conversions. I had it in mind to clean up the subtitles code initially, and > now it could be useful for James' proposal about metadata. The issues are > relying on the optional system feature iconv, clumsy and annoying buffer > management, handling of errors and replacement characters. > > For now, this is just the API, not as a patch with the code, but I suspect > designing the API cleanly is way harder than implementing it. > > The API would go in, probably, textconv.h, with the opaque parts in > textconv.c. The structures are in logical order, not in the order required > for compilation. > > Please comment. At first I was wondering how FFmpeg would have a non-optional part of the API if you depend on optional things such as iconv. I was half prepared to rant about NIH and seriously wondering what was going to be proposed. I think I see now that you are proposing a wrapper around other libraries. Other than iconv I assume Windows has its own char encoding features which would likely be used here. I don't have much of an opinion just yet. It looks fairly reasonable and a decent wrapper around iconv. One immediate problem I see comes from trying to store negative numbers in an unsigned integer. :) 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 1/2] vf_scale: conditionally override chroma position
On Wed, Sep 23, 2015 at 03:06:01PM +0200, Christophe Gisquet wrote: > For yuv420p, the chroma position is unilaterally overriden, even > if ffmpeg's command-line explicitly set it. To fix this, override > only if the value is the default one. > > Regression since 1515bfb3. > --- > libavfilter/vf_scale.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything ms did were stupid they would be bankrupt already. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [RFC][PATCH] ffmpeg: add option to transform metadata using iconv
On 2015-09-23 16:56, Nicolas George wrote: > Le primidi 1er vendémiaire, an CCXXIV, James Darnley a écrit : >> At present it only converts global metadata as that is what I wanted to do. >> It >> should be possible to extend it so that the conversion can be different for >> different files or streams. >> --- >> doc/ffmpeg.texi | 6 +++ >> ffmpeg.c| 15 ++ >> ffmpeg.h| 1 + >> ffmpeg_opt.c| 149 >> +++- >> 4 files changed, 169 insertions(+), 2 deletions(-) >> > >> Then I will change all instances of "code page" to "character encoding" >> even in the code, except for one in the docs which I might change to >> "character encoding (code page)" unless that will be confusing for users. > > Having the words "code page" in the docs is good for users that know it by > that name. In that case, I suggest to also include "charset", which is > another incorrect way of calling it (incorrect because en encoding is not > just a set). > > See the technical comments interleaved in the code. > > More globally, there are several issues with the patch as is that come from > the direct use of iconv: > > - it uses an optional feature, with all the code noise and ifdefry that > implies; > > - it has annoying buffer handling; > > - it does not let specify the replacement character for invalid encodings. It is not supposed to replace any invalid bytes with a "random" character. That sounds like it will only make the problem worse with that lossy removal of data. This is trying to fix incorrect interpretation of bytes. This feature is to transform bytes into other bytes which when interpreted and displayed the correct text is appears on screen. I will detail my exact use case at the bottom. > There is already a place in lavc that uses iconv, with the exact same > drawbacks. There will possibly be other similar places later if someone > decides that vf_drawtext needs to accept legacy encodings for example. > > For some time, I have had in mind a generic text encoding conversion utility > in libavutil, that would solve all this once and for all. It was rather > low-priority for me, but since the question is raised now, I can get on with > it. > > I will post the API I have in mind in a separate thread. I will comment on your proposal in that thread. >> diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi >> index f4ffc6c..d4c1c23 100644 >> --- a/doc/ffmpeg.texi >> +++ b/doc/ffmpeg.texi >> @@ -855,6 +855,12 @@ such streams is attempted. >> Allow input streams with unknown type to be copied instead of failing if >> copying >> such streams is attempted. >> > >> +@item -metadata_iconv_code_page_list @var{code_page_list} > > Can you explain the case for having a list here? What do you mean? You need at least two encodings to be given to perform a conversion. Two things become a list. You might find the specific example below helpful. >> +Force the metadata from input files to be converted through the given >> codepages >> +using iconv. This allows the user to correct >> +@uref{https://en.wikipedia.org/wiki/Mojibake, mojibake} providing they know >> the >> +correct code pages to use. >> + >> @item -map_channel >> [@var{input_file_id}.@var{stream_specifier}.@var{channel_id}|-1][:@var{output_file_id}.@var{stream_specifier}] >> Map an audio channel from a given input to an output. If >> @var{output_file_id}.@var{stream_specifier} is not set, the audio channel >> will >> diff --git a/ffmpeg.c b/ffmpeg.c >> index e31a2c6..5c04571 100644 >> --- a/ffmpeg.c >> +++ b/ffmpeg.c >> @@ -101,6 +101,10 @@ >> #include >> #endif >> >> +#if CONFIG_ICONV >> +#include >> +#endif >> + >> #include >> >> #include "ffmpeg.h" >> @@ -564,6 +568,17 @@ static void ffmpeg_cleanup(int ret) >> fclose(vstats_file); >> av_freep(_filename); >> >> +#if CONFIG_ICONV >> +if (metadata_iconv_contexts) { >> +iconv_t *cd = metadata_iconv_contexts; >> +for (i = 0; cd[i]; i++) { >> +iconv_close(cd[i]); >> +cd[i] = NULL; >> +} >> +} >> +av_freep(_iconv_contexts); >> +#endif >> + >> av_freep(_streams); >> av_freep(_files); >> av_freep(_streams); >> diff --git a/ffmpeg.h b/ffmpeg.h >> index 6544e6f..2b8cbd7 100644 >> --- a/ffmpeg.h >> +++ b/ffmpeg.h >> @@ -495,6 +495,7 @@ extern intnb_filtergraphs; >> >> extern char *vstats_filename; >> extern char *sdp_filename; > >> +extern void *metadata_iconv_contexts; > > I am not very comfortable with that structure. It might not be very good but it is (void*) and NULL if you don't use the feature. >> extern float audio_drift_threshold; >> extern float dts_delta_threshold; >> diff --git a/ffmpeg_opt.c b/ffmpeg_opt.c >> index 4edd118..d226f78 100644 >> --- a/ffmpeg_opt.c >> +++ b/ffmpeg_opt.c >> @@ -42,6 +42,10 @@ >> #include "libavutil/pixfmt.h" >> #include "libavutil/time_internal.h" >> >> +#if CONFIG_ICONV >>
Re: [FFmpeg-devel] [DECISION] Server "move"
Hi, 2015-09-22 14:21 GMT+02:00 Clément Bœsch: > On Mon, Sep 21, 2015 at 08:27:47PM +0100, Kieran Kunhya wrote: >> > This "decision" thingy, is intended to confirm that >> > * Stuff should be moved to the telepoint server, possibly duplicates >> > should be left at/moved to the hetzner server for redundancy, if >> > this is technically possible (maybe it should be called copy instead >> > of move in that case) >> >> As discussed at VDD15 and posted to the admin IRC and emailed to the >> root email address: >> It was agreed by a large group of developers that this should be put >> on hold and videolan remain a valid option. >> > > Well, to be completely honest, it was Ronald & you mainly, the rest of the > people in the room remained mostly silent, and it was about "a random > server in Hungary [or sth like this] no ones know anything about". > > It was also raised the fact that using Videolan infrastructure needs a lot > of work for the admins, for which most of us couldn't really say much > about it. That's probably part of the issue. Is there actually a precise list of tasks that are needed to achieve the transition to VideoLAN's infrastructure (Docker, etc.). From what I understood, the transition is not impossible, "just" that nobody has time/desire/skills to migrate everything in one-shot. The bug tracking system was also an issue since videolan's trac instance was to be decommissioned. Maybe if there was a well defined list of things to would make it clearer to estimate the transition cost? And, in the worst case, it's not as if VideoLabs was hosted in a famous hoster in France, and probably some help could be gathered from there independently as a service? :) > >> You can't just make these unilateral decisions. >> > > We have a voting committee in order to make decision with a much better > "large group of developers" defined, that's what this thread is about. > > That said, on a personal note I'm pretty much neutral about the decision > taken as long as I'm not asked to do any work, so I have no opinion on > which servers to keep or use in the future. > >> Kieran > > -- > Clément B. > > ___ > 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
Re: [FFmpeg-devel] [PATCH] avcodec/x86/cavsdsp: silence -Wunuse-variable on --disable-mmx
On Sat, Sep 19, 2015 at 10:41:57AM -0400, Ganesh Ajjanagadde wrote: > On Sat, Sep 19, 2015 at 10:34 AM, Ganesh Ajjanagadde >wrote: > > This silences -Wunused-variable when compiled with --disable-mmx, e.g > > http://fate.ffmpeg.org/log.cgi?time=20150919094617=compile=x86_64-archlinux-gcc-disable-mmx. > > The alternative of header guards will make it far too ugly. > > > > Signed-off-by: Ganesh Ajjanagadde > > --- > > libavcodec/x86/cavsdsp.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/x86/cavsdsp.c b/libavcodec/x86/cavsdsp.c > > index b571163..4b20e65 100644 > > --- a/libavcodec/x86/cavsdsp.c > > +++ b/libavcodec/x86/cavsdsp.c > > @@ -563,7 +563,7 @@ static av_cold void cavsdsp_init_3dnow(CAVSDSPContext > > *c, > > > > av_cold void ff_cavsdsp_init_x86(CAVSDSPContext *c, AVCodecContext *avctx) > > { > > -int cpu_flags = av_get_cpu_flags(); > > +av_unused int cpu_flags = av_get_cpu_flags(); > > > > cavsdsp_init_mmx(c, avctx); > > #if HAVE_AMD3DNOW_INLINE > > -- > > 2.5.2 > > > > commit message typo: -Wunuse-> -Wunused. changed applied thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything ms did were stupid they would be bankrupt already. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCHv2] avcodec/ac3enc: use long long after switch to 64 bit bitrate
On Sat, Sep 19, 2015 at 09:57:56AM -0400, Ganesh Ajjanagadde wrote: > Commit 7404f3bdb switched bitrate to 64 bits. > This triggers -Wabsolute-value on clang, e.g > http://fate.ffmpeg.org/log.cgi?time=20150917122742=compile=x86_64-darwin-clang-3.7-O3. > Therefore, usage of abs is changed to llabs, which is available on all of the > platforms. > Unfortunately, LLONG_MAX is not always available, so INT64_MAX is used > instead. > > Signed-off-by: Ganesh Ajjanagadde> --- > libavcodec/ac3enc.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) 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 2/2] fate: add chroma position scale test
On Wed, Sep 23, 2015 at 03:06:02PM +0200, Christophe Gisquet wrote: > The sample position is made weird and non-nominal to force catching > such issues as default values or specialized operations hiding > issues in corner cases. > --- > tests/fate/filter-video.mak | 4 > tests/ref/fate/filter-scalechroma | 26 ++ > 2 files changed, 30 insertions(+) > create mode 100644 tests/ref/fate/filter-scalechroma tested on qemu mips & arm, works applied btw, not sure i offered it already, but if you want a git write account, send me your public ssh key thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- 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] avfilter/af_tremolo: make it bit-exact with sox effect of same name
Looks good. Thanks for the clean-up. On Wed, Sep 23, 2015 at 4:22 PM, Paul B Maholwrote: > Signed-off-by: Paul B Mahol > --- > libavfilter/Makefile | 2 +- > libavfilter/af_tremolo.c | 45 ++--- > 2 files changed, 23 insertions(+), 24 deletions(-) > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > index 7054275..c70887e 100644 > --- a/libavfilter/Makefile > +++ b/libavfilter/Makefile > @@ -85,7 +85,7 @@ OBJS-$(CONFIG_SILENCEREMOVE_FILTER) += > af_silenceremove.o > OBJS-$(CONFIG_STEREOTOOLS_FILTER)+= af_stereotools.o > OBJS-$(CONFIG_STEREOWIDEN_FILTER)+= af_stereowiden.o > OBJS-$(CONFIG_TREBLE_FILTER) += af_biquads.o > -OBJS-$(CONFIG_TREMOLO_FILTER)+= af_tremolo.o > generate_wave_table.o > +OBJS-$(CONFIG_TREMOLO_FILTER)+= af_tremolo.o > OBJS-$(CONFIG_VOLUME_FILTER) += af_volume.o > OBJS-$(CONFIG_VOLUMEDETECT_FILTER) += af_volumedetect.o > > diff --git a/libavfilter/af_tremolo.c b/libavfilter/af_tremolo.c > index 6335401..0ae7a7c 100644 > --- a/libavfilter/af_tremolo.c > +++ b/libavfilter/af_tremolo.c > @@ -22,15 +22,13 @@ > #include "avfilter.h" > #include "internal.h" > #include "audio.h" > -#include "generate_wave_table.h" > > typedef struct TremoloContext { > const AVClass *class; > double freq; > double depth; > -double *wave_table; > -int wave_table_index; > -int sample_rate; > +double *table; > +int index; > } TremoloContext; > > #define OFFSET(x) offsetof(TremoloContext, x) > @@ -44,20 +42,11 @@ static const AVOption tremolo_options[] = { > > AVFILTER_DEFINE_CLASS(tremolo); > > -static double trem_env(AVFilterContext *ctx) > -{ > -TremoloContext *s = ctx->priv; > -double env = s->wave_table[s->wave_table_index]; > -s->wave_table_index++; > -if (s->wave_table_index >= s->sample_rate / s->freq) > -s->wave_table_index = 0; > -return 1.0 - (s->depth * env); > -} > - > static int filter_frame(AVFilterLink *inlink, AVFrame *in) > { > AVFilterContext *ctx = inlink->dst; > AVFilterLink *outlink = ctx->outputs[0]; > +TremoloContext *s = ctx->priv; > const double *src = (const double *)in->data[0]; > const int channels = inlink->channels; > const int nb_samples = in->nb_samples; > @@ -78,12 +67,13 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) > dst = (double *)out->data[0]; > > for (n = 0; n < nb_samples; n++) { > -const double env = trem_env(ctx); > - > for (c = 0; c < channels; c++) > -dst[c] = src[c] * env; > +dst[c] = src[c] * s->table[s->index]; > dst += channels; > src += channels; > +s->index++; > +if (s->index >= inlink->sample_rate) > +s->index = 0; > } > > if (in != out) > @@ -125,21 +115,30 @@ static int query_formats(AVFilterContext *ctx) > static av_cold void uninit(AVFilterContext *ctx) > { > TremoloContext *s = ctx->priv; > -av_freep(>wave_table); > +av_freep(>table); > } > > static int config_input(AVFilterLink *inlink) > { > AVFilterContext *ctx = inlink->dst; > TremoloContext *s = ctx->priv; > +const double offset = 1. - s->depth / 2.; > +int i; > > -s->sample_rate = inlink->sample_rate; > -s->wave_table = av_malloc_array(s->sample_rate / s->freq, > sizeof(*s->wave_table)); > -if (!s->wave_table) > +s->table = av_malloc_array(inlink->sample_rate, sizeof(*s->table)); > +if (!s->table) > return AVERROR(ENOMEM); > > -ff_generate_wave_table(WAVE_SIN, AV_SAMPLE_FMT_DBL, s->wave_table, > s->sample_rate / s->freq, 0.0, 1.0, 0.0); > -s->wave_table_index = 0; > +for (i = 0; i < inlink->sample_rate; i++) { > +double env = s->freq * i / inlink->sample_rate; > + > +env = sin(2 * M_PI * fmod(env + 0.25, 1.0)); > + > +s->table[i] = env * (1 - fabs(offset)) + offset; > +} > + > +s->index = 0; > + > return 0; > } > > -- > 1.9.1 > > ___ > 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] OpenJPEG2 for JPEG2000
Hi guys, I was just wondering if it would be possible to link to OpenJPEG v2 instead of v1 for JPEG2000 encoding/decoding. I compiled 2.8 on my arch linux 4.1.6 machine and it linked to version 1. I found this : https://trac.ffmpeg.org/ticket/2016 It is marked as “fixed” but it doesn’t appear to be resolved in the current code base nor in the latest release. Thanks. Vincent ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avformat/http: detect end of received on chunked persistenc
On Tue, Sep 22, 2015 at 05:02:38AM +, Schenk, Michael wrote: > Dear friends, > we had a problem with an HLS server which was using chunked http transfer > over persistence http connection. > Even if we have received all data (chunksize = 0) the read of a m3u8 playlist > was blocked till the server tears down the TCP > connection. Please find attached a patch for avformat/http.c which will mark > end of received once all chunks > are transferred completely. I sent this a second time because I did not see > the first eMail of me. > > Feedback for sure is warmly welcome. > > Regards > > Michael > > http.c |5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > 8b122aae4c2964d45df3527f4217d267221aee9c > 0001-avformat-http-detect-end-of-received-on-chunked-pers.patch > From 511c4f7b50c4abf21e482636379021f14451be0d Mon Sep 17 00:00:00 2001 > From: "Schenk, Michael"> Date: Mon, 21 Sep 2015 15:15:11 +0200 > Subject: [PATCH] avformat/http: detect end of received on chunked persistence > http connections > > --- > libavformat/http.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavformat/http.c b/libavformat/http.c > index 075dda7..5f48e6e 100644 > --- a/libavformat/http.c > +++ b/libavformat/http.c > @@ -1239,8 +1239,11 @@ static int http_read_stream(URLContext *h, uint8_t > *buf, int size) > av_log(NULL, AV_LOG_TRACE, "Chunked encoding data size: > %"PRId64"'\n", > s->chunksize); > > -if (!s->chunksize) > +if (!s->chunksize) { > +s->chunksize = -1; > +s->filesize = s->off; is this related or a seperate unrelated improvment ? also, is there a public server to test the chunksize bugfix ? [...] -- 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] checkasm: add vp9dsp.itxfm_add tests.
Hi, On Tue, Sep 22, 2015 at 1:26 PM, Ronald S. Bultjewrote: > --- > tests/checkasm/vp9dsp.c | 273 > > 1 file changed, 273 insertions(+) Poke. Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]Remove --disable-avutil and sanitize --disable-all
Hi! The configure option --disable-avutil has no effect, --disable-all does not disable avutil (it never has), but it currently disables all dependencies of libavutil in an unexpected way: A library that was never disabled has to be enabled (with --enable-avutil) to enable dependent options. Attached patch fixes this behaviour, to be split. Carl Eugen diff --git a/configure b/configure index f6bc622..f9c035b 100755 --- a/configure +++ b/configure @@ -128,7 +128,6 @@ Component options: --disable-avdevice disable libavdevice build --disable-avcodecdisable libavcodec build --disable-avformat disable libavformat build - --disable-avutil disable libavutil build --disable-swresample disable libswresample build --disable-swscaledisable libswscale build --disable-postproc disable libpostproc build @@ -3110,6 +3109,7 @@ for opt do --disable-all) map 'eval unset \${$(toupper ${v%s})_LIST}' $COMPONENT_LIST disable $LIBRARY_LIST $PROGRAM_LIST doc +enable avutil ;; --enable-random|--disable-random) action=${opt%%-random} ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel