diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-04-17 10:32:12 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2021-01-01 14:25:18 +0100 |
commit | 955bdb1d32b279ea7a773dba66ac375d98d71740 (patch) | |
tree | d46e4aa5c1092d7308c429b5cabef660551ef473 /libavfilter | |
parent | 775707aba9d2181e144b6be5f312539460eff31e (diff) | |
download | ffmpeg-955bdb1d32b279ea7a773dba66ac375d98d71740.tar.gz |
lavfi/vf_pp7: convert to the video_enc_params API
Re-enable fate-filter-pp7
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/Makefile | 2 | ||||
-rw-r--r-- | libavfilter/vf_pp7.c | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 88640e7477..2d836f0a7f 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -353,7 +353,7 @@ OBJS-$(CONFIG_PHOTOSENSITIVITY_FILTER) += vf_photosensitivity.o OBJS-$(CONFIG_PIXDESCTEST_FILTER) += vf_pixdesctest.o OBJS-$(CONFIG_PIXSCOPE_FILTER) += vf_datascope.o OBJS-$(CONFIG_PP_FILTER) += vf_pp.o qp_table.o -OBJS-$(CONFIG_PP7_FILTER) += vf_pp7.o +OBJS-$(CONFIG_PP7_FILTER) += vf_pp7.o qp_table.o OBJS-$(CONFIG_PREMULTIPLY_FILTER) += vf_premultiply.o framesync.o OBJS-$(CONFIG_PREWITT_FILTER) += vf_convolution.o OBJS-$(CONFIG_PREWITT_OPENCL_FILTER) += vf_convolution_opencl.o opencl.o \ diff --git a/libavfilter/vf_pp7.c b/libavfilter/vf_pp7.c index 66979d9a13..ade7feb0b2 100644 --- a/libavfilter/vf_pp7.c +++ b/libavfilter/vf_pp7.c @@ -33,6 +33,7 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "internal.h" +#include "qp_table.h" #include "vf_pp7.h" enum mode { @@ -323,10 +324,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) AVFrame *out = in; int qp_stride = 0; - uint8_t *qp_table = NULL; + int8_t *qp_table = NULL; - if (!pp7->qp) - qp_table = av_frame_get_qp_table(in, &qp_stride, &pp7->qscale_type); + if (!pp7->qp) { + int ret = ff_qp_table_extract(in, &qp_table, &qp_stride, NULL, &pp7->qscale_type); + if (ret < 0) { + av_frame_free(&in); + return ret; + } + } if (!ctx->is_disabled) { const int cw = AV_CEIL_RSHIFT(inlink->w, pp7->hsub); @@ -341,6 +347,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) out = ff_get_video_buffer(outlink, aligned_w, aligned_h); if (!out) { av_frame_free(&in); + av_freep(&qp_table); return AVERROR(ENOMEM); } av_frame_copy_props(out, in); @@ -367,6 +374,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in) inlink->w, inlink->h); av_frame_free(&in); } + av_freep(&qp_table); return ff_filter_frame(outlink, out); } |