[FFmpeg-cvslog] lavu/avstring: deprecate av_d2str().
ffmpeg | branch: master | Nicolas George | Thu Dec 26 19:32:23 2019 +0100| [06f26512046de1a84e045d219e7fa211c37ad0e4] | committer: Nicolas George lavu/avstring: deprecate av_d2str(). It is no longer used in our code base and does not seem to be used much in other projects. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=06f26512046de1a84e045d219e7fa211c37ad0e4 --- doc/APIchanges | 4 libavutil/avstring.c | 2 ++ libavutil/avstring.h | 5 + libavutil/tests/avstring.c | 4 libavutil/version.h| 3 +++ 5 files changed, 18 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index a9bf1afd4c..c4a4471ecc 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,10 @@ libavutil: 2017-10-21 API changes, most recent first: +=== +2020-08-21 - xx - lavu 56.58.100 - avstring.h + Deprecate av_d2str(). Use av_asprintf() instead. + 2020-08-04 - xx - lavu 56.58.100 - channel_layout.h Add AV_CH_LAYOUT_22POINT2 together with its newly required pieces: AV_CH_TOP_SIDE_LEFT, AV_CH_TOP_SIDE_RIGHT, AV_CH_BOTTOM_FRONT_CENTER, diff --git a/libavutil/avstring.c b/libavutil/avstring.c index f4b8ed2b45..e33d4aac51 100644 --- a/libavutil/avstring.c +++ b/libavutil/avstring.c @@ -136,6 +136,7 @@ end: return p; } +#if FF_API_D2STR char *av_d2str(double d) { char *str = av_malloc(16); @@ -143,6 +144,7 @@ char *av_d2str(double d) snprintf(str, 16, "%f", d); return str; } +#endif #define WHITESPACES " \n\t\r" diff --git a/libavutil/avstring.h b/libavutil/avstring.h index 274335cfb9..ee225585b3 100644 --- a/libavutil/avstring.h +++ b/libavutil/avstring.h @@ -24,6 +24,7 @@ #include #include #include "attributes.h" +#include "version.h" /** * @addtogroup lavu_string @@ -155,10 +156,14 @@ static inline size_t av_strnlen(const char *s, size_t len) */ char *av_asprintf(const char *fmt, ...) av_printf_format(1, 2); +#if FF_API_D2STR /** * Convert a number to an av_malloced string. + * @deprecated use av_asprintf() with "%f" or a more specific format */ +attribute_deprecated char *av_d2str(double d); +#endif /** * Unescape the given string until a non escaped terminating char, diff --git a/libavutil/tests/avstring.c b/libavutil/tests/avstring.c index 887bd25a12..37a2cf1833 100644 --- a/libavutil/tests/avstring.c +++ b/libavutil/tests/avstring.c @@ -109,6 +109,8 @@ int main(void) TEST_STRIREPLACE(haystack, needle [2], "Education consists mainly in what we have instead."); TEST_STRIREPLACE(haystack, needle [1], "Education consists mainly in what we have instead"); +#if FF_API_D2STR +FF_DISABLE_DEPRECATION_WARNINGS /*Testing av_d2str()*/ #define TEST_D2STR(value, expected) \ if((ptr = av_d2str(value)) == NULL){ \ @@ -121,5 +123,7 @@ int main(void) TEST_D2STR(0 , "0.00"); TEST_D2STR(-1.2333234, "-1.233323"); TEST_D2STR(-1.2333237, "-1.233324"); +FF_ENABLE_DEPRECATION_WARNINGS +#endif return 0; } diff --git a/libavutil/version.h b/libavutil/version.h index 3e7e1f410b..3f0a4a8402 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -132,6 +132,9 @@ #ifndef FF_API_CHILD_CLASS_NEXT #define FF_API_CHILD_CLASS_NEXT (LIBAVUTIL_VERSION_MAJOR < 57) #endif +#ifndef FF_API_D2STR +#define FF_API_D2STR(LIBAVUTIL_VERSION_MAJOR < 58) +#endif /** * @} ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] lavu/buffer: forward av_buffer_realloc() error code.
ffmpeg | branch: master | Nicolas George | Sat Jan 4 19:52:08 2020 +0100| [2b71cd3e0b1a545df670f0d057655e0b59b98f5f] | committer: Nicolas George lavu/buffer: forward av_buffer_realloc() error code. Fix CID 1457235. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b71cd3e0b1a545df670f0d057655e0b59b98f5f --- libavutil/buffer.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index 38a554208a..08e6079139 100644 --- a/libavutil/buffer.c +++ b/libavutil/buffer.c @@ -170,6 +170,7 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) { AVBufferRef *buf = *pbuf; uint8_t *tmp; +int ret; if (!buf) { /* allocate a new buffer with av_realloc(), so it will be reallocatable @@ -196,9 +197,9 @@ int av_buffer_realloc(AVBufferRef **pbuf, int size) /* cannot realloc, allocate a new reallocable buffer and copy data */ AVBufferRef *new = NULL; -av_buffer_realloc(&new, size); -if (!new) -return AVERROR(ENOMEM); +ret = av_buffer_realloc(&new, size); +if (ret < 0) +return ret; memcpy(new->data, buf->data, FFMIN(size, buf->size)); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/fifo: Remove unused functions and headers
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 11:15:21 2020 +0200| [d4e29d9c5e19804b35f431329bd670c259b3fa35] | committer: Andreas Rheinhardt avfilter/fifo: Remove unused functions and headers The functions were forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2; removing them also means that the avassert.h and samplefmt.h headers are no longer used any more, so they have been removed, too. Moreover, video.h is unused since b077d8d9082d057d4c7abd9e0b1a98f9651cfaa8 and channel_layout.h is since fdd9663781e3ebc8ebed0704607abd174095a905. Both headers have therefore been removed, too. Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4e29d9c5e19804b35f431329bd670c259b3fa35 --- libavfilter/fifo.c | 49 - 1 file changed, 49 deletions(-) diff --git a/libavfilter/fifo.c b/libavfilter/fifo.c index 70f4876a50..5b39e1afe7 100644 --- a/libavfilter/fifo.c +++ b/libavfilter/fifo.c @@ -23,16 +23,12 @@ * FIFO buffering filter */ -#include "libavutil/avassert.h" -#include "libavutil/channel_layout.h" #include "libavutil/common.h" #include "libavutil/mathematics.h" -#include "libavutil/samplefmt.h" #include "audio.h" #include "avfilter.h" #include "internal.h" -#include "video.h" typedef struct Buf { AVFrame *frame; @@ -98,51 +94,6 @@ static void queue_pop(FifoContext *s) s->root.next = tmp; } -/** - * Move data pointers and pts offset samples forward. - */ -static void buffer_offset(AVFilterLink *link, AVFrame *frame, - int offset) -{ -int nb_channels = link->channels; -int planar = av_sample_fmt_is_planar(link->format); -int planes = planar ? nb_channels : 1; -int block_align = av_get_bytes_per_sample(link->format) * (planar ? 1 : nb_channels); -int i; - -av_assert0(frame->nb_samples > offset); - -for (i = 0; i < planes; i++) -frame->extended_data[i] += block_align * offset; -if (frame->data != frame->extended_data) -memcpy(frame->data, frame->extended_data, - FFMIN(planes, FF_ARRAY_ELEMS(frame->data)) * sizeof(*frame->data)); -frame->linesize[0] -= block_align*offset; -frame->nb_samples -= offset; - -if (frame->pts != AV_NOPTS_VALUE) { -frame->pts += av_rescale_q(offset, (AVRational){1, link->sample_rate}, - link->time_base); -} -} - -static int calc_ptr_alignment(AVFrame *frame) -{ -int planes = av_sample_fmt_is_planar(frame->format) ? - frame->channels : 1; -int min_align = 128; -int p; - -for (p = 0; p < planes; p++) { -int cur_align = 128; -while ((intptr_t)frame->extended_data[p] % cur_align) -cur_align >>= 1; -if (cur_align < min_align) -min_align = cur_align; -} -return min_align; -} - static int request_frame(AVFilterLink *outlink) { FifoContext *s = outlink->src->priv; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] doc/APIchanges: Remove version conflict separator
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 12:38:30 2020 +0200| [bbe92ed9b1122437dfa3120338b36816523cc491] | committer: Andreas Rheinhardt doc/APIchanges: Remove version conflict separator Added in 06f26512046de1a84e045d219e7fa211c37ad0e4. Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bbe92ed9b1122437dfa3120338b36816523cc491 --- doc/APIchanges | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index c4a4471ecc..0054908e1e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,7 +15,6 @@ libavutil: 2017-10-21 API changes, most recent first: -=== 2020-08-21 - xx - lavu 56.58.100 - avstring.h Deprecate av_d2str(). Use av_asprintf() instead. ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_overlay: Remove superfluous ;
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 11:46:49 2020 +0200| [c5e204c84f98cba85f0bc22bf1719adff8619533] | committer: Andreas Rheinhardt avfilter/vf_overlay: Remove superfluous ; In a function body, a redundant ; is just a null statement that does nothing. Yet outside a function body, a superfluous ';' like one that exists if one adds a ';' immediately after a function body's closing brace is actually invalid C that compilers happen to accept. Yet when compiled in -pedantic mode, both GCC as well as Clang emit warnings for this like "ISO C does not allow extra ‘;’ outside of a function [-Wpedantic]". The scenario described above existed in vf_overlay.c as a result of macro expansion. This commit fixes it. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5e204c84f98cba85f0bc22bf1719adff8619533 --- libavfilter/vf_overlay.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index b3a1ac1a09..79c654bb2d 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -595,8 +595,8 @@ static av_always_inline void blend_plane_##depth##_##nbits##bits(AVFilterContext dap += (1 << vsub) * dst->linesize[3] / bytes; \ } \ } -DEFINE_BLEND_PLANE(8, 8); -DEFINE_BLEND_PLANE(16, 10); +DEFINE_BLEND_PLANE(8, 8) +DEFINE_BLEND_PLANE(16, 10) #define DEFINE_ALPHA_COMPOSITE(depth, nbits) \ static inline void alpha_composite_##depth##_##nbits##bits(const AVFrame *src, const AVFrame *dst, \ @@ -647,8 +647,8 @@ static inline void alpha_composite_##depth##_##nbits##bits(const AVFrame *src, c sa += src->linesize[3] / bytes; \ } \ } -DEFINE_ALPHA_COMPOSITE(8, 8); -DEFINE_ALPHA_COMPOSITE(16, 10); +DEFINE_ALPHA_COMPOSITE(8, 8) +DEFINE_ALPHA_COMPOSITE(16, 10) #define DEFINE_BLEND_SLICE_YUV(depth, nbits) \ static av_always_inline void blend_slice_yuv_##depth##_##nbits##bits(AVFilterContext *ctx, \ @@ -679,8 +679,8 @@ static av_always_inline void blend_slice_yuv_##depth##_##nbits##bits(AVFilterCon alpha_composite_##depth##_##nbits##bits(src, dst, src_w, src_h, dst_w, dst_h, x, y,\ jobnr, nb_jobs); \ } -DEFINE_BLEND_SLICE_YUV(8, 8); -DEFINE_BLEND_SLICE_YUV(16, 10); +DEFINE_BLEND_SLICE_YUV(8, 8) +DEFINE_BLEND_SLICE_YUV(16, 10) static av_always_inline void blend_slice_planar_rgb(AVFilterContext *ctx, AVFrame *dst, const AVFrame *src, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/qdmc: reduce insanely huge tables
ffmpeg | branch: master | Paul B Mahol | Fri Aug 21 13:53:23 2020 +0200| [d2206f0c5b77306ac6f6310fd0f02a412a6ebfe9] | committer: Paul B Mahol avcodec/qdmc: reduce insanely huge tables > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2206f0c5b77306ac6f6310fd0f02a412a6ebfe9 --- libavcodec/qdmc.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/qdmc.c b/libavcodec/qdmc.c index 10ceb7aa55..ff1cc86c6b 100644 --- a/libavcodec/qdmc.c +++ b/libavcodec/qdmc.c @@ -214,10 +214,10 @@ static av_cold void qdmc_init_static_data(void) INIT_VLC_STATIC_LE(&vtable[1], 10, FF_ARRAY_ELEMS(noise_segment_length_bits), noise_segment_length_bits, 1, 1, noise_segment_length_codes, 2, 2, noise_segment_length_symbols, 1, 1, 1024); -INIT_VLC_STATIC_LE(&vtable[2], 13, FF_ARRAY_ELEMS(amplitude_bits), - amplitude_bits, 1, 1, amplitude_codes, 2, 2, NULL, 0, 0, 8192); -INIT_VLC_STATIC_LE(&vtable[3], 18, FF_ARRAY_ELEMS(freq_diff_bits), - freq_diff_bits, 1, 1, freq_diff_codes, 4, 4, NULL, 0, 0, 262144); +INIT_VLC_STATIC_LE(&vtable[2], 12, FF_ARRAY_ELEMS(amplitude_bits), + amplitude_bits, 1, 1, amplitude_codes, 2, 2, NULL, 0, 0, 4098); +INIT_VLC_STATIC_LE(&vtable[3], 12, FF_ARRAY_ELEMS(freq_diff_bits), + freq_diff_bits, 1, 1, freq_diff_codes, 4, 4, NULL, 0, 0, 4160); INIT_VLC_STATIC_LE(&vtable[4], 8, FF_ARRAY_ELEMS(amplitude_diff_bits), amplitude_diff_bits, 1, 1, amplitude_diff_codes, 1, 1, NULL, 0, 0, 256); INIT_VLC_STATIC_LE(&vtable[5], 6, FF_ARRAY_ELEMS(phase_diff_bits), @@ -369,7 +369,7 @@ static int qdmc_get_vlc(GetBitContext *gb, VLC *table, int flag) if (get_bits_left(gb) < 1) return AVERROR_INVALIDDATA; -v = get_vlc2(gb, table->table, table->bits, 1); +v = get_vlc2(gb, table->table, table->bits, 2); if (v < 0) return AVERROR_INVALIDDATA; if (v) ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] dnn_backend_native_layer_avgpool: Fix invalid assignment, use av_assert
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 13:47:27 2020 +0200| [128e6df1cd79076e3d5f51bbc88607b3d1c62689] | committer: Guo, Yejun dnn_backend_native_layer_avgpool: Fix invalid assignment, use av_assert dnn_execute_layer_avg_pool() contains the following line: assert(avgpool_params->padding_method = VALID); This statement contains an assignment where obviously a comparison was intended. Furthermore, *avgpool_params is const, so that the attempted assignment leads to a compilation failure if asserts are enabled (i.e. if DEBUG is defined which leads libavutil/internal.h to not define NDEBUG). Moreover, the enumeration constant VALID actually has the value 0, so that the assert would be triggered if a compiler compiles this with asserts enabled. Finally, the statement uses assert() directly instead of av_assert*(). All these errors have been fixed. Thanks to ubitux for providing a FATE-box [1] where DEBUG is defined. [1]: http://fate.ffmpeg.org/history.cgi?slot=x86_64-archlinux-gcc-ddebug Signed-off-by: Andreas Rheinhardt Reviewed-by: Guo, Yejun > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=128e6df1cd79076e3d5f51bbc88607b3d1c62689 --- libavfilter/dnn/dnn_backend_native_layer_avgpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_native_layer_avgpool.c b/libavfilter/dnn/dnn_backend_native_layer_avgpool.c index d745c35b4a..8d4d8db98c 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_avgpool.c +++ b/libavfilter/dnn/dnn_backend_native_layer_avgpool.c @@ -91,7 +91,7 @@ int dnn_execute_layer_avg_pool(DnnOperand *operands, const int32_t *input_operan output_height = ceil(height / (kernel_strides * 1.0)); output_width = ceil(width / (kernel_strides * 1.0)); } else { -assert(avgpool_params->padding_method = VALID); +av_assert0(avgpool_params->padding_method == VALID); height_end = height - avgpool_params->kernel_size + 1; width_end = width - avgpool_params->kernel_size + 1; height_radius = 0; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/formats: Remove unused functions
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 15:40:01 2020 +0200| [242ba4d74cc95aa78528e4496de7cc63816a877b] | committer: Andreas Rheinhardt avfilter/formats: Remove unused functions This commit removes ff_parse_sample_format(), ff_parse_time_base() and ff_query_formats_all_layouts() from libavfilter/formats.c. All of these functions were completely unused. ff_parse_time_base() has not been used at all since it had been added in 3448404a707b6e236a2ffa7b0453b3300de41b7b; the last caller of ff_parse_sample_format has been removed in commit d1c49bcae9b7fd41df5c6804ac7f6a5c271a7c2e. And the one and only caller of ff_query_formats_all_layouts() (the asyncts filter) has been removed in commit a8fe8d6b4a35c95aa94fccde5f001041278d197c. Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=242ba4d74cc95aa78528e4496de7cc63816a877b --- libavfilter/formats.c | 42 ++ libavfilter/formats.h | 8 libavfilter/internal.h | 22 -- 3 files changed, 2 insertions(+), 70 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 8918118b8e..d2edf832e9 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -24,7 +24,6 @@ #include "libavutil/common.h" #include "libavutil/eval.h" #include "libavutil/pixdesc.h" -#include "libavutil/parseutils.h" #include "avfilter.h" #include "internal.h" #include "formats.h" @@ -604,8 +603,7 @@ int ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) ff_formats_ref, ff_formats_unref, formats); } -static int default_query_formats_common(AVFilterContext *ctx, -AVFilterChannelLayouts *(layouts)(void)) +int ff_default_query_formats(AVFilterContext *ctx) { int ret; enum AVMediaType type = ctx->inputs && ctx->inputs [0] ? ctx->inputs [0]->type : @@ -616,7 +614,7 @@ static int default_query_formats_common(AVFilterContext *ctx, if (ret < 0) return ret; if (type == AVMEDIA_TYPE_AUDIO) { -ret = ff_set_common_channel_layouts(ctx, layouts()); +ret = ff_set_common_channel_layouts(ctx, ff_all_channel_counts()); if (ret < 0) return ret; ret = ff_set_common_samplerates(ctx, ff_all_samplerates()); @@ -627,16 +625,6 @@ static int default_query_formats_common(AVFilterContext *ctx, return 0; } -int ff_default_query_formats(AVFilterContext *ctx) -{ -return default_query_formats_common(ctx, ff_all_channel_counts); -} - -int ff_query_formats_all_layouts(AVFilterContext *ctx) -{ -return default_query_formats_common(ctx, ff_all_channel_layouts); -} - /* internal functions for parsing audio format arguments */ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx) @@ -654,32 +642,6 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct return 0; } -int ff_parse_sample_format(int *ret, const char *arg, void *log_ctx) -{ -char *tail; -int sfmt = av_get_sample_fmt(arg); -if (sfmt == AV_SAMPLE_FMT_NONE) { -sfmt = strtol(arg, &tail, 0); -if (*tail || av_get_bytes_per_sample(sfmt)<=0) { -av_log(log_ctx, AV_LOG_ERROR, "Invalid sample format '%s'\n", arg); -return AVERROR(EINVAL); -} -} -*ret = sfmt; -return 0; -} - -int ff_parse_time_base(AVRational *ret, const char *arg, void *log_ctx) -{ -AVRational r; -if(av_parse_ratio(&r, arg, INT_MAX, 0, log_ctx) < 0 ||r.num<=0 ||r.den<=0) { -av_log(log_ctx, AV_LOG_ERROR, "Invalid time base '%s'\n", arg); -return AVERROR(EINVAL); -} -*ret = r; -return 0; -} - int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx) { char *tail; diff --git a/libavfilter/formats.h b/libavfilter/formats.h index dd0cbca6d5..a06e88722e 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -202,14 +202,6 @@ void ff_channel_layouts_changeref(AVFilterChannelLayouts **oldref, av_warn_unused_result int ff_default_query_formats(AVFilterContext *ctx); - /** - * Set the formats list to all known channel layouts. This function behaves - * like ff_default_query_formats(), except it only accepts known channel - * layouts. It should only be used with audio filters. - */ -av_warn_unused_result -int ff_query_formats_all_layouts(AVFilterContext *ctx); - /** * Create a list of supported formats. This is intended for use in * AVFilter->query_formats(). diff --git a/libavfilter/internal.h b/libavfilter/internal.h index cc208f8e3a..183215d152 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -171,28 +171,6 @@ int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ct av_warn_unused_result int ff_parse_sample_rate(int *ret, const char *arg, void *log_ctx); -/** - * Parse a time base. - * - * @p
[FFmpeg-cvslog] avfilter/audio: Remove unused array, move used-only-once array
ffmpeg | branch: master | Andreas Rheinhardt | Fri Aug 21 15:13:02 2020 +0200| [2e0fd50319583afaa546a20222b885b304912f98] | committer: Andreas Rheinhardt avfilter/audio: Remove unused array, move used-only-once array ff_planar_sample_fmts_array is unused (and was unused since it was added in 4d4098da009c8340997b8d1abedbf2062e4aa991) and therefore this commit removes it; ff_packed_sample_fmts_array meanwhile is used only once (in the amerge filter) and therefore it has been moved to this place. Reviewed-by: Paul B Mahol Reviewed-by: Nicolas George Signed-off-by: Andreas Rheinhardt > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2e0fd50319583afaa546a20222b885b304912f98 --- libavfilter/af_amerge.c | 10 +- libavfilter/audio.h | 18 -- 2 files changed, 9 insertions(+), 19 deletions(-) diff --git a/libavfilter/af_amerge.c b/libavfilter/af_amerge.c index 567f25982d..ca94a224af 100644 --- a/libavfilter/af_amerge.c +++ b/libavfilter/af_amerge.c @@ -69,6 +69,14 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { +static const enum AVSampleFormat packed_sample_fmts[] = { +AV_SAMPLE_FMT_U8, +AV_SAMPLE_FMT_S16, +AV_SAMPLE_FMT_S32, +AV_SAMPLE_FMT_FLT, +AV_SAMPLE_FMT_DBL, +AV_SAMPLE_FMT_NONE +}; AMergeContext *s = ctx->priv; int64_t inlayout[SWR_CH_MAX], outlayout = 0; AVFilterFormats *formats; @@ -124,7 +132,7 @@ static int query_formats(AVFilterContext *ctx) if ((inlayout[i] >> c) & 1) *(route[i]++) = out_ch_number++; } -formats = ff_make_format_list(ff_packed_sample_fmts_array); +formats = ff_make_format_list(packed_sample_fmts); if ((ret = ff_set_common_formats(ctx, formats)) < 0) return ret; for (i = 0; i < s->nb_inputs; i++) { diff --git a/libavfilter/audio.h b/libavfilter/audio.h index 6adc82dc81..6bbe6ee9ef 100644 --- a/libavfilter/audio.h +++ b/libavfilter/audio.h @@ -25,24 +25,6 @@ #include "avfilter.h" #include "internal.h" -static const enum AVSampleFormat ff_packed_sample_fmts_array[] = { -AV_SAMPLE_FMT_U8, -AV_SAMPLE_FMT_S16, -AV_SAMPLE_FMT_S32, -AV_SAMPLE_FMT_FLT, -AV_SAMPLE_FMT_DBL, -AV_SAMPLE_FMT_NONE -}; - -static const enum AVSampleFormat ff_planar_sample_fmts_array[] = { -AV_SAMPLE_FMT_U8P, -AV_SAMPLE_FMT_S16P, -AV_SAMPLE_FMT_S32P, -AV_SAMPLE_FMT_FLTP, -AV_SAMPLE_FMT_DBLP, -AV_SAMPLE_FMT_NONE -}; - /** default handler for get_audio_buffer() for audio inputs */ AVFrame *ff_default_get_audio_buffer(AVFilterLink *link, int nb_samples); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avformat/movenc: write the colr atom by default
ffmpeg | branch: master | Michael Bradshaw | Mon Apr 13 11:11:38 2020 -0600| [c5b20cfe19c3cd1bedf637e4caf0feb245d0ad06] | committer: Michael Bradshaw avformat/movenc: write the colr atom by default The write_colr flag has been marked as experimental for over 5 years. It should be safe to enable its behavior by default as follows: - Write the colr atom by default for mp4/mov if any of the following: - The primaries/trc/matrix are all specified, OR - There is an ICC profile, OR - The user specified +write_colr - Keep the write_colr flag for situations where the user wants to write the colr atom even if the color info is unspecified (e.g., http://ffmpeg.org/pipermail/ffmpeg-devel/2020-March/259334.html) This fixes https://trac.ffmpeg.org/ticket/7961 Signed-off-by: Michael Bradshaw > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c5b20cfe19c3cd1bedf637e4caf0feb245d0ad06 --- libavformat/movenc.c| 18 -- tests/ref/fate/copy-trac236 | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 7db2e28840..12471c7d68 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -78,7 +78,7 @@ static const AVOption options[] = { { "delay_moov", "Delay writing the initial moov until the first fragment is cut, or until the first fragment flush", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_DELAY_MOOV}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, { "global_sidx", "Write a global sidx index at the start of the file", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_GLOBAL_SIDX}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, { "skip_sidx", "Skip writing of sidx atom", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_SKIP_SIDX}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, -{ "write_colr", "Write colr atom (Experimental, may be renamed or changed, do not use from scripts)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_WRITE_COLR}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, +{ "write_colr", "Write colr atom even if the color info is unspecified (Experimental, may be renamed or changed, do not use from scripts)", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_WRITE_COLR}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, { "prefer_icc", "If writing colr atom prioritise usage of ICC profile if it exists in stream packet side data", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_PREFER_ICC}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, { "write_gama", "Write deprecated gama atom", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_WRITE_GAMA}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, { "use_metadata_tags", "Use mdta atom for metadata.", 0, AV_OPT_TYPE_CONST, {.i64 = FF_MOV_FLAG_USE_MDTA}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "movflags" }, @@ -2164,11 +2164,17 @@ static int mov_write_video_tag(AVFormatContext *s, AVIOContext *pb, MOVMuxContex else av_log(mov->fc, AV_LOG_WARNING, "Not writing 'gama' atom. Format is not MOV.\n"); } -if (mov->flags & FF_MOV_FLAG_WRITE_COLR) { -if (track->mode == MODE_MOV || track->mode == MODE_MP4) -mov_write_colr_tag(pb, track, mov->flags & FF_MOV_FLAG_PREFER_ICC); -else -av_log(mov->fc, AV_LOG_WARNING, "Not writing 'colr' atom. Format is not MOV or MP4.\n"); +if (track->mode == MODE_MOV || track->mode == MODE_MP4) { +int has_color_info = track->par->color_primaries != AVCOL_PRI_UNSPECIFIED && + track->par->color_trc != AVCOL_TRC_UNSPECIFIED && + track->par->color_space != AVCOL_SPC_UNSPECIFIED; +if (has_color_info || mov->flags & FF_MOV_FLAG_WRITE_COLR || +av_stream_get_side_data(track->st, AV_PKT_DATA_ICC_PROFILE, NULL)) { +int prefer_icc = mov->flags & FF_MOV_FLAG_PREFER_ICC || !has_color_info; +mov_write_colr_tag(pb, track, prefer_icc); +} else if (mov->flags & FF_MOV_FLAG_WRITE_COLR) { + av_log(mov->fc, AV_LOG_WARNING, "Not writing 'colr' atom. Format is not MOV or MP4.\n"); +} } if (track->mode == MODE_MOV || track->mode == MODE_MP4) { mov_write_clli_tag(pb, track); diff --git a/tests/ref/fate/copy-trac236 b/tests/ref/fate/copy-trac236 index 1583ae5704..c34b309b3f 100644 --- a/tests/ref/fate/copy-trac236 +++ b/tests/ref/fate/copy-trac236 @@ -1,5 +1,5 @@ -984a33c6292e3d35e2cfdfbf66d8e82b *tests/data/fate/copy-trac236.mov -630860 tests/data/fate/copy-trac236.mov +34b0ad38518b0eb8464aff04e6d0e143 *tests/data/fate/copy-trac236.mov +630878 tests/data/fate/copy-trac236.mov #tb 0: 100/2997 #media_type 0: video #codec_id 0: rawvideo ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscr
[FFmpeg-cvslog] avcodec/proresenc: add support for PQ and HLG
ffmpeg | branch: master | Michael Bradshaw | Wed Aug 19 19:13:21 2020 -0700| [b30f737f7af5385d55b877b41737852d487f5ab1] | committer: Michael Bradshaw avcodec/proresenc: add support for PQ and HLG Signed-off-by: Michael Bradshaw > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b30f737f7af5385d55b877b41737852d487f5ab1 --- libavcodec/proresenc_anatoliy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 1128978330..3005db0bb4 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -55,7 +55,8 @@ static const int bitrate_table[6] = { 1000, 2100, 3500, 5400, 7000, 1}; static const int valid_primaries[9] = { AVCOL_PRI_RESERVED0, AVCOL_PRI_BT709, AVCOL_PRI_UNSPECIFIED, AVCOL_PRI_BT470BG, AVCOL_PRI_SMPTE170M, AVCOL_PRI_BT2020, AVCOL_PRI_SMPTE431, AVCOL_PRI_SMPTE432,INT_MAX }; -static const int valid_trc[4]= { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, AVCOL_TRC_UNSPECIFIED, INT_MAX }; +static const int valid_trc[6]= { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, AVCOL_TRC_UNSPECIFIED, AVCOL_TRC_SMPTE2084, + AVCOL_TRC_ARIB_STD_B67, INT_MAX }; static const int valid_colorspace[5] = { AVCOL_SPC_BT709, AVCOL_SPC_UNSPECIFIED, AVCOL_SPC_SMPTE170M, AVCOL_SPC_BT2020_NCL, INT_MAX }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec: add RPZA encoder
ffmpeg | branch: master | Paul B Mahol | Wed Jul 15 21:43:59 2020 +0200| [6158029dfc6bb2ae9f55eb63e8573d27b55e2167] | committer: Paul B Mahol avcodec: add RPZA encoder > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6158029dfc6bb2ae9f55eb63e8573d27b55e2167 --- Changelog | 1 + doc/general.texi | 2 +- libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/rpzaenc.c | 859 + libavcodec/version.h | 2 +- 6 files changed, 864 insertions(+), 2 deletions(-) diff --git a/Changelog b/Changelog index 1efc768387..7467e73306 100644 --- a/Changelog +++ b/Changelog @@ -14,6 +14,7 @@ version : - ADPCM Argonaut Games encoder - Argonaut Games ASF muxer - AV1 Low overhead bitstream format demuxer +- RPZA video encoder version 4.3: diff --git a/doc/general.texi b/doc/general.texi index fac5377504..d618565347 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -1008,7 +1008,7 @@ following image formats are supported: @tab fourcc: 'rle ' @item QuickTime Graphics (SMC) @tab @tab X @tab fourcc: 'smc ' -@item QuickTime video (RPZA) @tab @tab X +@item QuickTime video (RPZA) @tab X @tab X @tab fourcc: rpza @item R10K AJA Kona 10-bit RGB Codec @tab X @tab X @item R210 Quicktime Uncompressed RGB 10-bit @tab X @tab X diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 3431ba2dca..d84eff6a61 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -580,6 +580,7 @@ OBJS-$(CONFIG_ROQ_ENCODER) += roqvideoenc.o roqvideo.o elbg.o OBJS-$(CONFIG_ROQ_DPCM_DECODER)+= dpcm.o OBJS-$(CONFIG_ROQ_DPCM_ENCODER)+= roqaudioenc.o OBJS-$(CONFIG_RPZA_DECODER)+= rpza.o +OBJS-$(CONFIG_RPZA_ENCODER)+= rpzaenc.o OBJS-$(CONFIG_RSCC_DECODER)+= rscc.o OBJS-$(CONFIG_RV10_DECODER)+= rv10.o OBJS-$(CONFIG_RV10_ENCODER)+= rv10enc.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 4bd830e5d0..729d2fd9ad 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -267,6 +267,7 @@ extern AVCodec ff_rawvideo_decoder; extern AVCodec ff_rl2_decoder; extern AVCodec ff_roq_encoder; extern AVCodec ff_roq_decoder; +extern AVCodec ff_rpza_encoder; extern AVCodec ff_rpza_decoder; extern AVCodec ff_rscc_decoder; extern AVCodec ff_rv10_encoder; diff --git a/libavcodec/rpzaenc.c b/libavcodec/rpzaenc.c new file mode 100644 index 00..2d3876743f --- /dev/null +++ b/libavcodec/rpzaenc.c @@ -0,0 +1,859 @@ +/* + * QuickTime RPZA Video Encoder + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +/** + * @file rpzaenc.c + * QT RPZA Video Encoder by Todd Kirby and David Adler + */ + +#include "libavutil/avassert.h" +#include "libavutil/common.h" +#include "libavutil/opt.h" + +#include "avcodec.h" +#include "internal.h" +#include "put_bits.h" + +typedef struct RpzaContext { +AVClass *avclass; + +int skip_frame_thresh; +int start_one_color_thresh; +int continue_one_color_thresh; +int sixteen_color_thresh; + +AVFrame *prev_frame;// buffer for previous source frame +PutBitContext pb; // buffer for encoded frame data. + +int frame_width;// width in pixels of source frame +int frame_height; // height in pixesl of source frame + +int first_frame;// flag set to one when the first frame is being processed +// so that comparisons with previous frame data in not attempted +} RpzaContext; + +typedef enum channel_offset { +RED = 2, +GREEN = 1, +BLUE = 0, +} channel_offset; + +typedef struct rgb { +uint8_t r; +uint8_t g; +uint8_t b; +} rgb; + +#define SQR(x) ((x) * (x)) + +/* 15 bit components */ +#define GET_CHAN(color, chan) (((color) >> ((chan) * 5) & 0x1F) * 8) +#define R(color) GET_CHAN(color, RED) +#define G(color) GET_CHAN(color, GREEN) +#define B(color) GET_CHAN(color, BLUE) + +typedef struct BlockInfo { +int row; +int col; +int block_width; +int block_height; +int image_width; +int image_height; +int block_index; +uint16_t start; +int rowstride; +int blocks_per_row; +int total_blocks; +} Block
[FFmpeg-cvslog] avfilter/af_arnndn: use RNN_COPY macro to copy
ffmpeg | branch: master | Paul B Mahol | Fri Aug 21 22:16:56 2020 +0200| [999f5160c4587c34e338bbce0333a1307dd1735d] | committer: Paul B Mahol avfilter/af_arnndn: use RNN_COPY macro to copy > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=999f5160c4587c34e338bbce0333a1307dd1735d --- libavfilter/af_arnndn.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c index 7a26f89709..d2722fb202 100644 --- a/libavfilter/af_arnndn.c +++ b/libavfilter/af_arnndn.c @@ -413,8 +413,7 @@ static void inverse_transform(DenoiseState *st, float *out, const AVComplexFloat AVComplexFloat x[WINDOW_SIZE]; AVComplexFloat y[WINDOW_SIZE]; -for (int i = 0; i < FREQ_SIZE; i++) -x[i] = in[i]; +RNN_COPY(x, in, FREQ_SIZE); for (int i = FREQ_SIZE; i < WINDOW_SIZE; i++) { x[i].re = x[WINDOW_SIZE - i].re; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/af_biquads: add different transform types
ffmpeg | branch: master | Paul B Mahol | Fri Aug 21 22:42:45 2020 +0200| [2459c3f8f0c4f53433b4ca1c75802248aaaf4e0c] | committer: Paul B Mahol avfilter/af_biquads: add different transform types > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2459c3f8f0c4f53433b4ca1c75802248aaaf4e0c --- doc/filters.texi | 72 +++ libavfilter/af_biquads.c | 223 +-- 2 files changed, 287 insertions(+), 8 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 610cb09a8c..1aec9f15c7 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -1573,6 +1573,14 @@ Enabling it will normalize magnitude response at DC to 0dB. @item order, o Set the filter order, can be 1 or 2. Default is 2. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands @@ -2693,6 +2701,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands @@ -2756,6 +2772,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands @@ -2826,6 +2850,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands @@ -2884,6 +2916,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @section bs2b @@ -3607,6 +3647,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Examples @@ -4084,6 +4132,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands @@ -4410,6 +4466,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Examples @@ -5530,6 +5594,14 @@ Specify which channels to filter, by default all available are filtered. @item normalize, n Normalize biquad coefficients, by default is disabled. Enabling it will normalize magnitude response at DC to 0dB. + +@item transform, a +Set transform type of IIR filter. +@table @option +@item di +@item dii +@item tdii +@end table @end table @subsection Commands diff --git a/libavfilter/af_biquads.c b/libavfilter/af_biquads.c index 81cdb0c10e..84f9c94bc3 100644 --- a/libavfilter/af_biquads.c +++ b/libavfilter/af_biquads.c @@ -93,6 +93,13 @@ enum WidthType { NB_WTYPE, }; +enum TransformType { +DI, +DII, +TDII, +NB_TTYPE, +}; + typedef struct ChanCache { double i1, i2; double o1, o2; @@ -106,6 +113,7 @@ typedef struct BiquadsContext { int width_type; int poles; int csg; +int transform_type; double gain; double frequency; @@ -258,6 +266,101 @@ BIQUAD_FILTER(s32, int32_t, INT32_MIN, INT32_MAX, 1) BIQUAD_FILTER(flt, float, -1., 1., 0) BIQUAD_FILTER(dbl, double, -1., 1., 0) +#define BIQUAD_DII_FILTER(name, type, min, max, need_clipping)\ +static void biquad_dii_## name (BiquadsContext *s,\ +const void *input, void *output, int len, \ +double *z1, doub
[FFmpeg-cvslog] avcodec/proresenc: infer array lengths
ffmpeg | branch: master | Michael Bradshaw | Fri Aug 21 10:08:57 2020 -0700| [b97eb35308e1f57c997093a1d9830b58ad88915a] | committer: Michael Bradshaw avcodec/proresenc: infer array lengths Signed-off-by: Michael Bradshaw > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b97eb35308e1f57c997093a1d9830b58ad88915a --- libavcodec/proresenc_anatoliy.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c index 3005db0bb4..8bc13fd576 100644 --- a/libavcodec/proresenc_anatoliy.c +++ b/libavcodec/proresenc_anatoliy.c @@ -49,16 +49,16 @@ static const AVProfile profiles[] = { { FF_PROFILE_UNKNOWN } }; -static const int qp_start_table[6] = { 8, 3, 2, 1, 1, 1}; -static const int qp_end_table[6] = { 13, 9, 6, 6, 5, 4}; -static const int bitrate_table[6] = { 1000, 2100, 3500, 5400, 7000, 1}; - -static const int valid_primaries[9] = { AVCOL_PRI_RESERVED0, AVCOL_PRI_BT709, AVCOL_PRI_UNSPECIFIED, AVCOL_PRI_BT470BG, - AVCOL_PRI_SMPTE170M, AVCOL_PRI_BT2020, AVCOL_PRI_SMPTE431, AVCOL_PRI_SMPTE432,INT_MAX }; -static const int valid_trc[6]= { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, AVCOL_TRC_UNSPECIFIED, AVCOL_TRC_SMPTE2084, - AVCOL_TRC_ARIB_STD_B67, INT_MAX }; -static const int valid_colorspace[5] = { AVCOL_SPC_BT709, AVCOL_SPC_UNSPECIFIED, AVCOL_SPC_SMPTE170M, - AVCOL_SPC_BT2020_NCL, INT_MAX }; +static const int qp_start_table[] = { 8, 3, 2, 1, 1, 1}; +static const int qp_end_table[] = { 13, 9, 6, 6, 5, 4}; +static const int bitrate_table[] = { 1000, 2100, 3500, 5400, 7000, 1}; + +static const int valid_primaries[] = { AVCOL_PRI_RESERVED0, AVCOL_PRI_BT709, AVCOL_PRI_UNSPECIFIED, AVCOL_PRI_BT470BG, +AVCOL_PRI_SMPTE170M, AVCOL_PRI_BT2020, AVCOL_PRI_SMPTE431, AVCOL_PRI_SMPTE432, INT_MAX }; +static const int valid_trc[]= { AVCOL_TRC_RESERVED0, AVCOL_TRC_BT709, AVCOL_TRC_UNSPECIFIED, AVCOL_TRC_SMPTE2084, +AVCOL_TRC_ARIB_STD_B67, INT_MAX }; +static const int valid_colorspace[] = { AVCOL_SPC_BT709, AVCOL_SPC_UNSPECIFIED, AVCOL_SPC_SMPTE170M, +AVCOL_SPC_BT2020_NCL, INT_MAX }; static const uint8_t QMAT_LUMA[6][64] = { { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/libaomdec: Set SAR based on RenderWidth and RenderHeight
ffmpeg | branch: master | Derek Buitenhuis | Fri Aug 21 16:28:02 2020 +0100| [3fc3d712a99cf39f69a2258b48cbc81fa8ae5471] | committer: Derek Buitenhuis avcodec/libaomdec: Set SAR based on RenderWidth and RenderHeight This is the same thing we do in libdav1d.c Signed-off-by: Derek Buitenhuis > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3fc3d712a99cf39f69a2258b48cbc81fa8ae5471 --- libavcodec/libaomdec.c | 8 1 file changed, 8 insertions(+) diff --git a/libavcodec/libaomdec.c b/libavcodec/libaomdec.c index a72ac984e7..1430a651fe 100644 --- a/libavcodec/libaomdec.c +++ b/libavcodec/libaomdec.c @@ -197,6 +197,14 @@ static int aom_decode(AVCodecContext *avctx, void *data, int *got_frame, } if ((ret = ff_get_buffer(avctx, picture, 0)) < 0) return ret; + +av_reduce(&picture->sample_aspect_ratio.num, + &picture->sample_aspect_ratio.den, + picture->height * img->r_w, + picture->width * img->r_h, + INT_MAX); +ff_set_sar(avctx, picture->sample_aspect_ratio); + if ((img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) && img->bit_depth == 8) image_copy_16_to_8(picture, img); else ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".