Message ID | 20240220023209.3962911-1-fei.w.wang@intel.com |
---|---|
State | Accepted |
Commit | b5714d1f9126e0e7f2039268653a42d35e532fe1 |
Headers | show |
Series | [FFmpeg-devel,v1] avfilter/tonemap_vaapi: Remove duplicate format check | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Di, 2024-02-20 at 10:32 +0800, fei.w.wang-at-intel.com@ffmpeg.org wrote: > From: Fei Wang <fei.w.wang@intel.com> > > Supported formats are checked in base function ff_vaapi_vpp_config_output. > > Signed-off-by: Fei Wang <fei.w.wang@intel.com> > --- > libavfilter/vf_tonemap_vaapi.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c > index 5de7faa8cc..0b767202d2 100644 > --- a/libavfilter/vf_tonemap_vaapi.c > +++ b/libavfilter/vf_tonemap_vaapi.c > @@ -331,14 +331,6 @@ static av_cold int tonemap_vaapi_init(AVFilterContext > *avctx) > > if (ctx->output_format_string) { > vpp_ctx->output_format = av_get_pix_fmt(ctx->output_format_string); > - switch (vpp_ctx->output_format) { > - case AV_PIX_FMT_NV12: > - case AV_PIX_FMT_P010: > - break; > - default: > - av_log(avctx, AV_LOG_ERROR, "Invalid output format.\n"); > - return AVERROR(EINVAL); > - } > } else { > vpp_ctx->output_format = AV_PIX_FMT_NV12; > av_log(avctx, AV_LOG_WARNING, "Output format not set, use default > format NV12\n"); LGTM, will apply - Haihao
diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index 5de7faa8cc..0b767202d2 100644 --- a/libavfilter/vf_tonemap_vaapi.c +++ b/libavfilter/vf_tonemap_vaapi.c @@ -331,14 +331,6 @@ static av_cold int tonemap_vaapi_init(AVFilterContext *avctx) if (ctx->output_format_string) { vpp_ctx->output_format = av_get_pix_fmt(ctx->output_format_string); - switch (vpp_ctx->output_format) { - case AV_PIX_FMT_NV12: - case AV_PIX_FMT_P010: - break; - default: - av_log(avctx, AV_LOG_ERROR, "Invalid output format.\n"); - return AVERROR(EINVAL); - } } else { vpp_ctx->output_format = AV_PIX_FMT_NV12; av_log(avctx, AV_LOG_WARNING, "Output format not set, use default format NV12\n");