[FFmpeg-devel] [PATCH 4/7] lavfi/vf_spp: convert to the video_enc_params API

Michael Niedermayer michael at niedermayer.cc
Sat Oct 3 21:23:02 EEST 2020


On Fri, Oct 02, 2020 at 08:03:28PM +0200, Anton Khirnov wrote:
> ---
>  libavfilter/Makefile        |  2 +-
>  libavfilter/vf_spp.c        | 57 ++++++++++++++++---------------------
>  libavfilter/vf_spp.h        |  3 +-
>  tests/fate/filter-video.mak |  4 +--
>  4 files changed, 29 insertions(+), 37 deletions(-)
> 
> diff --git a/libavfilter/Makefile b/libavfilter/Makefile
> index d20f2937b6..2669d7b84b 100644
> --- a/libavfilter/Makefile
> +++ b/libavfilter/Makefile
> @@ -404,7 +404,7 @@ OBJS-$(CONFIG_SOBEL_FILTER)                  += vf_convolution.o
>  OBJS-$(CONFIG_SOBEL_OPENCL_FILTER)           += vf_convolution_opencl.o opencl.o \
>                                                  opencl/convolution.o
>  OBJS-$(CONFIG_SPLIT_FILTER)                  += split.o
> -OBJS-$(CONFIG_SPP_FILTER)                    += vf_spp.o
> +OBJS-$(CONFIG_SPP_FILTER)                    += vf_spp.o qp_table.o
>  OBJS-$(CONFIG_SR_FILTER)                     += vf_sr.o
>  OBJS-$(CONFIG_SSIM_FILTER)                   += vf_ssim.o framesync.o
>  OBJS-$(CONFIG_STEREO3D_FILTER)               += vf_stereo3d.o
> diff --git a/libavfilter/vf_spp.c b/libavfilter/vf_spp.c
> index 4bcc6429e0..2eb383be03 100644
> --- a/libavfilter/vf_spp.c
> +++ b/libavfilter/vf_spp.c
> @@ -36,6 +36,7 @@
>  #include "libavutil/opt.h"
>  #include "libavutil/pixdesc.h"
>  #include "internal.h"
> +#include "qp_table.h"
>  #include "vf_spp.h"
>  
>  enum mode {
> @@ -289,7 +290,7 @@ static void filter(SPPContext *p, uint8_t *dst, uint8_t *src,
>              } else{
>                  const int qps = 3 + is_luma;
>                  qp = qp_table[(FFMIN(x, width - 1) >> qps) + (FFMIN(y, height - 1) >> qps) * qp_stride];
> -                qp = FFMAX(1, ff_norm_qscale(qp, p->qscale_type));
> +                qp = FFMAX(1, ff_norm_qscale(qp, FF_QSCALE_TYPE_MPEG2));

wouldnt this break the cases where qscale_type is not FF_QSCALE_TYPE_MPEG2 ?

thx

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20201003/80462f62/attachment.sig>


More information about the ffmpeg-devel mailing list