[FFmpeg-cvslog] avfilter/af_sofalizer: fix crash when ir size is not aligned, usually when n_samples are not power of 2
ffmpeg | branch: master | Paul B Mahol | Fri Mar 4 10:36:11 2016 +0100| [79a54f30c8ba02cbf2b02c650120246b260977ec] | committer: Paul B Mahol avfilter/af_sofalizer: fix crash when ir size is not aligned, usually when n_samples are not power of 2 Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=79a54f30c8ba02cbf2b02c650120246b260977ec --- libavfilter/af_sofalizer.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index 33937d8..4c7ea68 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -490,8 +490,15 @@ static int compensate_volume(AVFilterContext *ctx) av_log(ctx, AV_LOG_DEBUG, "Compensate-factor: %f\n", compensate); ir = sofa->data_ir; /* apply volume compensation to IRs */ -s->fdsp->vector_fmul_scalar(ir, ir, compensate, sofa->n_samples * sofa->m_dim * 2); -emms_c(); +if (sofa->n_samples & 31) { +int i; +for (i = 0; i < sofa->n_samples * sofa->m_dim * 2; i++) { +ir[i] = ir[i] * compensate; +} +} else { +s->fdsp->vector_fmul_scalar(ir, ir, compensate, sofa->n_samples * sofa->m_dim * 2); +emms_c(); +} } return 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/nvenc: Fix H264 and HEVC vui info update
ffmpeg | branch: master | Agatha Hu | Fri Mar 4 17:00:48 2016 +0800| [362e05f1ea05ef7f9892f0e888323136ba77dd94] | committer: Timo Rothenpieler avcodec/nvenc: Fix H264 and HEVC vui info update Signed-off-by: Timo Rothenpieler > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=362e05f1ea05ef7f9892f0e888323136ba77dd94 --- libavcodec/nvenc.c | 27 +++ 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index a3b02fa..5d78930 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -868,14 +868,19 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) switch (avctx->codec->id) { case AV_CODEC_ID_H264: - ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.colourDescriptionPresentFlag = 1; - ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoSignalTypePresentFlag = 1; - ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.colourMatrix = avctx->colorspace; ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.colourPrimaries = avctx->color_primaries; ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.transferCharacteristics = avctx->color_trc; + ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag = (avctx->color_range == AVCOL_RANGE_JPEG +|| avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || avctx->pix_fmt == AV_PIX_FMT_YUVJ444P); + + ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.colourDescriptionPresentFlag = +(avctx->colorspace != 2 || avctx->color_primaries != 2 || avctx->color_trc != 2); - ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag = avctx->color_range == AVCOL_RANGE_JPEG; + ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoSignalTypePresentFlag = + (ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.colourDescriptionPresentFlag +|| ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFormat != 5 +|| ctx->encode_config.encodeCodecConfig.h264Config.h264VUIParameters.videoFullRangeFlag != 0); ctx->encode_config.encodeCodecConfig.h264Config.sliceMode = 3; ctx->encode_config.encodeCodecConfig.h264Config.sliceModeData = 1; @@ -944,6 +949,20 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx) break; case AV_CODEC_ID_H265: + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourMatrix = avctx->colorspace; + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourPrimaries = avctx->color_primaries; + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.transferCharacteristics = avctx->color_trc; + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag = (avctx->color_range == AVCOL_RANGE_JPEG +|| avctx->pix_fmt == AV_PIX_FMT_YUVJ420P || avctx->pix_fmt == AV_PIX_FMT_YUVJ422P || avctx->pix_fmt == AV_PIX_FMT_YUVJ444P); + + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourDescriptionPresentFlag = +(avctx->colorspace != 2 || avctx->color_primaries != 2 || avctx->color_trc != 2); + + ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoSignalTypePresentFlag = + (ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.colourDescriptionPresentFlag +|| ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFormat != 5 +|| ctx->encode_config.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag != 0); + ctx->encode_config.encodeCodecConfig.hevcConfig.sliceMode = 3; ctx->encode_config.encodeCodecConfig.hevcConfig.sliceModeData = 1; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec: Extend fft to size 2^17
ffmpeg | branch: master | Michael Niedermayer | Fri Mar 4 00:31:45 2016 +0100| [ae76b842213380758adf4828b8602ac57a7492e4] | committer: Michael Niedermayer avcodec: Extend fft to size 2^17 Asked-for-by: durandal_1707 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ae76b842213380758adf4828b8602ac57a7492e4 --- libavcodec/fft.h|3 +- libavcodec/fft_init_table.c | 386 --- libavcodec/fft_table.h |2 +- libavcodec/fft_template.c |9 +- libavcodec/mips/fft_mips.c |5 +- libavcodec/x86/fft.asm |4 +- 6 files changed, 272 insertions(+), 137 deletions(-) diff --git a/libavcodec/fft.h b/libavcodec/fft.h index 64f0f63..60df239 100644 --- a/libavcodec/fft.h +++ b/libavcodec/fft.h @@ -134,7 +134,8 @@ extern COSTABLE(8192); extern COSTABLE(16384); extern COSTABLE(32768); extern COSTABLE(65536); -extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[17]; +extern COSTABLE(131072); +extern COSTABLE_CONST FFTSample* const FFT_NAME(ff_cos_tabs)[18]; #define ff_init_ff_cos_tabs FFT_NAME(ff_init_ff_cos_tabs) diff --git a/libavcodec/fft_init_table.c b/libavcodec/fft_init_table.c index 4d74f8a..c488018 100644 --- a/libavcodec/fft_init_table.c +++ b/libavcodec/fft_init_table.c @@ -54,137 +54,265 @@ #include "libavcodec/fft_table.h" const int32_t ff_w_tab_sr[MAX_FFT_SIZE/(4*16)] = { -2147483647, 2147481121, 2147473542, 2147460908, 2147443222, 2147420483, 2147392690, 2147359845, -2147321946, 2147278995, 2147230991, 2147177934, 2147119825, 2147056664, 2146988450, 2146915184, -2146836866, 2146753497, 2146665076, 2146571603, 2146473080, 2146369505, 2146260881, 2146147205, -2146028480, 2145904705, 2145775880, 2145642006, 2145503083, 2145359112, 2145210092, 2145056025, -2144896910, 2144732748, 2144563539, 2144389283, 2144209982, 2144025635, 2143836244, 2143641807, -2143442326, 2143237802, 2143028234, 2142813624, 2142593971, 2142369276, 2142139541, 2141904764, -2141664948, 2141420092, 2141170197, 2140915264, 2140655293, 2140390284, 2140120240, 2139845159, -2139565043, 2139279892, 2138989708, 2138694490, 2138394240, 2138088958, 2137778644, 2137463301, -2137142927, 2136817525, 2136487095, 2136151637, 2135811153, 2135465642, 2135115107, 2134759548, -2134398966, 2134033361, 2133662734, 2133287087, 2132906420, 2132520734, 2132130030, 2131734309, -2131333572, 2130927819, 2130517052, 2130101272, 2129680480, 2129254676, 2128823862, 2128388038, -2127947206, 2127501367, 2127050522, 2126594672, 2126133817, 2125667960, 2125197100, 2124721240, -2124240380, 2123754522, 2123263666, 2122767814, 2122266967, 2121761126, 2121250292, 2120734467, -2120213651, 2119687847, 2119157054, 2118621275, 2118080511, 2117534762, 2116984031, 2116428319, -2115867626, 2115301954, 2114731305, 2114155680, 2113575080, 2112989506, 2112398960, 2111803444, -2111202959, 2110597505, 2109987085, 2109371700, 2108751352, 2108126041, 2107495770, 2106860540, -2106220352, 2105575208, 2104925109, 2104270057, 2103610054, 2102945101, 2102275199, 2101600350, -2100920556, 2100235819, 2099546139, 2098851519, 2098151960, 2097447464, 2096738032, 2096023667, -2095304370, 2094580142, 2093850985, 2093116901, 2092377892, 2091633960, 2090885105, 2090131331, -2089372638, 2088609029, 2087840505, 2087067068, 2086288720, 2085505463, 2084717298, 2083924228, -2083126254, 2082323379, 2081515603, 2080702930, 2079885360, 2079062896, 2078235540, 2077403294, -2076566160, 2075724139, 2074877233, 2074025446, 2073168777, 2072307231, 2071440808, 2070569511, -2069693342, 2068812302, 2067926394, 2067035621, 2066139983, 2065239484, 2064334124, 2063423908, -2062508835, 2061588910, 2060664133, 2059734508, 2058800036, 2057860719, 2056916560, 2055967560, -2055013723, 2054055050, 2053091544, 2052123207, 2051150040, 2050172048, 2049189231, 2048201592, -2047209133, 2046211857, 2045209767, 2044202863, 2043191150, 2042174628, 2041153301, 2040127172, -2039096241, 2038060512, 2037019988, 2035974670, 2034924562, 2033869665, 2032809982, 2031745516, -2030676269, 2029602243, 2028523442, 2027439867, 2026351522, 2025258408, 2024160529, 2023057887, -2021950484, 2020838323, 2019721407, 2018599739, 2017473321, 2016342155, 2015206245, 2014065592, -2012920201, 2011770073, 2010615210, 2009455617, 2008291295, 2007122248, 2005948478, 2004769987, -2003586779, 2002398857, 2001206222, 208879, 1998806829, 1997600076, 1996388622, 1995172471, -1993951625, 1992726087, 1991495860, 1990260946, 1989021350, 198073, 1986528118, 1985274489, -1984016189, 1982753220, 1981485585, 1980213288, 1978936331, 1977654717, 1976368450, 1975077532, -1973781967, 1972481757, 1971176906, 1969867417, 1968553292, 1967234535, 1965911148, 1964583136, -1963250501, 1961913246, 1960571375, 1959224890, 1957873796, 1956518093, 1955157788,
[FFmpeg-cvslog] avcodec/fft: Add revtab32 for FFTs with more than 65536 samples
ffmpeg | branch: master | Michael Niedermayer | Fri Mar 4 15:39:55 2016 +0100| [305344d89e21ed11c74274167cf597f151778c42] | committer: Michael Niedermayer avcodec/fft: Add revtab32 for FFTs with more than 65536 samples x86 optimizations are used only for the cases they support (<=65536 samples) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=305344d89e21ed11c74274167cf597f151778c42 --- libavcodec/fft.h |1 + libavcodec/fft_template.c | 31 ++- libavcodec/x86/fft_init.c |3 +++ 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/libavcodec/fft.h b/libavcodec/fft.h index 60df239..c858570 100644 --- a/libavcodec/fft.h +++ b/libavcodec/fft.h @@ -110,6 +110,7 @@ struct FFTContext { void (*mdct_calcw)(struct FFTContext *s, FFTDouble *output, const FFTSample *input); enum fft_permutation_type fft_permutation; enum mdct_permutation_type mdct_permutation; +uint32_t *revtab32; }; #if CONFIG_HARDCODED_TABLES diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c index 2781a33..480557f 100644 --- a/libavcodec/fft_template.c +++ b/libavcodec/fft_template.c @@ -143,14 +143,23 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) { int i, j, n; +s->revtab = NULL; +s->revtab32 = NULL; + if (nbits < 2 || nbits > 17) goto fail; s->nbits = nbits; n = 1 << nbits; -s->revtab = av_malloc(n * sizeof(uint16_t)); -if (!s->revtab) -goto fail; +if (nbits <= 16) { +s->revtab = av_malloc(n * sizeof(uint16_t)); +if (!s->revtab) +goto fail; +} else { +s->revtab32 = av_malloc(n * sizeof(uint32_t)); +if (!s->revtab32) +goto fail; +} s->tmp_buf = av_malloc(n * sizeof(FFTComplex)); if (!s->tmp_buf) goto fail; @@ -192,16 +201,22 @@ av_cold int ff_fft_init(FFTContext *s, int nbits, int inverse) fft_perm_avx(s); } else { for(i=0; ifft_permutation == FF_FFT_PERM_SWAP_LSBS) j = (j&~3) | ((j>>1)&1) | ((j<<1)&2); -s->revtab[-split_radix_permutation(i, n, s->inverse) & (n-1)] = j; +k = -split_radix_permutation(i, n, s->inverse) & (n-1); +if (s->revtab) +s->revtab[k] = j; +if (s->revtab32) +s->revtab32[k] = j; } } return 0; fail: av_freep(&s->revtab); +av_freep(&s->revtab32); av_freep(&s->tmp_buf); return -1; } @@ -210,15 +225,21 @@ static void fft_permute_c(FFTContext *s, FFTComplex *z) { int j, np; const uint16_t *revtab = s->revtab; +const uint32_t *revtab32 = s->revtab32; np = 1 << s->nbits; /* TODO: handle split-radix permute in a more optimal way, probably in-place */ -for(j=0;jtmp_buf[revtab[j]] = z[j]; +if (revtab) { +for(j=0;jtmp_buf[revtab[j]] = z[j]; +} else +for(j=0;jtmp_buf[revtab32[j]] = z[j]; + memcpy(z, s->tmp_buf, np * sizeof(FFTComplex)); } av_cold void ff_fft_end(FFTContext *s) { av_freep(&s->revtab); +av_freep(&s->revtab32); av_freep(&s->tmp_buf); } diff --git a/libavcodec/x86/fft_init.c b/libavcodec/x86/fft_init.c index 5085f11..337f32d 100644 --- a/libavcodec/x86/fft_init.c +++ b/libavcodec/x86/fft_init.c @@ -26,6 +26,9 @@ av_cold void ff_fft_init_x86(FFTContext *s) { int cpu_flags = av_get_cpu_flags(); +if (s->nbits > 16) +return; + #if ARCH_X86_32 if (EXTERNAL_AMD3DNOW(cpu_flags)) { /* 3DNow! for K6-2/3 */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/af_afftfilt: Extend to 17bit fft
ffmpeg | branch: master | Michael Niedermayer | Fri Mar 4 13:53:02 2016 +0100| [500cb984710ccd66023f7dc1fa31548a0920e3e2] | committer: Michael Niedermayer avfilter/af_afftfilt: Extend to 17bit fft Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=500cb984710ccd66023f7dc1fa31548a0920e3e2 --- libavfilter/af_afftfilt.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index 8e41f52..b4c0937 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -60,7 +60,7 @@ enum { VAR_SAMPLE_RATE, VAR_BIN, VAR_NBBINS, V static const AVOption afftfilt_options[] = { { "real", "set channels real expressions", OFFSET(real_str), AV_OPT_TYPE_STRING, {.str = "1" }, 0, 0, A }, { "imag", "set channels imaginary expressions", OFFSET(img_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, A }, -{ "win_size", "set window size", OFFSET(fft_bits), AV_OPT_TYPE_INT, {.i64=12}, 4, 16, A, "fft" }, +{ "win_size", "set window size", OFFSET(fft_bits), AV_OPT_TYPE_INT, {.i64=12}, 4, 17, A, "fft" }, { "w16",0, 0, AV_OPT_TYPE_CONST, {.i64=4}, 0, 0, A, "fft" }, { "w32",0, 0, AV_OPT_TYPE_CONST, {.i64=5}, 0, 0, A, "fft" }, { "w64",0, 0, AV_OPT_TYPE_CONST, {.i64=6}, 0, 0, A, "fft" }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat: Add a protocol blacklisting API
ffmpeg | branch: master | Derek Buitenhuis | Thu Mar 3 17:14:26 2016 +| [93629735d76c09405248c1f6b2b2c5517fff88fd] | committer: Derek Buitenhuis avformat: Add a protocol blacklisting API Signed-off-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=93629735d76c09405248c1f6b2b2c5517fff88fd --- Changelog |1 + doc/APIchanges|3 +++ libavformat/async.c |2 +- libavformat/avformat.h| 11 +-- libavformat/avidec.c |2 +- libavformat/avio.c| 22 -- libavformat/avio.h|5 + libavformat/avio_internal.h |2 +- libavformat/aviobuf.c | 13 + libavformat/cache.c |2 +- libavformat/concat.c |2 +- libavformat/concatdec.c |2 +- libavformat/crypto.c |2 +- libavformat/ftp.c |4 ++-- libavformat/gopher.c |2 +- libavformat/hls.c |2 +- libavformat/hlsproto.c|4 ++-- libavformat/http.c|6 +++--- libavformat/icecast.c |2 +- libavformat/internal.h|2 +- libavformat/md5proto.c|2 +- libavformat/mmst.c|2 +- libavformat/mpeg.c|2 +- libavformat/options.c |2 +- libavformat/options_table.h |1 + libavformat/rdt.c |2 +- libavformat/rtmpcrypt.c |2 +- libavformat/rtmpproto.c |4 ++-- libavformat/rtpdec_asf.c |2 +- libavformat/rtpproto.c|6 +++--- libavformat/rtsp.c| 10 +- libavformat/rtspdec.c |4 ++-- libavformat/sapdec.c |4 ++-- libavformat/sapenc.c |4 ++-- libavformat/smoothstreamingenc.c |8 libavformat/srtpproto.c |2 +- libavformat/subfile.c |2 +- libavformat/tls.c |2 +- libavformat/tls_securetransport.c |2 +- libavformat/url.h |3 ++- libavformat/utils.c | 19 +++ libavformat/version.h |4 ++-- 42 files changed, 116 insertions(+), 64 deletions(-) diff --git a/Changelog b/Changelog index d6459a8..0e70724 100644 --- a/Changelog +++ b/Changelog @@ -10,6 +10,7 @@ version : - datascope filter - bench and abench filters - ciescope filter +- protocol blacklisting API version 3.0: diff --git a/doc/APIchanges b/doc/APIchanges index a75f346..2fc6a71 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-XX-XX - xxx - lavf 57.28.100 + Add protocol blacklisting API + 2016-02-28 - xxx - lavc 57.27.101 Validate AVFrame returned by get_buffer2 to have required planes not NULL and unused planes set to NULL as crashes diff --git a/libavformat/async.c b/libavformat/async.c index a835292..0cc6fb0 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -251,7 +251,7 @@ static int async_open(URLContext *h, const char *arg, int flags, AVDictionary ** /* wrap interrupt callback */ c->interrupt_callback = h->interrupt_callback; -ret = ffurl_open_whitelist(&c->inner, arg, flags, &interrupt_callback, options, h->protocol_whitelist); +ret = ffurl_open_whitelist(&c->inner, arg, flags, &interrupt_callback, options, h->protocol_whitelist, h->protocol_blacklist); if (ret != 0) { av_log(h, AV_LOG_ERROR, "ffurl_open failed : %s, %s\n", av_err2str(ret), arg); goto url_fail; diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b843a4b..ef34c86 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1832,11 +1832,11 @@ typedef struct AVFormatContext { #endif /** - * ',' separated list of allowed protocols. + * ',' separated list of disallowed protocols. * - encoding: unused * - decoding: set by user through AVOptions (NO direct access) */ -char *protocol_whitelist; +char *protocol_blacklist; /* * A callback for opening new IO streams. @@ -1865,6 +1865,13 @@ typedef struct AVFormatContext { * A callback for closing the streams opened with AVFormatContext.io_open(). */ void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); + +/** + * ',' separated list of disallowed protocols. + * - encoding: unused + * - decoding: set by user through AVOptions (NO direct access) + */ +char *protocol_blacklist; } AVFormatContext; int av_format_get_probe_score(const AVFormatContext *s); diff --git a/libavformat/avidec.c b/libavformat/avidec.c index 3859810..eaf8421 100644 --- a/libavformat/avidec.c +++ b/libavformat/avidec.c @@ -1089,7 +1089,7 @@ static int read_gab2_sub(AVFormatConte
[FFmpeg-cvslog] Merge commit 'ec4c48397641dbaf4ae8df36c32aaa5a311a11bf'
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:14:53 2016 +| [063b26d35857f72b4f9bd24ea509808291f5d6b8] | committer: Derek Buitenhuis Merge commit 'ec4c48397641dbaf4ae8df36c32aaa5a311a11bf' This is a no-op. API is already implemented by us. * commit 'ec4c48397641dbaf4ae8df36c32aaa5a311a11bf': lavf: add a protocol whitelist/blacklist for file opened internally Merged-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=063b26d35857f72b4f9bd24ea509808291f5d6b8 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf: add a protocol whitelist/blacklist for file opened internally
ffmpeg | branch: master | Anton Khirnov | Wed Jan 20 11:11:38 2016 +0100| [ec4c48397641dbaf4ae8df36c32aaa5a311a11bf] | committer: Anton Khirnov lavf: add a protocol whitelist/blacklist for file opened internally Should make the default behaviour safer for careless callers that open random untrusted files. Bug-Id: CVE-2016-1897 Bug-Id: CVE-2016-1898 > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ec4c48397641dbaf4ae8df36c32aaa5a311a11bf --- doc/APIchanges |5 +++ libavformat/avformat.h | 18 ++ libavformat/aviobuf.c| 67 +++--- libavformat/options.c| 22 - libavformat/options_table.h |4 +++ libavformat/rtsp.c |9 +++-- libavformat/rtspdec.c|3 +- libavformat/sapdec.c |3 +- libavformat/sapenc.c |3 +- libavformat/smoothstreamingenc.c |2 +- libavformat/version.h|2 +- 11 files changed, 125 insertions(+), 13 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index b9a0008..b84fa4e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,11 @@ libavutil: 2015-08-28 API changes, most recent first: +2016-xx-xx - xxx - lavf 57.4.0 - avformat.h + Add AVFormatContext.protocol_whitelist and protocol_blacklist. + Add 'protocol_whitelist' and 'protocol_blacklist' private options for + avio_open2(). + 2016-xx-xx - lavc 57.13.0 - avcodec.h Add AVCodecContext.hw_frames_ctx. diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 8dab2b7..b63541d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1261,6 +1261,24 @@ typedef struct AVFormatContext { * A callback for closing the streams opened with AVFormatContext.io_open(). */ void (*io_close)(struct AVFormatContext *s, AVIOContext *pb); + +/** + * A comma-separated list of protocol names that will not be used internally + * by libavformat. If this field is a non-empty string, then protocols + * listed here will be forbidden. + * + * This field should be set using AVOptions. + */ +char *protocol_blacklist; + +/** + * A comma-separated list of protocol names that can be used internally by + * libavformat. If this field is a non-empty string, all protocols not + * listed here will be forbidden. + * + * This field should be set using AVOptions. + */ +char *protocol_whitelist; } AVFormatContext; typedef struct AVPacketList { diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 20bef66..a2edb74 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -41,20 +41,53 @@ #define SHORT_SEEK_THRESHOLD 4096 typedef struct AVIOInternal { +const AVClass *class; + +char *protocol_whitelist; +char *protocol_blacklist; + URLContext *h; const URLProtocol **protocols; } AVIOInternal; +static void *io_priv_child_next(void *obj, void *prev) +{ +AVIOInternal *internal = obj; +return prev ? NULL : internal->h; +} + +static const AVClass *io_priv_child_class_next(const AVClass *prev) +{ +return prev ? NULL : &ffurl_context_class; +} + +#define OFFSET(x) offsetof(AVIOInternal, x) +static const AVOption io_priv_options[] = { +{ "protocol_whitelist", "A comma-separated list of allowed protocols", +OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING }, +{ "protocol_blacklist", "A comma-separated list of forbidden protocols", +OFFSET(protocol_whitelist), AV_OPT_TYPE_STRING }, +{ NULL }, +}; + +static const AVClass io_priv_class = { +.class_name = "AVIOContext", +.item_name= av_default_item_name, +.version = LIBAVUTIL_VERSION_INT, +.option = io_priv_options, +.child_next = io_priv_child_next, +.child_class_next = io_priv_child_class_next, +}; + static void *ff_avio_child_next(void *obj, void *prev) { AVIOContext *s = obj; -AVIOInternal *internal = s->opaque; -return prev ? NULL : internal->h; +return prev ? NULL : s->opaque; } static const AVClass *ff_avio_child_class_next(const AVClass *prev) { -return prev ? NULL : &ffurl_context_class; +return prev ? NULL : &io_priv_class; } static const AVOption ff_avio_options[] = { @@ -750,8 +783,11 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if (!internal) goto fail; +internal->class = &io_priv_class; internal->h = h; +av_opt_set_defaults(internal); + *s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, internal, io_read_packet, io_write_packet, io_seek); if (!*s) @@ -766,6 +802,8 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) (*s)->av_class = &ff_avio_class; return 0; fail: +if (internal) +av_opt_free(internal); av_freep(&internal); av_freep(&buffer); return AVERROR(EN
[FFmpeg-cvslog] Merge commit '5e555f93009f0605db120eec78262d0fe337e645'
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:17:05 2016 +| [a38eadd7e93de69a060b68891466d82e626623ba] | committer: Derek Buitenhuis Merge commit '5e555f93009f0605db120eec78262d0fe337e645' AVClass is now a const, the rest are no-op. * commit '5e555f93009f0605db120eec78262d0fe337e645': mpeg12enc: always write closed gops for intra only outputs h264: Add an AVClass pointer to H264Context libx264: Fix noise_reduction option assignment Merged-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a38eadd7e93de69a060b68891466d82e626623ba --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libx264: Fix noise_reduction option assignment
ffmpeg | branch: master | Vittorio Giovara | Tue Feb 16 12:12:23 2016 -0500| [0837d1dfe28f8c461e23404ecb11b0bde1d16af2] | committer: Vittorio Giovara libx264: Fix noise_reduction option assignment First check the context, then check internal option. Drop the ! typo. Introduced in 60f0fde3092d18d4d36555962c192af8691a099c. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0837d1dfe28f8c461e23404ecb11b0bde1d16af2 --- libavcodec/libx264.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 7798ef3..8d72f1c 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -457,11 +457,11 @@ FF_ENABLE_DEPRECATION_WARNINGS x4->params.analyse.i_me_range = avctx->me_range; #if FF_API_PRIVATE_OPT FF_DISABLE_DEPRECATION_WARNINGS -if (!x4->noise_reduction >= 0) +if (avctx->noise_reduction >= 0) x4->noise_reduction = avctx->noise_reduction; FF_ENABLE_DEPRECATION_WARNINGS #endif -if (!x4->noise_reduction >= 0) +if (x4->noise_reduction >= 0) x4->params.analyse.i_noise_reduction = x4->noise_reduction; if (avctx->me_subpel_quality >= 0) x4->params.analyse.i_subpel_refine = avctx->me_subpel_quality; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] h264: Add an AVClass pointer to H264Context
ffmpeg | branch: master | Michael Niedermayer | Tue Feb 9 17:25:49 2016 -0500| [f435d081b0a64b3a0c14f37bcdebed01df51d56a] | committer: Vittorio Giovara h264: Add an AVClass pointer to H264Context Sample-Id: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer Signed-off-by: Vittorio Giovara > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f435d081b0a64b3a0c14f37bcdebed01df51d56a --- libavcodec/h264.h |1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 13b149f..72ad352 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -465,6 +465,7 @@ typedef struct H264SliceContext { * H264Context */ typedef struct H264Context { +const AVClass *class; AVCodecContext *avctx; VideoDSPContext vdsp; H264DSPContext h264dsp; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] mpeg12enc: always write closed gops for intra only outputs
ffmpeg | branch: master | Marton Balint | Mon Dec 8 14:27:03 2014 +| [5e555f93009f0605db120eec78262d0fe337e645] | committer: Vittorio Giovara mpeg12enc: always write closed gops for intra only outputs Reviewed-by: Michael Niedermayer Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5e555f93009f0605db120eec78262d0fe337e645 --- libavcodec/mpeg12enc.c |2 +- tests/ref/lavf/mxf_d10 |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 67bc467..78605c5 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -331,7 +331,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) put_bits(&s->pb, 1, 1); put_bits(&s->pb, 6, (uint32_t)((time_code / fps) % 60)); put_bits(&s->pb, 6, (uint32_t)((time_code % fps))); -put_bits(&s->pb, 1, !!(s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP)); +put_bits(&s->pb, 1, !!(s->avctx->flags & AV_CODEC_FLAG_CLOSED_GOP) || s->intra_only); put_bits(&s->pb, 1, 0); // broken link } } diff --git a/tests/ref/lavf/mxf_d10 b/tests/ref/lavf/mxf_d10 index 5864e8e..8a62bb0 100644 --- a/tests/ref/lavf/mxf_d10 +++ b/tests/ref/lavf/mxf_d10 @@ -1,3 +1,3 @@ -8cf467a910c84dd05db24848becba42e *./tests/data/lavf/lavf.mxf_d10 +96f933913835a439dd97144303dc8929 *./tests/data/lavf/lavf.mxf_d10 5330989 ./tests/data/lavf/lavf.mxf_d10 ./tests/data/lavf/lavf.mxf_d10 CRC=0x4474d480 ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: Be silent when fetching Git updates
ffmpeg | branch: master | Diego Biurrun | Sat Feb 20 18:34:20 2016 +0100| [9328adcc8012a1b0e00c465c85b5453589a4f5f7] | committer: Diego Biurrun fate: Be silent when fetching Git updates > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9328adcc8012a1b0e00c465c85b5453589a4f5f7 --- tests/fate.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate.sh b/tests/fate.sh index 8adbd8c..a192981 100755 --- a/tests/fate.sh +++ b/tests/fate.sh @@ -37,7 +37,7 @@ checkout(){ update()( cd ${src} || return case "$repo" in -git:*) git fetch --force; git reset --quiet --hard "origin/$branch" ;; +git:*) git fetch --quiet --force; git reset --quiet --hard "origin/$branch" ;; esac ) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '9328adcc8012a1b0e00c465c85b5453589a4f5f7'
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:18:32 2016 +| [18d8398caf91ac585ae162a26ebddc0da756408f] | committer: Derek Buitenhuis Merge commit '9328adcc8012a1b0e00c465c85b5453589a4f5f7' * commit '9328adcc8012a1b0e00c465c85b5453589a4f5f7': fate: Be silent when fetching Git updates Merged-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=18d8398caf91ac585ae162a26ebddc0da756408f --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] fate: Ignore errors from concatenating report files
ffmpeg | branch: master | Diego Biurrun | Sun Feb 21 12:12:26 2016 +0100| [cd846b47977485bd4063e77a3324e6b7840567a2] | committer: Diego Biurrun fate: Ignore errors from concatenating report files Some files may be missing for valid reasons, e.g. on compile failure. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd846b47977485bd4063e77a3324e6b7840567a2 --- tests/fate.sh |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate.sh b/tests/fate.sh index a192981..b8ee1ae 100755 --- a/tests/fate.sh +++ b/tests/fate.sh @@ -83,7 +83,7 @@ clean(){ report(){ date=$(date -u +%Y%m%d%H%M%S) echo "fate:1:${date}:${slot}:${version}:$1:$2:${branch}:${comment}" >report -cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report +cat ${build}/config.fate ${build}/tests/data/fate/*.rep >>report 2>/dev/null test -n "$fate_recv" && $tar report *.log | gzip | $fate_recv } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit '257b30af8ec520c1635092e429606c62d3bcca63'
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:21:18 2016 +| [61c554bd5feee96bbb3ffe62b37b09c824f9287d] | committer: Derek Buitenhuis Merge commit '257b30af8ec520c1635092e429606c62d3bcca63' This commit is a no-op. We already have these, plus our asm differs. * commit '257b30af8ec520c1635092e429606c62d3bcca63': x86: hevc: Fix linking with both yasm and optimizations disabled Merged-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=61c554bd5feee96bbb3ffe62b37b09c824f9287d --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] x86: hevc: Fix linking with both yasm and optimizations disabled
ffmpeg | branch: master | Diego Biurrun | Sun Feb 21 14:04:40 2016 +0100| [257b30af8ec520c1635092e429606c62d3bcca63] | committer: Diego Biurrun x86: hevc: Fix linking with both yasm and optimizations disabled Some optimized functions reference optimized symbols, so the functions must be explicitly disabled when those symbols are unavailable. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=257b30af8ec520c1635092e429606c62d3bcca63 --- libavcodec/x86/hevcdsp_init.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c index d0c1776..fd22fc3 100644 --- a/libavcodec/x86/hevcdsp_init.c +++ b/libavcodec/x86/hevcdsp_init.c @@ -86,7 +86,7 @@ INTERP_HV_FUNC(32, avx) INTERP_HV_FUNC(48, avx) INTERP_HV_FUNC(64, avx) -#if ARCH_X86_64 +#if ARCH_X86_64 && HAVE_AVX_EXTERNAL #define QPEL_FUNC_HV(width, depth, cf_h, cf_v, cf_hv) \ static void hevc_qpel_hv_ ## width ## _ ## depth ## _ ## cf_hv(int16_t *dst, ptrdiff_t dststride, \ uint8_t *src, ptrdiff_t srcstride, \ @@ -100,7 +100,7 @@ static void hevc_qpel_hv_ ## width ## _ ## depth ## _ ## cf_hv(int16_t *dst, ptr } #else #define QPEL_FUNC_HV(width, depth, cf_h, cf_v, cf_hv) -#endif +#endif /* ARCH_X86_64 && HAVE_AVX_EXTERNAL */ #define QPEL_FUNCS(width, depth, cf_h, cf_v, cf_hv) \ void ff_hevc_qpel_h_ ## width ## _ ## depth ## _ ## cf_h(int16_t *dst, ptrdiff_t dststride, \ @@ -129,7 +129,7 @@ QPEL_FUNCS(32, 10, avx, avx, avx) QPEL_FUNCS(48, 10, avx, avx, avx) QPEL_FUNCS(64, 10, avx, avx, avx) -#if ARCH_X86_64 +#if ARCH_X86_64 && HAVE_AVX_EXTERNAL #define EPEL_FUNC_HV(width, depth, cf_h, cf_v, cf_hv) \ static void hevc_epel_hv_ ## width ## _ ## depth ## _ ## cf_hv(int16_t *dst, ptrdiff_t dststride, \ uint8_t *src, ptrdiff_t srcstride, \ @@ -143,7 +143,7 @@ static void hevc_epel_hv_ ## width ## _ ## depth ## _ ## cf_hv(int16_t *dst, ptr } #else #define EPEL_FUNC_HV(width, depth, cf_h, cf_v, cf_hv) -#endif +#endif /* ARCH_X86_64 && HAVE_AVX_EXTERNAL */ #define EPEL_FUNCS(width, depth, cf_h, cf_v, cf_hv) \ void ff_hevc_epel_h_ ## width ## _ ## depth ## _ ## cf_h(int16_t *dst, ptrdiff_t dststride, \ @@ -277,8 +277,10 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) } if (EXTERNAL_AVX(cpu_flags)) { +#if HAVE_AVX_EXTERNAL SET_QPEL_FUNCS(1, 1, 8, avx, hevc_qpel_hv); SET_EPEL_FUNCS(1, 1, 8, avx, hevc_epel_hv); +#endif /* HAVE_AVX_EXTERNAL */ } } else if (bit_depth == 10) { if (EXTERNAL_SSSE3(cpu_flags)) { @@ -292,12 +294,14 @@ void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth) SET_CHROMA_FUNCS(weighted_pred_avg_chroma, ff_hevc_put_weighted_pred_avg, 10, sse4); } if (EXTERNAL_AVX(cpu_flags)) { +#if HAVE_AVX_EXTERNAL SET_QPEL_FUNCS(0, 1, 10, avx, ff_hevc_qpel_h); SET_QPEL_FUNCS(1, 0, 10, avx, ff_hevc_qpel_v); SET_QPEL_FUNCS(1, 1, 10, avx, hevc_qpel_hv); SET_EPEL_FUNCS(0, 1, 10, avx, ff_hevc_epel_h); SET_EPEL_FUNCS(1, 0, 10, avx, ff_hevc_epel_v); SET_EPEL_FUNCS(1, 1, 10, avx, hevc_epel_hv); +#endif /* HAVE_AVX_EXTERNAL */ } } #endif /* ARCH_X86_64 */ ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Merge commit 'cd846b47977485bd4063e77a3324e6b7840567a2'
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:19:57 2016 +| [89790ba2bfc9d0dc5ad407c5724b6ee616ecde58] | committer: Derek Buitenhuis Merge commit 'cd846b47977485bd4063e77a3324e6b7840567a2' * commit 'cd846b47977485bd4063e77a3324e6b7840567a2': fate: Ignore errors from concatenating report files Merged-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=89790ba2bfc9d0dc5ad407c5724b6ee616ecde58 --- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avformat: Fix member name 10L
ffmpeg | branch: master | Derek Buitenhuis | Fri Mar 4 16:33:10 2016 +| [fb2f16459894f1f41fdf8c9e7383704d6d3591b0] | committer: Derek Buitenhuis avformat: Fix member name 10L The wrong member was remove/moved after review of the blacklist API. 10L cola. Signed-off-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fb2f16459894f1f41fdf8c9e7383704d6d3591b0 --- libavformat/avformat.h |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ef34c86..a558f2d 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -1832,11 +1832,11 @@ typedef struct AVFormatContext { #endif /** - * ',' separated list of disallowed protocols. + * ',' separated list of allowed protocols. * - encoding: unused * - decoding: set by user through AVOptions (NO direct access) */ -char *protocol_blacklist; +char *protocol_whitelist; /* * A callback for opening new IO streams. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/af_sofalizer: check if filename was set.
ffmpeg | branch: master | Paul B Mahol | Fri Mar 4 22:14:43 2016 +0100| [781195fa6229fbeea81e134eb84d7ba6effdb9b9] | committer: Paul B Mahol avfilter/af_sofalizer: check if filename was set. Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=781195fa6229fbeea81e134eb84d7ba6effdb9b9 --- libavfilter/af_sofalizer.c |5 + 1 file changed, 5 insertions(+) diff --git a/libavfilter/af_sofalizer.c b/libavfilter/af_sofalizer.c index 4c7ea68..2d18b7f 100644 --- a/libavfilter/af_sofalizer.c +++ b/libavfilter/af_sofalizer.c @@ -937,6 +937,11 @@ static av_cold int init(AVFilterContext *ctx) SOFAlizerContext *s = ctx->priv; int ret; +if (!s->filename) { +av_log(ctx, AV_LOG_ERROR, "Valid SOFA filename must be set.\n"); +return AVERROR(EINVAL); +} + /* load SOFA file, */ /* initialize file IDs to 0 before attempting to load SOFA files, * this assures that in case of error, only the memory of already ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/af_afftfilt: add option for 17 fft case
ffmpeg | branch: master | Paul B Mahol | Fri Mar 4 22:20:12 2016 +0100| [f81c81cc3abb807ae5a763ab701fe662dd9a5d81] | committer: Paul B Mahol avfilter/af_afftfilt: add option for 17 fft case Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f81c81cc3abb807ae5a763ab701fe662dd9a5d81 --- libavfilter/af_afftfilt.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/af_afftfilt.c b/libavfilter/af_afftfilt.c index b4c0937..3fc1a1b 100644 --- a/libavfilter/af_afftfilt.c +++ b/libavfilter/af_afftfilt.c @@ -74,6 +74,7 @@ static const AVOption afftfilt_options[] = { { "w16384", 0, 0, AV_OPT_TYPE_CONST, {.i64=14}, 0, 0, A, "fft" }, { "w32768", 0, 0, AV_OPT_TYPE_CONST, {.i64=15}, 0, 0, A, "fft" }, { "w65536", 0, 0, AV_OPT_TYPE_CONST, {.i64=16}, 0, 0, A, "fft" }, +{ "w131072",0, 0, AV_OPT_TYPE_CONST, {.i64=17}, 0, 0, A, "fft" }, { "win_func", "set window function", OFFSET(win_func), AV_OPT_TYPE_INT, {.i64 = WFUNC_HANNING}, 0, NB_WFUNC-1, A, "win_func" }, { "rect", "Rectangular", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_RECT}, 0, 0, A, "win_func" }, { "bartlett", "Bartlett", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BARTLETT}, 0, 0, A, "win_func" }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] configure: NVENC API version 6 is now required
ffmpeg | branch: master | Timo Rothenpieler | Fri Mar 4 17:19:45 2016 +0100| [95a5fd4581c686ea6a7c8eb9188d902bce35d4f9] | committer: Timo Rothenpieler configure: NVENC API version 6 is now required > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95a5fd4581c686ea6a7c8eb9188d902bce35d4f9 --- configure |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 81769ee..9b56a4d 100755 --- a/configure +++ b/configure @@ -5681,8 +5681,8 @@ enabled mmal && enabled netcdf&& require_pkg_config netcdf netcdf.h nc_inq_libvers enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; } && - { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 5" || - die "ERROR: NVENC API version 4 or older is not supported"; } && + { check_cpp_condition nvEncodeAPI.h "NVENCAPI_MAJOR_VERSION >= 6" || + die "ERROR: NVENC API version 5 or older is not supported"; } && { [ $target_os != cygwin ] || die "ERROR: NVENC is not supported on Cygwin currently."; } enabled openal&& { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_histogram: explicitly set 10bit output formats
ffmpeg | branch: master | Paul B Mahol | Fri Mar 4 22:58:45 2016 +0100| [ac15d7a666333060c3d0871e82a61e815b69390e] | committer: Paul B Mahol avfilter/vf_histogram: explicitly set 10bit output formats Signed-off-by: Paul B Mahol > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ac15d7a666333060c3d0871e82a61e815b69390e --- libavfilter/vf_histogram.c |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index 3a4725b..971d9b2 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -148,8 +148,10 @@ static int query_formats(AVFilterContext *ctx) out_pix_fmts = levels_out_yuv8_pix_fmts; else if (bits == 9) out_pix_fmts = levels_out_yuv9_pix_fmts; -else // if (bits == 10) +else if (bits == 10) out_pix_fmts = levels_out_yuv10_pix_fmts; +else +return AVERROR(EAGAIN); if ((ret = ff_formats_ref(ff_make_format_list(out_pix_fmts), &ctx->outputs[0]->in_formats)) < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/dump.c: Print mastering display metadata
ffmpeg | branch: master | Neil Birkbeck | Mon Feb 29 17:20:17 2016 -0800| [3c658e2655179fa2738a7806a342f89a17bd9230] | committer: Michael Niedermayer lavf/dump.c: Print mastering display metadata Signed-off-by: Neil Birkbeck Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3c658e2655179fa2738a7806a342f89a17bd9230 --- libavformat/dump.c | 21 + 1 file changed, 21 insertions(+) diff --git a/libavformat/dump.c b/libavformat/dump.c index 56c285d..9e7c12b 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -26,6 +26,7 @@ #include "libavutil/display.h" #include "libavutil/intreadwrite.h" #include "libavutil/log.h" +#include "libavutil/mastering_display_metadata.h" #include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/avstring.h" @@ -352,6 +353,23 @@ static void dump_cpb(void *ctx, AVPacketSideData *sd) cpb->vbv_delay); } +static void dump_mastering_display_metadata(void *ctx, AVPacketSideData* sd) { +AVMasteringDisplayMetadata* metadata = (AVMasteringDisplayMetadata*)sd->data; +av_log(ctx, AV_LOG_INFO, "Mastering Display Metadata, " + "has_primaries:%d has_luminance:%d " + "r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f) " + "min_luminance=%f, max_luminance=%f\n", + metadata->has_primaries, metadata->has_luminance, + av_q2d(metadata->display_primaries[0][0]), + av_q2d(metadata->display_primaries[0][1]), + av_q2d(metadata->display_primaries[1][0]), + av_q2d(metadata->display_primaries[1][1]), + av_q2d(metadata->display_primaries[2][0]), + av_q2d(metadata->display_primaries[2][1]), + av_q2d(metadata->white_point[0]), av_q2d(metadata->white_point[1]), + av_q2d(metadata->min_luminance), av_q2d(metadata->max_luminance)); +} + static void dump_sidedata(void *ctx, AVStream *st, const char *indent) { int i; @@ -400,6 +418,9 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent) av_log(ctx, AV_LOG_INFO, "cpb: "); dump_cpb(ctx, &sd); break; +case AV_PKT_DATA_MASTERING_DISPLAY_METADATA: +dump_mastering_display_metadata(ctx, &sd); +break; default: av_log(ctx, AV_LOG_WARNING, "unknown side data type %d (%d bytes)", sd.type, sd.size); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] lavf/matroskadec: Add early support for some of the new colour elements.
ffmpeg | branch: master | Neil Birkbeck | Mon Feb 29 16:41:04 2016 -0800| [bbda13a7713b8ae8c725c5bb774ac45d614b34eb] | committer: Michael Niedermayer lavf/matroskadec: Add early support for some of the new colour elements. Adding early support for a subset of the proposed colour elements according to the latest version of spec: https://mailarchive.ietf.org/arch/search/?email_list=cellar&gbt=1&index=hIKLhMdgTMTEwUTeA4ct38h0tmE I've left out elements for pix_fmt related things as there still seems to be some discussion around these, and the max_cll/max_fall are currently not propagated as there is not yet side data for them. The new elements are exposed under strict experimental mode. Signed-off-by: Neil Birkbeck Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbda13a7713b8ae8c725c5bb774ac45d614b34eb --- libavformat/matroska.h| 28 ++ libavformat/matroskadec.c | 134 + 2 files changed, 162 insertions(+) diff --git a/libavformat/matroska.h b/libavformat/matroska.h index a654e0c..e97fe6b 100644 --- a/libavformat/matroska.h +++ b/libavformat/matroska.h @@ -123,6 +123,34 @@ #define MATROSKA_ID_VIDEOALPHAMODE 0x53C0 #define MATROSKA_ID_VIDEOASPECTRATIO 0x54B3 #define MATROSKA_ID_VIDEOCOLORSPACE 0x2EB524 +#define MATROSKA_ID_VIDEOCOLOR 0x55B0 + +#define MATROSKA_ID_VIDEOCOLORMATRIXCOEFF 0x55B1 +#define MATROSKA_ID_VIDEOCOLORBITSPERCHANNEL 0x55B2 +#define MATROSKA_ID_VIDEOCOLORCHROMASUBHORZ 0x55B3 +#define MATROSKA_ID_VIDEOCOLORCHROMASUBVERT 0x55B4 +#define MATROSKA_ID_VIDEOCOLORCBSUBHORZ 0x55B5 +#define MATROSKA_ID_VIDEOCOLORCBSUBVERT 0x55B6 +#define MATROSKA_ID_VIDEOCOLORCHROMASITINGHORZ 0x55B7 +#define MATROSKA_ID_VIDEOCOLORCHROMASITINGVERT 0x55B8 +#define MATROSKA_ID_VIDEOCOLORRANGE 0x55B9 +#define MATROSKA_ID_VIDEOCOLORTRANSFERCHARACTERISTICS 0x55BA + +#define MATROSKA_ID_VIDEOCOLORPRIMARIES 0x55BB +#define MATROSKA_ID_VIDEOCOLORMAXCLL 0x55BC +#define MATROSKA_ID_VIDEOCOLORMAXFALL 0x55BD + +#define MATROSKA_ID_VIDEOCOLORMASTERINGMETA 0x55D0 +#define MATROSKA_ID_VIDEOCOLOR_RX 0x55D1 +#define MATROSKA_ID_VIDEOCOLOR_RY 0x55D2 +#define MATROSKA_ID_VIDEOCOLOR_GX 0x55D3 +#define MATROSKA_ID_VIDEOCOLOR_GY 0x55D4 +#define MATROSKA_ID_VIDEOCOLOR_BX 0x55D5 +#define MATROSKA_ID_VIDEOCOLOR_BY 0x55D6 +#define MATROSKA_ID_VIDEOCOLOR_WHITEX 0x55D7 +#define MATROSKA_ID_VIDEOCOLOR_WHITEY 0x55D8 +#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX 0x55D9 +#define MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN 0x55DA /* IDs in the trackaudio master */ #define MATROSKA_ID_AUDIOSAMPLINGFREQ 0xB5 diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index d20568c..28bb77b 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -39,6 +39,7 @@ #include "libavutil/intfloat.h" #include "libavutil/intreadwrite.h" #include "libavutil/lzo.h" +#include "libavutil/mastering_display_metadata.h" #include "libavutil/mathematics.h" #include "libavutil/opt.h" #include "libavutil/time_internal.h" @@ -130,6 +131,36 @@ typedef struct MatroskaTrackEncoding { MatroskaTrackEncryption encryption; } MatroskaTrackEncoding; +typedef struct MatroskaMasteringMeta { +double r_x; +double r_y; +double g_x; +double g_y; +double b_x; +double b_y; +double white_x; +double white_y; +double max_luminance; +double min_luminance; +} MatroskaMasteringMeta; + +typedef struct MatroskaTrackVideoColor { +uint64_t matrix_coefficients; +uint64_t bits_per_channel; +uint64_t chroma_sub_horz; +uint64_t chroma_sub_vert; +uint64_t cb_sub_horz; +uint64_t cb_sub_vert; +uint64_t chroma_siting_horz; +uint64_t chroma_siting_vert; +uint64_t range; +uint64_t transfer_characteristics; +uint64_t primaries; +uint64_t max_cll; +uint64_t max_fall; +MatroskaMasteringMeta mastering_meta; +} MatroskaTrackVideoColor; + typedef struct MatroskaTrackVideo { double frame_rate; uint64_t display_width; @@ -139,6 +170,7 @@ typedef struct MatroskaTrackVideo { EbmlBin color_space; uint64_t stereo_mode; uint64_t alpha_mode; +MatroskaTrackVideoColor color; } MatroskaTrackVideo; typedef struct MatroskaTrackAudio { @@ -356,6 +388,38 @@ static const EbmlSyntax matroska_info[] = { { 0 } }; +static const EbmlSyntax matroska_mastering_meta[] = { +{ MATROSKA_ID_VIDEOCOLOR_RX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, r_x), { .f=-1 } }, +{ MATROSKA_ID_VIDEOCOLOR_RY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, r_y), { .f=-1 } }, +{ MATROSKA_ID_VIDEOCOLOR_GX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, g_x), { .f=-1 } }, +{ MATROSKA_ID_VIDEOCOLOR_GY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, g_y), { .f=-1 } }, +{ MATROSKA_ID_VIDEOCOLOR_BX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, b_x), { .f=-1 } }, +{ MATROSKA_ID_VIDEOCOLOR_BY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, b_
[FFmpeg-cvslog] vc2enc: remove useless alignment on slice encoding
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Mar 2 12:50:54 2016 +| [f21cf2b38365caaa8a130a32521c2648600c3f50] | committer: Rostislav Pehlivanov vc2enc: remove useless alignment on slice encoding This was a leftover from before the slices were encoded in parallel. Since the put_bits context is initialized per slice aligning it aferwards is pointless. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f21cf2b38365caaa8a130a32521c2648600c3f50 --- libavcodec/vc2enc.c |1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 3311d97..34a4f95 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -749,7 +749,6 @@ static int encode_hq_slice(AVCodecContext *avctx, void *arg) uint8_t quants[MAX_DWT_LEVELS][4]; int p, level, orientation; -avpriv_align_put_bits(pb); skip_put_bytes(pb, s->prefix_bytes); put_bits(pb, 8, quant_idx); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vc2enc: minor cosmetic changes
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Mar 2 12:52:15 2016 +| [c45b1aa8241adb576d44ac79a3058cf87aeaa631] | committer: Rostislav Pehlivanov vc2enc: minor cosmetic changes Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c45b1aa8241adb576d44ac79a3058cf87aeaa631 --- libavcodec/vc2enc.c |9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 34a4f95..3bc60a3 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -506,7 +506,6 @@ static void encode_wavelet_transform(VC2EncContext *s) { encode_transform_params(s); avpriv_align_put_bits(&s->pb); -/* Continued after DWT in encode_transform_data() */ } /* VC-2 12 - picture_parse() */ @@ -542,7 +541,7 @@ static void encode_subband(VC2EncContext *s, PutBitContext *pb, int sx, int sy, const int neg = coeff[x] < 0; uint32_t c_abs = FFABS(coeff[x]); if (c_abs < COEF_LUT_TAB) { -const uint8_t len = len_lut[c_abs]; +const uint8_t len = len_lut[c_abs]; if (len == 1) put_bits(pb, 1, 1); else @@ -961,7 +960,7 @@ static int encode_frame(VC2EncContext *s, AVPacket *avpkt, const AVFrame *frame, } static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, - const AVFrame *frame, int *got_packet_ptr) + const AVFrame *frame, int *got_packet) { int ret = 0; int sig_size = 256; @@ -984,7 +983,7 @@ static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, /* Find an appropriate size scaler */ while (sig_size > 255) { s->slice_max_bytes = FFALIGN(av_rescale(max_frame_bytes, 1, - s->num_x*s->num_y), s->size_scaler); +s->num_x*s->num_y), s->size_scaler); s->slice_max_bytes += 4 + s->prefix_bytes; sig_size = s->slice_max_bytes/s->size_scaler; /* Signalled slize size */ s->size_scaler <<= 1; @@ -1004,7 +1003,7 @@ static av_cold int vc2_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, flush_put_bits(&s->pb); avpkt->size = put_bits_count(&s->pb) >> 3; -*got_packet_ptr = 1; +*got_packet = 1; return 0; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] vc2enc: do not allocate packet until exact frame size is known
ffmpeg | branch: master | Rostislav Pehlivanov | Wed Mar 2 12:37:09 2016 +| [b88be742fac7a77a8095e8155ba8790db4b77568] | committer: Rostislav Pehlivanov vc2enc: do not allocate packet until exact frame size is known This commit solves most of the crashes and issues with the encoder and the bitrate setting. Now the encoder will always allocate the absolute lowest amount of memory regardless of what the bitrate has been set to. Therefore if a user inputs a very low bitrate the encoder will use the maximum possible quantization (basically zero out all coefficients), allocate a packet and encode it. There is no coupling between the bitrate and the allocation size and so no crashes because the buffer isn't large enough. The maximum quantizer was raised to the size of the table now to both keep the overshoot at ridiculous bitrates low and to improve quality with higher bit depths (since the coefficients grow larger per transform quantizing them to the same relative level requires larger quantization indices). Since the quantization index start follows the previous quantization index for that slice, the quantization step was reduced to a static 1 to improve performance. Previously with quant/5 the step was usually set to 0 upon start (and was later clipped to 1), that isn't a big change. As the step size increases so does the amount of bits leftover and so the redistribution algorithm has to iterate more and thus waste more time. Signed-off-by: Rostislav Pehlivanov > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b88be742fac7a77a8095e8155ba8790db4b77568 --- libavcodec/vc2enc.c | 332 +-- 1 file changed, 166 insertions(+), 166 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 8688754..3311d97 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -30,7 +30,7 @@ #include "diractab.h" /* Quantizations above this usually zero coefficients and lower the quality */ -#define MAX_QUANT_INDEX 50 +#define MAX_QUANT_INDEX FF_ARRAY_ELEMS(ff_dirac_qscale_tab) /* Total range is -COEF_LUT_TAB to +COEFF_LUT_TAB, but total tab size is half * (COEF_LUT_TAB*MAX_QUANT_INDEX) since the sign is appended during encoding */ @@ -99,6 +99,7 @@ typedef struct VC2EncContext { /* For conversion from unsigned pixel values to signed */ int diff_offset; int bpp; +int bpp_idx; /* Picture number */ uint32_t picture_number; @@ -110,6 +111,7 @@ typedef struct VC2EncContext { /* Quantization matrix */ uint8_t quant[MAX_DWT_LEVELS][4]; +int custom_quant_matrix; /* Coefficient LUT */ uint32_t *coef_lut_val; @@ -327,31 +329,9 @@ static void encode_clean_area(VC2EncContext *s) /* VC-2 11.3.8 - signal_range() */ static void encode_signal_range(VC2EncContext *s) { -int idx; -AVCodecContext *avctx = s->avctx; -const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt); -const int depth = fmt->comp[0].depth; -if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) { -idx = 1; -s->bpp = 1; -s->diff_offset = 128; -} else if (depth == 8 && (avctx->color_range == AVCOL_RANGE_MPEG || - avctx->color_range == AVCOL_RANGE_UNSPECIFIED)) { -idx = 2; -s->bpp = 1; -s->diff_offset = 128; -} else if (depth == 10) { -idx = 3; -s->bpp = 2; -s->diff_offset = 512; -} else { -idx = 4; -s->bpp = 2; -s->diff_offset = 2048; -} put_bits(&s->pb, 1, !s->strict_compliance); if (!s->strict_compliance) -put_vc2_ue_uint(&s->pb, idx); +put_vc2_ue_uint(&s->pb, s->bpp_idx); } /* VC-2 11.3.9 - color_spec() */ @@ -455,10 +435,23 @@ const uint8_t vc2_qm_flat_tab[][4] = { { 0, 0, 0, 0} }; -static void init_custom_qm(VC2EncContext *s) +static void init_quant_matrix(VC2EncContext *s) { int level, orientation; +if (s->wavelet_depth <= 4 && s->quant_matrix == VC2_QM_DEF) { +s->custom_quant_matrix = 0; +for (level = 0; level < s->wavelet_depth; level++) { +s->quant[level][0] = ff_dirac_default_qmat[s->wavelet_idx][level][0]; +s->quant[level][1] = ff_dirac_default_qmat[s->wavelet_idx][level][1]; +s->quant[level][2] = ff_dirac_default_qmat[s->wavelet_idx][level][2]; +s->quant[level][3] = ff_dirac_default_qmat[s->wavelet_idx][level][3]; +} +return; +} + +s->custom_quant_matrix = 1; + if (s->quant_matrix == VC2_QM_DEF) { for (level = 0; level < s->wavelet_depth; level++) { for (orientation = 0; orientation < 4; orientation++) { @@ -486,25 +479,15 @@ static void init_custom_qm(VC2EncContext *s) /* VC-2 12.3.4.2 - quant_matrix() */ static void encode_quant_matrix(VC2EncContext *s) { -int level, custom_quant_matrix = 0; -if (s->wavelet_depth > 4 || s->quant_matrix != VC2_QM_DEF) -custom
[FFmpeg-cvslog] avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form()
ffmpeg | branch: master | Michael Niedermayer | Sat Mar 5 01:38:58 2016 +0100| [dec816f92c7cf0bbb0f30c095db05145687c6100] | committer: Michael Niedermayer avcodec/utils: Fix memleak on error in convert_sub_to_old_ass_form() Fixes CID1355116 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dec816f92c7cf0bbb0f30c095db05145687c6100 --- libavcodec/utils.c |1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index b993899..bbb9804 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -2517,6 +2517,7 @@ static int convert_sub_to_old_ass_form(AVSubtitle *sub, const AVPacket *pkt, AVR final_dialog = av_strdup(buf.str); if (!av_bprint_is_complete(&buf) || !final_dialog) { +av_freep(&final_dialog); av_bprint_finalize(&buf, NULL); return AVERROR(ENOMEM); } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_bench: Fix comparission condition
ffmpeg | branch: master | Michael Niedermayer | Sat Mar 5 01:55:44 2016 +0100| [b3dc51dd571f0852d47e67c4c02fc7eb73720059] | committer: Michael Niedermayer avfilter/f_bench: Fix comparission condition Fixes: CID1355115 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3dc51dd571f0852d47e67c4c02fc7eb73720059 --- libavfilter/f_bench.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/f_bench.c b/libavfilter/f_bench.c index b2eff2c..b7b1792 100644 --- a/libavfilter/f_bench.c +++ b/libavfilter/f_bench.c @@ -68,7 +68,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) if (s->action == ACTION_START) { av_dict_set_int(&in->metadata, START_TIME_KEY, t, 0); -} else if (s->action = ACTION_STOP) { +} else if (s->action == ACTION_STOP) { AVDictionaryEntry *e = av_dict_get(in->metadata, START_TIME_KEY, NULL, 0); if (e) { const int64_t start = strtoll(e->value, NULL, 0); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/cos_tablegen: extend table generation to 17bits
ffmpeg | branch: master | James Almer | Fri Mar 4 23:35:54 2016 -0300| [a3659ca0148a82d9e92805e17fa7a7880c6f5e5b] | committer: James Almer avcodec/cos_tablegen: extend table generation to 17bits Fixes compilation of fft with hardcoded tables Reviewed-by: Michael Niedermayer Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3659ca0148a82d9e92805e17fa7a7880c6f5e5b --- libavcodec/cos_tablegen.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/cos_tablegen.c b/libavcodec/cos_tablegen.c index dbd0cc0..7206aad 100644 --- a/libavcodec/cos_tablegen.c +++ b/libavcodec/cos_tablegen.c @@ -26,7 +26,7 @@ #include "libavutil/mathematics.h" -#define BITS 16 +#define BITS 17 #define FLOATFMT "%.18e" #define FIXEDFMT "%6d" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog