[FFmpeg-devel] [PATCH] fate/fits: add new test & gen few samples automatically
Signed-off-by: Paras Chadha --- All other FITS patches need to be applied before this one. tests/fate/demux.mak| 3 +- tests/fate/fits.mak | 57 ++--- tests/ref/fate/fitsdec-bitpix-32| 6 tests/ref/fate/fitsdec-bitpix-64| 6 tests/ref/fate/fitsdec-blank_bitpix32 | 6 tests/ref/fate/fitsdec-ext_data_min_max | 6 6 files changed, 72 insertions(+), 12 deletions(-) create mode 100644 tests/ref/fate/fitsdec-bitpix-32 create mode 100644 tests/ref/fate/fitsdec-bitpix-64 create mode 100644 tests/ref/fate/fitsdec-blank_bitpix32 create mode 100644 tests/ref/fate/fitsdec-ext_data_min_max diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak index 66e26ed..261b004 100644 --- a/tests/fate/demux.mak +++ b/tests/fate/demux.mak @@ -37,7 +37,8 @@ FATE_SAMPLES_DEMUX-$(CONFIG_EA_DEMUXER) += fate-d-eavp6-demux fate-d-eavp6-demux: CMD = framecrc -i $(TARGET_SAMPLES)/ea-vp6/SmallRing.vp6 -map 0 -vcodec copy FATE_SAMPLES_DEMUX-$(CONFIG_FITS_DEMUXER) += fate-fits-demux -fate-fits-demux: CMD = framecrc -i $(TARGET_SAMPLES)/fits/fits-multi.fits -vcodec copy +fate-fits-demux: tests/data/fits-multi.fits +fate-fits-demux: CMD = framecrc -i $(TARGET_PATH)/tests/data/fits-multi.fits -vcodec copy FATE_SAMPLES_DEMUX-$(CONFIG_FLV_DEMUXER) += fate-flv-demux fate-flv-demux: CMD = framecrc -i $(TARGET_SAMPLES)/flv/Enigma_Principles_of_Lust-part.flv -codec copy diff --git a/tests/fate/fits.mak b/tests/fate/fits.mak index 8202870..983946d 100644 --- a/tests/fate/fits.mak +++ b/tests/fate/fits.mak @@ -1,25 +1,60 @@ -FATE_FITS += fate-fitsdec-multi -fate-fitsdec-multi: CMD = framecrc -i $(TARGET_SAMPLES)/fits/fits-multi.fits -pix_fmt gbrap +tests/data/fits-multi.fits: TAG = GEN +tests/data/fits-multi.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ +-i $(TARGET_SAMPLES)/gif/m4nb.gif \ +-y $(TARGET_PATH)/$(@) 2>/dev/null + +#mapping of fits file formats to png filenames +map.tests/data/lena-gray.fits:= gray8 +map.tests/data/lena-gray16.fits := gray16 +map.tests/data/lena-gbrp.fits:= rgb24 +map.tests/data/lena-gbrp16.fits := rgb48 +map.tests/data/lena-gbrap16.fits := rgba64 + +tests/data/lena%.fits: TAG = GEN +tests/data/lena%.fits: NAME = $(map.$(@)) +tests/data/lena%.fits: ffmpeg$(PROGSSUF)$(EXESUF) | tests/data + $(M)$(TARGET_EXEC) $(TARGET_PATH)/$< \ +-i $(TARGET_SAMPLES)/png1/lena-$(map.$(@)).png \ +-y $(TARGET_PATH)/$(@) 2>/dev/null + +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-ext_data_min_max +fate-fitsdec-ext_data_min_max: CMD = framecrc -i $(TARGET_SAMPLES)/fits/x0cj010ct_d0h.fit -pix_fmt gray16 + +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-blank_bitpix32 +fate-fitsdec-blank_bitpix32: CMD = framecrc -blank_value 65535 -i $(TARGET_SAMPLES)/fits/file008.fits -pix_fmt gray16 + +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-bitpix-32 +fate-fitsdec-bitpix-32: CMD = framecrc -i $(TARGET_SAMPLES)/fits/tst0005.fits -pix_fmt gray16 + +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-bitpix-64 +fate-fitsdec-bitpix-64: CMD = framecrc -i $(TARGET_SAMPLES)/fits/tst0006.fits -pix_fmt gray16 + +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += fate-fitsdec-multi +fate-fitsdec-multi: tests/data/fits-multi.fits +fate-fitsdec-multi: CMD = framecrc -i $(TARGET_PATH)/tests/data/fits-multi.fits -pix_fmt gbrap fate-fitsdec%: PIXFMT = $(word 3, $(subst -, ,$(@))) -fate-fitsdec%: SRC = $(TARGET_SAMPLES)/fits/lena-$(PIXFMT).fits +fate-fitsdec%: SRC = $(TARGET_PATH)/tests/data/lena-$(PIXFMT).fits fate-fitsdec%: CMD = framecrc -i $(SRC) -pix_fmt $(PIXFMT) FATE_FITS_DEC_PIXFMT = gray gray16 gbrp gbrp16 gbrap16 -FATE_FITS += $(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%) +$(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%): fate-fitsdec-%: tests/data/lena-%.fits +FATE_FITS_DEC-$(call DEMDEC, FITS, FITS) += $(FATE_FITS_DEC_PIXFMT:%=fate-fitsdec-%) + +FATE_FITS += $(FATE_FITS_DEC-yes) +fate-fitsdec: $(FATE_FITS_DEC-yes) -fate-fitsenc%: fate-fitsdec-multi fate-fitsenc%: PIXFMT = $(word 3, $(subst -, ,$(@))) -fate-fitsenc%: SRC = $(TARGET_SAMPLES)/fits/fits-multi.fits +fate-fitsenc%: SRC = $(TARGET_PATH)/tests/data/fits-multi.fits fate-fitsenc%: CMD = framecrc -i $(SRC) -c:v fits -pix_fmt $(PIXFMT) FATE_FITS_ENC_PIXFMT = gray gray16be gbrp gbrap gbrp16be gbrap16be -FATE_FITS_ENC-$(call ENCDEC, FITS, FITS) = $(FATE_FITS_ENC_PIXFMT:%=fate-fitsenc-%) +$(FATE_FITS_ENC_PIXFMT:%=fate-fitsenc-%): tests/data/fits-multi.fits +FATE_FITS_ENC-$(call ENCDEC, FITS, FITS) += $(FATE_FITS_ENC_PIXFMT:%=fate-fitsenc-%) FATE_FITS += $(FATE_FITS_ENC-yes) fate-fitsenc: $(FATE_FITS_ENC-yes) -FATE_FITS-$(call DEMDEC, FITS, FITS) += $(FATE_FITS) - -FATE_SAMPLES_FFMPEG += $(FATE_FITS-yes) -fate-fits: $(FATE_FITS-yes) +FATE_SAMPLES_FFMPEG += $(FATE_FITS) +fate-fits: $(FATE_FITS) diff --git a/tests/ref/fate/fitsdec-bitpix-32 b/test
Re: [FFmpeg-devel] [PATCH] avfilter/af_amix: switch to activate
On Sat, Aug 26, 2017 at 10:22:38PM -0300, James Almer wrote: > On 8/26/2017 9:59 PM, Michael Niedermayer wrote: > > On Sat, Aug 26, 2017 at 05:53:18PM +0200, Paul B Mahol wrote: > >> Really fixes hangs and infinite loops. > >> > >> Signed-off-by: Paul B Mahol > >> --- > >> libavfilter/af_amix.c | 161 > >> +- > >> 1 file changed, 81 insertions(+), 80 deletions(-) > > > > This breaks fate: > > > > stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 1056768 > > size: |2116800 - 1056768| >= 0 > > stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 704512 > > size: |2116800 - 704512| >= 0 > > TESTfilter-hdcd-s16p > > Test filter-amix-simple failed. Look at > > tests/data/fate/filter-amix-simple.err for details. > > make: *** [fate-filter-amix-simple] Error 134 > > make: *** [fate-filter-amix-transition] Error 134 > > What system? FATE looks clean. nothing special just normal ubuntu x86-64 i tool a closer look and it dies here: Assertion !link->status_in failed at libavfilter/avfilter.c:1639 Aborted (core dumped) make: *** [fate-filter-amix-simple] Error 134 thats a av_assert1(), i built with --assert-level=2 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart then the original author, trying to rewrite it will not make it better. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v4] avcodec/snowenc: fix setting motion_est option
Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. Based on code from svq1enc.c Signed-off-by: James Almer --- libavcodec/snow.h| 3 ++- libavcodec/snowenc.c | 11 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index f7ed1f82e7..41a3bef4de 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -32,10 +32,11 @@ #include "rangecoder.h" #include "mathops.h" -#define FF_MPV_OFFSET(x) (offsetof(MpegEncContext, x) + offsetof(SnowContext, m)) #include "mpegvideo.h" #include "h264qpel.h" +#define FF_ME_ITER 3 + #define MID_STATE 128 #define MAX_PLANES 4 diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index e03877a96c..bb113d0a2b 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -33,8 +33,6 @@ #include "mpegvideo.h" #include "h263.h" -#define FF_ME_ITER 50 - static av_cold int encode_init(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; @@ -86,6 +84,8 @@ FF_ENABLE_DEPRECATION_WARNINGS s->m.avctx = avctx; s->m.bit_rate= avctx->bit_rate; +s->m.lmin= avctx->mb_lmin; +s->m.lmax= avctx->mb_lmax; s->m.me.temp = s->m.me.scratchpad= av_mallocz_array((avctx->width+64), 2*16*2*sizeof(uint8_t)); @@ -1929,8 +1929,11 @@ static av_cold int encode_end(AVCodecContext *avctx) #define OFFSET(x) offsetof(SnowContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { -FF_MPV_COMMON_OPTS -{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, +{"motion_est", "motion estimation algorithm", OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_ITER, VE, "motion_est" }, +{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, VE, "motion_est" }, +{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, VE, "motion_est" }, +{ "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, VE, "motion_est" }, +{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, VE, "motion_est" }, { "memc_only", "Only do ME/MC (I frames -> ref, P frame -> ME+MC).", OFFSET(memc_only), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "no_bitstream", "Skip final bitstream writeout.", OFFSET(no_bitstream), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "intra_penalty", "Penalty for intra blocks in block decission", OFFSET(intra_penalty), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, -- 2.13.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v3] avcodec/snowenc: fix setting motion_est option
On Sat, Aug 26, 2017 at 03:21:43PM -0300, James Almer wrote: > Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. > Based on code from svq1enc.c > > Signed-off-by: James Almer > --- > libavcodec/snow.h| 3 ++- > libavcodec/snowenc.c | 11 +++ > 2 files changed, 9 insertions(+), 5 deletions(-) theres still a gray frame in the output (can easily be seen by seeking back) [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry. 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_amix: switch to activate
On 8/26/2017 9:59 PM, Michael Niedermayer wrote: > On Sat, Aug 26, 2017 at 05:53:18PM +0200, Paul B Mahol wrote: >> Really fixes hangs and infinite loops. >> >> Signed-off-by: Paul B Mahol >> --- >> libavfilter/af_amix.c | 161 >> +- >> 1 file changed, 81 insertions(+), 80 deletions(-) > > This breaks fate: > > stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 1056768 > size: |2116800 - 1056768| >= 0 > stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 704512 > size: |2116800 - 704512| >= 0 > TESTfilter-hdcd-s16p > Test filter-amix-simple failed. Look at > tests/data/fate/filter-amix-simple.err for details. > make: *** [fate-filter-amix-simple] Error 134 > make: *** [fate-filter-amix-transition] Error 134 What system? FATE looks clean. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_amix: switch to activate
On Sat, Aug 26, 2017 at 05:53:18PM +0200, Paul B Mahol wrote: > Really fixes hangs and infinite loops. > > Signed-off-by: Paul B Mahol > --- > libavfilter/af_amix.c | 161 > +- > 1 file changed, 81 insertions(+), 80 deletions(-) This breaks fate: stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 1056768 size: |2116800 - 1056768| >= 0 stddev: 0.00 PSNR:inf MAXDIFF: 0 bytes: 2116800/ 704512 size: |2116800 - 704512| >= 0 TESTfilter-hdcd-s16p Test filter-amix-simple failed. Look at tests/data/fate/filter-amix-simple.err for details. make: *** [fate-filter-amix-simple] Error 134 make: *** [fate-filter-amix-transition] Error 134 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I am the wisest man alive, for I know one thing, and that is that I know nothing. -- Socrates signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] configure : add "avx2 enabled" log
On 8/26/2017 4:32 PM, Martin Vignali wrote: > Hello, > > in attach patch to add to the output of the configure > a line for avx2 enabled (yes/no) > > Martin Applied, thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] configure : add "avx2 enabled" log
Hello, in attach patch to add to the output of the configure a line for avx2 enabled (yes/no) Martin 0002-configure-add-avx2-enabled-log.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH v3] avcodec/snowenc: fix setting motion_est option
Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. Based on code from svq1enc.c Signed-off-by: James Almer --- libavcodec/snow.h| 3 ++- libavcodec/snowenc.c | 11 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index f7ed1f82e7..41a3bef4de 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -32,10 +32,11 @@ #include "rangecoder.h" #include "mathops.h" -#define FF_MPV_OFFSET(x) (offsetof(MpegEncContext, x) + offsetof(SnowContext, m)) #include "mpegvideo.h" #include "h264qpel.h" +#define FF_ME_ITER 3 + #define MID_STATE 128 #define MAX_PLANES 4 diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index ca55914d9e..75940437c1 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -33,8 +33,6 @@ #include "mpegvideo.h" #include "h263.h" -#define FF_ME_ITER 50 - static av_cold int encode_init(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; @@ -1685,6 +1683,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->m.unrestricted_mv= 1; s->m.lambda = s->lambda; +s->m.lmin = avctx->mb_lmin; +s->m.lmax = avctx->mb_lmax; s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; @@ -1919,8 +1919,11 @@ static av_cold int encode_end(AVCodecContext *avctx) #define OFFSET(x) offsetof(SnowContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { -FF_MPV_COMMON_OPTS -{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, +{"motion_est", "motion estimation algorithm", OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_ITER, VE, "motion_est" }, +{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, VE, "motion_est" }, +{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, VE, "motion_est" }, +{ "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, VE, "motion_est" }, +{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, VE, "motion_est" }, { "memc_only", "Only do ME/MC (I frames -> ref, P frame -> ME+MC).", OFFSET(memc_only), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "no_bitstream", "Skip final bitstream writeout.", OFFSET(no_bitstream), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "intra_penalty", "Penalty for intra blocks in block decission", OFFSET(intra_penalty), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, -- 2.13.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] libavcodec/exr : add SSE SIMD for reorder_pixels v2 (WIP)
Hello, in attach new patch for SSE simd of reorder pixels in exr decoder (use by zip and rle uncompress), after comments on the previous patch by Ivan Kalvachev. After testing only on a small buffer, i fix the overread problem of the previous patch (who hid the last loop trouble) pass fate test for me (on Mac Os X) Tested with the decoding of a sequence of 150 HD Exr images (CGI render with 17 layers per file in float pixel, ZIP16 compression) SSE : 349190 decicycles in reorder_pixels_zip, 130716 runs,356 skips bench: utime=109.222s bench: maxrss=607002624kB Scalar : 3039686 decicycles in reorder_pixels_zip, 130395 runs,677 skips bench: utime=123.042s bench: maxrss=607019008kB Comments Welcome Martin Jokyo Images 0001-libavcodec-add-SSE-SIMD-for-reorder-pixels.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_amix: switch to activate
Le nonidi 9 fructidor, an CCXXV, Paul B Mahol a écrit : > Really fixes hangs and infinite loops. > > Signed-off-by: Paul B Mahol > --- > libavfilter/af_amix.c | 161 > +- > 1 file changed, 81 insertions(+), 80 deletions(-) > > diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c > index 78be57a..989fd84 100644 > --- a/libavfilter/af_amix.c > +++ b/libavfilter/af_amix.c > @@ -41,6 +41,7 @@ I am sorry to say, but it is not good at all. But it is not your fault at all, it is because of the existing code. From the beginning, this filter suffered from the "let's reinvent the wheel instead of designing a proper framework, and let us make it square" syndrome: there is an audio FIFO, then a strange FrameList / FrameInfo structure to keep the frames within the FIFO. The activate design comes with the framework that was needed: a real conversion to activate would mean getting rid of all that, keeping only output_frame() (and the init / format code, of course) and making it query the links' fifo. That said, I do not object to the patch if it fixes something. But I think a big /* FIXME */ comment would be helpful to avoid people taking this code as an example. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avfilter/af_amix: switch to activate
Really fixes hangs and infinite loops. Signed-off-by: Paul B Mahol --- libavfilter/af_amix.c | 161 +- 1 file changed, 81 insertions(+), 80 deletions(-) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index 78be57a..989fd84 100644 --- a/libavfilter/af_amix.c +++ b/libavfilter/af_amix.c @@ -41,6 +41,7 @@ #include "audio.h" #include "avfilter.h" +#include "filters.h" #include "formats.h" #include "internal.h" @@ -263,21 +264,15 @@ static int config_output(AVFilterLink *outlink) return 0; } -static int calc_active_inputs(MixContext *s); - /** * Read samples from the input FIFOs, mix, and write to the output link. */ -static int output_frame(AVFilterLink *outlink, int need_request) +static int output_frame(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; MixContext *s = ctx->priv; AVFrame *out_buf, *in_buf; -int nb_samples, ns, ret, i; - -ret = calc_active_inputs(s); -if (ret < 0) -return ret; +int nb_samples, ns, i; if (s->input_state[0] & INPUT_ON) { /* first input live: use the corresponding frame size */ @@ -288,7 +283,7 @@ static int output_frame(AVFilterLink *outlink, int need_request) if (ns < nb_samples) { if (!(s->input_state[i] & INPUT_EOF)) /* unclosed input with not enough samples */ -return need_request ? ff_request_frame(ctx->inputs[i]) : 0; +return 0; /* closed input to drain */ nb_samples = ns; } @@ -303,8 +298,10 @@ static int output_frame(AVFilterLink *outlink, int need_request) nb_samples = FFMIN(nb_samples, ns); } } -if (nb_samples == INT_MAX) -return AVERROR_EOF; +if (nb_samples == INT_MAX) { +ff_outlink_set_status(outlink, AVERROR_EOF, s->next_pts); +return 0; +} } s->next_pts = frame_list_next_pts(s->frame_list); @@ -367,27 +364,18 @@ static int output_frame(AVFilterLink *outlink, int need_request) static int request_samples(AVFilterContext *ctx, int min_samples) { MixContext *s = ctx->priv; -int i, ret; +int i; av_assert0(s->nb_inputs > 1); for (i = 1; i < s->nb_inputs; i++) { -ret = 0; if (!(s->input_state[i] & INPUT_ON)) continue; if (av_audio_fifo_size(s->fifos[i]) >= min_samples) continue; -ret = ff_request_frame(ctx->inputs[i]); -if (ret == AVERROR_EOF) { -s->input_state[i] |= INPUT_EOF; -if (av_audio_fifo_size(s->fifos[i]) == 0) { -s->input_state[i] = 0; -continue; -} -} else if (ret < 0) -return ret; +ff_inlink_request_frame(ctx->inputs[i]); } -return output_frame(ctx->outputs[0], 1); +return output_frame(ctx->outputs[0]); } /** @@ -411,73 +399,87 @@ static int calc_active_inputs(MixContext *s) return 0; } -static int request_frame(AVFilterLink *outlink) +static int activate(AVFilterContext *ctx) { -AVFilterContext *ctx = outlink->src; -MixContext *s = ctx->priv; -int ret; -int wanted_samples; - -ret = calc_active_inputs(s); -if (ret < 0) -return ret; - -if (!(s->input_state[0] & INPUT_ON)) -return request_samples(ctx, 1); - -if (s->frame_list->nb_frames == 0) { -ret = ff_request_frame(ctx->inputs[0]); -if (ret == AVERROR_EOF) { -s->input_state[0] = 0; -if (s->nb_inputs == 1) -return AVERROR_EOF; -return output_frame(ctx->outputs[0], 1); -} -return ret; -} -av_assert0(s->frame_list->nb_frames > 0); +AVFilterLink *outlink = ctx->outputs[0]; +MixContext *s = ctx->priv; +AVFrame *buf = NULL; +int i, ret; -wanted_samples = frame_list_next_frame_size(s->frame_list); +for (i = 0; i < s->nb_inputs; i++) { +AVFilterLink *inlink = ctx->inputs[i]; + +if ((ret = ff_inlink_consume_frame(ctx->inputs[i], &buf)) > 0) { +if (i == 0) { +int64_t pts = av_rescale_q(buf->pts, inlink->time_base, + outlink->time_base); +ret = frame_list_add_frame(s->frame_list, buf->nb_samples, pts); +if (ret < 0) { +av_frame_free(&buf); +return ret; +} +} -return request_samples(ctx, wanted_samples); -} +ret = av_audio_fifo_write(s->fifos[i], (void **)buf->extended_data, + buf->nb_samples); +if (ret < 0) { +av_frame_free(&buf); +return ret; +} -static int filter_frame(AVFilterLink *inlink, AVFrame *buf) -{
Re: [FFmpeg-devel] FFmpeg 3.4
On Sat, Aug 26, 2017 at 12:32:08PM -0300, James Almer wrote: > On 8/26/2017 12:20 PM, Michael Niedermayer wrote: > > On Sat, Aug 26, 2017 at 11:03:27AM -0300, James Almer wrote: > >> On 8/26/2017 6:28 AM, Michael Niedermayer wrote: > >>> Hi all > >>> > >>> Its a while since FFmpeg 3.3, so its time again to make a new release > >>> > >>> I intend to make 3.4 in the next weeks > >>> Name suggestions needed like always > >> > >> Could this wait until after the major bump? I'm currently working on > >> cherry picking the relevant changes. > >> We really don't need another release using this set of major versions. > >> The less amount of releases using them we have to maintain the better. > > > > i remember no discussion about a major bump > > I mentioned in another thread my intention to cherry pick the relevant > changes seeing merges are currently on hold with the bump commit not too > far in the queue. > I'm currently ironing some details and I'll send a patchset later for > review with the adapted cherry picked changes. And if for whatever > reason people don't want the bump now, then the work will at least be > already done for when the merges resume. > > > > > but assuming there would be a discussion on ffmpeg-devel and people > > would agree to bump then i think releasing before is better. > > > > It makes the new features available throgh the current API/ABI and > > we would avoid making a release shortly after major changes. > > That would give such changes more time to be tested before a release > > There have been like four releases using these current library major > versions, and the ABI was accidentally broken at least twice. It would > be IMO much better if we don't release another one that would extend the > amount of time we have to maintain it and its deprecated APIs. > > And I never said to release shortly after a bump. 3.4 (maybe renumbered > to 4.0) could simply be released a month or two after the bump. That > amount is nonetheless needed to properly deal with any needed ABI > related corrections. > There's really no rush to get another release out there right this > moment. But if you prefer doing a last release before the bump then I'll > not block it. I would prefer to do a release before the bump, that is if i find the time. I do not intend to hold something up, and some people also want and will likely want to get some changes in before the release. So yeah, my plan is a 3.4 with the current API/ABI if it works out timewise between what people want in and the next bump and my time [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB There will always be a question for which you do not know the correct answer. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFmpeg 3.4
On 8/26/2017 12:20 PM, Michael Niedermayer wrote: > On Sat, Aug 26, 2017 at 11:03:27AM -0300, James Almer wrote: >> On 8/26/2017 6:28 AM, Michael Niedermayer wrote: >>> Hi all >>> >>> Its a while since FFmpeg 3.3, so its time again to make a new release >>> >>> I intend to make 3.4 in the next weeks >>> Name suggestions needed like always >> >> Could this wait until after the major bump? I'm currently working on >> cherry picking the relevant changes. >> We really don't need another release using this set of major versions. >> The less amount of releases using them we have to maintain the better. > > i remember no discussion about a major bump I mentioned in another thread my intention to cherry pick the relevant changes seeing merges are currently on hold with the bump commit not too far in the queue. I'm currently ironing some details and I'll send a patchset later for review with the adapted cherry picked changes. And if for whatever reason people don't want the bump now, then the work will at least be already done for when the merges resume. > > but assuming there would be a discussion on ffmpeg-devel and people > would agree to bump then i think releasing before is better. > > It makes the new features available throgh the current API/ABI and > we would avoid making a release shortly after major changes. > That would give such changes more time to be tested before a release There have been like four releases using these current library major versions, and the ABI was accidentally broken at least twice. It would be IMO much better if we don't release another one that would extend the amount of time we have to maintain it and its deprecated APIs. And I never said to release shortly after a bump. 3.4 (maybe renumbered to 4.0) could simply be released a month or two after the bump. That amount is nonetheless needed to properly deal with any needed ABI related corrections. There's really no rush to get another release out there right this moment. But if you prefer doing a last release before the bump then I'll not block it. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFmpeg 3.4
On Sat, Aug 26, 2017 at 11:03:27AM -0300, James Almer wrote: > On 8/26/2017 6:28 AM, Michael Niedermayer wrote: > > Hi all > > > > Its a while since FFmpeg 3.3, so its time again to make a new release > > > > I intend to make 3.4 in the next weeks > > Name suggestions needed like always > > Could this wait until after the major bump? I'm currently working on > cherry picking the relevant changes. > We really don't need another release using this set of major versions. > The less amount of releases using them we have to maintain the better. i remember no discussion about a major bump but assuming there would be a discussion on ffmpeg-devel and people would agree to bump then i think releasing before is better. It makes the new features available throgh the current API/ABI and we would avoid making a release shortly after major changes. That would give such changes more time to be tested before a release [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad wants you dead since a long time then you are either wrong or dead since a long time. signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avcodec/snowenc: fix setting motion_est option
Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. Based on code from svq1enc.c Signed-off-by: James Almer --- libavcodec/snow.h| 3 ++- libavcodec/snowenc.c | 11 +++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index f7ed1f82e7..41a3bef4de 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -32,10 +32,11 @@ #include "rangecoder.h" #include "mathops.h" -#define FF_MPV_OFFSET(x) (offsetof(MpegEncContext, x) + offsetof(SnowContext, m)) #include "mpegvideo.h" #include "h264qpel.h" +#define FF_ME_ITER 3 + #define MID_STATE 128 #define MAX_PLANES 4 diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index ca55914d9e..c31886a812 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -33,8 +33,6 @@ #include "mpegvideo.h" #include "h263.h" -#define FF_ME_ITER 50 - static av_cold int encode_init(AVCodecContext *avctx) { SnowContext *s = avctx->priv_data; @@ -1685,6 +1683,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->m.unrestricted_mv= 1; s->m.lambda = s->lambda; +s->m.lmin = 2*FF_QP2LAMBDA; +s->m.lmax = 31*FF_QP2LAMBDA; s->m.qscale= (s->m.lambda*139 + FF_LAMBDA_SCALE*64) >> (FF_LAMBDA_SHIFT + 7); s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; @@ -1919,8 +1919,11 @@ static av_cold int encode_end(AVCodecContext *avctx) #define OFFSET(x) offsetof(SnowContext, x) #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM static const AVOption options[] = { -FF_MPV_COMMON_OPTS -{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, FF_MPV_OPT_FLAGS, "motion_est" }, +{"motion_est", "motion estimation algorithm", OFFSET(motion_est), AV_OPT_TYPE_INT, {.i64 = FF_ME_EPZS }, FF_ME_ZERO, FF_ME_ITER, VE, "motion_est" }, +{ "zero", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ZERO }, 0, 0, VE, "motion_est" }, +{ "epzs", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_EPZS }, 0, 0, VE, "motion_est" }, +{ "xone", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_XONE }, 0, 0, VE, "motion_est" }, +{ "iter", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = FF_ME_ITER }, 0, 0, VE, "motion_est" }, { "memc_only", "Only do ME/MC (I frames -> ref, P frame -> ME+MC).", OFFSET(memc_only), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "no_bitstream", "Skip final bitstream writeout.", OFFSET(no_bitstream), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, { "intra_penalty", "Penalty for intra blocks in block decission", OFFSET(intra_penalty), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, -- 2.13.3 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFmpeg 3.4
On 8/26/2017 6:28 AM, Michael Niedermayer wrote: > Hi all > > Its a while since FFmpeg 3.3, so its time again to make a new release > > I intend to make 3.4 in the next weeks > Name suggestions needed like always Could this wait until after the major bump? I'm currently working on cherry picking the relevant changes. We really don't need another release using this set of major versions. The less amount of releases using them we have to maintain the better. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/2] avcodec/sbrdsp_fixed: Fix undefined overflows in autocorrelate()
Fixes: runtime error: signed integer overflow: 8903997421129740175 + 354481484684609529 cannot be represented in type 'long' Fixes: 2045/clusterfuzz-testcase-minimized-6751255865065472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sbrdsp_fixed.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libavcodec/sbrdsp_fixed.c b/libavcodec/sbrdsp_fixed.c index fe48104021..896b2d75c6 100644 --- a/libavcodec/sbrdsp_fixed.c +++ b/libavcodec/sbrdsp_fixed.c @@ -147,19 +147,19 @@ static av_always_inline void autocorrelate(const int x[40][2], SoftFloat phi[3][ if (lag) { for (i = 1; i < 38; i++) { -accu_re += (int64_t)x[i][0] * x[i+lag][0]; -accu_re += (int64_t)x[i][1] * x[i+lag][1]; -accu_im += (int64_t)x[i][0] * x[i+lag][1]; -accu_im -= (int64_t)x[i][1] * x[i+lag][0]; +accu_re += (uint64_t)x[i][0] * x[i+lag][0]; +accu_re += (uint64_t)x[i][1] * x[i+lag][1]; +accu_im += (uint64_t)x[i][0] * x[i+lag][1]; +accu_im -= (uint64_t)x[i][1] * x[i+lag][0]; } real_sum = accu_re; imag_sum = accu_im; -accu_re += (int64_t)x[ 0][0] * x[lag][0]; -accu_re += (int64_t)x[ 0][1] * x[lag][1]; -accu_im += (int64_t)x[ 0][0] * x[lag][1]; -accu_im -= (int64_t)x[ 0][1] * x[lag][0]; +accu_re += (uint64_t)x[ 0][0] * x[lag][0]; +accu_re += (uint64_t)x[ 0][1] * x[lag][1]; +accu_im += (uint64_t)x[ 0][0] * x[lag][1]; +accu_im -= (uint64_t)x[ 0][1] * x[lag][0]; phi[2-lag][1][0] = autocorr_calc(accu_re); phi[2-lag][1][1] = autocorr_calc(accu_im); @@ -167,28 +167,28 @@ static av_always_inline void autocorrelate(const int x[40][2], SoftFloat phi[3][ if (lag == 1) { accu_re = real_sum; accu_im = imag_sum; -accu_re += (int64_t)x[38][0] * x[39][0]; -accu_re += (int64_t)x[38][1] * x[39][1]; -accu_im += (int64_t)x[38][0] * x[39][1]; -accu_im -= (int64_t)x[38][1] * x[39][0]; +accu_re += (uint64_t)x[38][0] * x[39][0]; +accu_re += (uint64_t)x[38][1] * x[39][1]; +accu_im += (uint64_t)x[38][0] * x[39][1]; +accu_im -= (uint64_t)x[38][1] * x[39][0]; phi[0][0][0] = autocorr_calc(accu_re); phi[0][0][1] = autocorr_calc(accu_im); } } else { for (i = 1; i < 38; i++) { -accu_re += (int64_t)x[i][0] * x[i][0]; -accu_re += (int64_t)x[i][1] * x[i][1]; +accu_re += (uint64_t)x[i][0] * x[i][0]; +accu_re += (uint64_t)x[i][1] * x[i][1]; } real_sum = accu_re; -accu_re += (int64_t)x[ 0][0] * x[ 0][0]; -accu_re += (int64_t)x[ 0][1] * x[ 0][1]; +accu_re += (uint64_t)x[ 0][0] * x[ 0][0]; +accu_re += (uint64_t)x[ 0][1] * x[ 0][1]; phi[2][1][0] = autocorr_calc(accu_re); accu_re = real_sum; -accu_re += (int64_t)x[38][0] * x[38][0]; -accu_re += (int64_t)x[38][1] * x[38][1]; +accu_re += (uint64_t)x[38][0] * x[38][0]; +accu_re += (uint64_t)x[38][1] * x[38][1]; phi[1][0][0] = autocorr_calc(accu_re); } -- 2.14.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 2/2] avcodec/aacpsdsp_template: Fix undefined integer overflow in ps_add_squares_c()
Fixes runtime error: signed integer overflow: 1997494407 + 613252359 cannot be represented in type 'int' Fixes: 2014/clusterfuzz-testcase-minimized-5186337030275072 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/aacpsdsp_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacpsdsp_template.c b/libavcodec/aacpsdsp_template.c index 9e1a95c1a1..e35e9699b0 100644 --- a/libavcodec/aacpsdsp_template.c +++ b/libavcodec/aacpsdsp_template.c @@ -30,7 +30,7 @@ static void ps_add_squares_c(INTFLOAT *dst, const INTFLOAT (*src)[2], int n) { int i; for (i = 0; i < n; i++) -dst[i] += AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]); +dst[i] += (UINTFLOAT)AAC_MADD28(src[i][0], src[i][0], src[i][1], src[i][1]); } static void ps_mul_pair_single_c(INTFLOAT (*dst)[2], INTFLOAT (*src0)[2], INTFLOAT *src1, -- 2.14.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavf/gdv: Improve palette saturation
Hi! Attached patch slightly improves the saturation of the gdv palette. Please comment, Carl Eugen From bbc00affb218ebe2b8074fea514bf25bbca5f890 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 26 Aug 2017 12:59:11 +0200 Subject: [PATCH] lavf/gdv: Improve saturation of gdv palette. --- libavcodec/gdv.c |3 +++ libavformat/gdv.c |3 +++ 2 files changed, 6 insertions(+) diff --git a/libavcodec/gdv.c b/libavcodec/gdv.c index dc91869..009aace 100644 --- a/libavcodec/gdv.c +++ b/libavcodec/gdv.c @@ -433,6 +433,9 @@ static int gdv_decode_frame(AVCodecContext *avctx, void *data, unsigned r = bytestream2_get_byte(gb); unsigned g = bytestream2_get_byte(gb); unsigned b = bytestream2_get_byte(gb); +r |= r >> 4; +g |= g >> 4; +b |= b >> 4; gdv->pal[i] = 0xFFU << 24 | r << 18 | g << 10 | b << 2; } break; diff --git a/libavformat/gdv.c b/libavformat/gdv.c index 3220932..98b073d 100644 --- a/libavformat/gdv.c +++ b/libavformat/gdv.c @@ -140,6 +140,9 @@ static int gdv_read_header(AVFormatContext *ctx) unsigned r = avio_r8(pb); unsigned g = avio_r8(pb); unsigned b = avio_r8(pb); +r |= r >> 4; +g |= g >> 4; +b |= b >> 4; gdv->pal[i] = 0xFFU << 24 | r << 18 | g << 10 | b << 2; } } -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] Properly store sampling rate for FLAC in mp4
2017-08-25 13:25 GMT+02:00 Jean-Yves Avenard : > +if (track->par->codec_id == AV_CODEC_ID_FLAC) { Why does this only apply to flac? Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/mov: Always use av_realloc() for AVCodecParameters.extradata
2017-08-26 11:43 GMT+02:00 Michael Niedermayer : > The fix to this is to make av_malloc() and av_realloc() compatible. > > Does tcmalloc() provide sufficient alignment ? This report indicates it defaults to 16 bytes: https://github.com/gperftools/gperftools/issues/433 But they intend to raise the alignment to 64 bytes iiuc: https://github.com/gperftools/gperftools/issues/808 Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavf/sdp: Fix MIME-type for big-endian G.726 audio.
Hi! Attached patch follows RFC 3551, a followup patch adds little-endian G.726 with the old MIME-type. Please comment, Carl Eugen From 6ee9178dfad75c4fdb1556e929a59c9d80f0976d Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 26 Aug 2017 11:46:18 +0200 Subject: [PATCH 1/2] lavf/sdp: Fix MIME-type for big-endian G.726. RFC 3551 defines "AAL2-G726" for big-endian ("left-justified") G.726 and "G726" for little-endian ("right-justified") G.726. --- libavformat/sdp.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 4e37f65..7751e67 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -674,7 +674,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int break; case AV_CODEC_ID_ADPCM_G726: { if (payload_type >= RTP_PT_PRIVATE) -av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n", +av_strlcatf(buff, size, "a=rtpmap:%d AAL2-G726-%d/%d\r\n", payload_type, p->bits_per_coded_sample*8, p->sample_rate); -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/rawenc: Add G.726 muxers
2017-08-24 13:21 GMT+02:00 Carl Eugen Hoyos : > Hi! > > Attached patch makes creating G.726 files slightly easier. Patch applied. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH]lavf/rtpenc: Add support for little-endian G.726
Hi! Attached patch adds little-endian G.726 support to rtpenc, using the MIME-type suggested by RFC 3551. Please comment, Carl Eugen From 5834684eb2692fbc10f9e70ced66cedab661a828 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Sat, 26 Aug 2017 11:49:46 +0200 Subject: [PATCH 2/2] lavf/rtpenc: Add support for little-endian G.726. --- libavformat/rtpenc.c |2 ++ libavformat/sdp.c|8 2 files changed, 10 insertions(+) diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c index af631a8..573593f 100644 --- a/libavformat/rtpenc.c +++ b/libavformat/rtpenc.c @@ -78,6 +78,7 @@ static int is_supported(enum AVCodecID id) case AV_CODEC_ID_VP9: case AV_CODEC_ID_ADPCM_G722: case AV_CODEC_ID_ADPCM_G726: +case AV_CODEC_ID_ADPCM_G726LE: case AV_CODEC_ID_ILBC: case AV_CODEC_ID_MJPEG: case AV_CODEC_ID_SPEEX: @@ -550,6 +551,7 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt) * clock. */ return rtp_send_samples(s1, pkt->data, size, 8 * st->codecpar->channels); case AV_CODEC_ID_ADPCM_G726: +case AV_CODEC_ID_ADPCM_G726LE: return rtp_send_samples(s1, pkt->data, size, st->codecpar->bits_per_coded_sample * st->codecpar->channels); case AV_CODEC_ID_MP2: diff --git a/libavformat/sdp.c b/libavformat/sdp.c index 7751e67..935b5a1 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -680,6 +680,14 @@ static char *sdp_write_media_attributes(char *buff, int size, AVStream *st, int p->sample_rate); break; } +case AV_CODEC_ID_ADPCM_G726LE: { +if (payload_type >= RTP_PT_PRIVATE) +av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n", + payload_type, + p->bits_per_coded_sample*8, + p->sample_rate); +break; +} case AV_CODEC_ID_ILBC: av_strlcatf(buff, size, "a=rtpmap:%d iLBC/%d\r\n" "a=fmtp:%d mode=%d\r\n", -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/mov: Always use av_realloc() for AVCodecParameters.extradata
On Fri, Aug 25, 2017 at 11:25:11AM -0700, John Rummell wrote: > Chromium uses tcmalloc which doesn't like mixing calls to posix_memalign() > and realloc(). This change updates mov.c to only use av_realloc() when > allocating memory for AVCodecParameters.extradata. > --- > libavformat/mov.c | 21 - > 1 file changed, 12 insertions(+), 9 deletions(-) I dont think this is a practical solution. having av_malloc and av_realloc incompatible is not a path that is maintainable. No matter how hard people want that. The fix to this is to make av_malloc() and av_realloc() compatible. Does tcmalloc() provide sufficient alignment ? if so there is no need for posix_memalign(). If not thats a shortcomming of tcmalloc() and something that especially for a performance oriented malloc would seem out of place. Fixing tcmalloc() so it can interoperate with posix_memalign(), for example by also overriding posix_memalign() or whatever would also be an option but the code removed in 3835283293bfd38ba69203f4618f0f0f21377bcc also would be a fix for this again, i dont object to the patch, i just dont think this is practical maintaince wise. having av_malloc() and av_realloc* incompatible is a minefield and something that creates an endless stream of bugs, work and bugfixes. Making them compatible would lead to much more robust code [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB In fact, the RIAA has been known to suggest that students drop out of college or go to community college in order to be able to afford settlements. -- The RIAA signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFmpeg 3.4
Le nonidi 9 fructidor, an CCXXV, Paul B Mahol a écrit : > Please wait until overlay filter fixes land in. I am still waiting a few days, for reviews of the individual patches. Especially the libvmaf change because I would like confirmation that the valgrind errors have disappeared. I expect I will push on Tuesday. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] FFmpeg 3.4
On 8/26/17, Michael Niedermayer wrote: > Hi all > > Its a while since FFmpeg 3.3, so its time again to make a new release Please wait until overlay filter fixes land in. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] FFmpeg 3.4
Hi all Its a while since FFmpeg 3.3, so its time again to make a new release I intend to make 3.4 in the next weeks Name suggestions needed like always -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avfilter/af_join: detect EOF immediately
L'octidi 8 fructidor, an CCXXV, Paul B Mahol a écrit : > Prevents hang. > > Signed-off-by: Paul B Mahol > --- > libavfilter/af_join.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions(-) Probably not 100% correct, but it comes from the fork, with the old broken scheduling, so no objection is it fixes something. Rewriting amerge to use activate() is high in my priorities. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/snowenc: fix setting motion_est option
On Fri, Aug 25, 2017 at 09:07:53PM -0300, James Almer wrote: > Remove usage of FF_MPV_COMMON_OPTS, and set SnowContext.motion_est directly. > Based on code from svq1enc.c > > Signed-off-by: James Almer > --- > libavcodec/snow.h| 3 ++- > libavcodec/snowenc.c | 9 + > 2 files changed, 7 insertions(+), 5 deletions(-) I tested this with some ME options and it seems to break encode ./ffmpeg -i ~/videos/matrixbench_mpeg2.mpg -an -vcodec snow -vf scale=160:120 -t 1 -refs 3 -me_method iter -dia_size 2 -cmp 12 -subcmp 12 test.avi There are blinking gray images [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Democracy is the form of government in which you can choose your dictator signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel