diff mbox

[FFmpeg-devel] lavc/qsvdec: remove unused check_dec_param

Message ID 20191018082859.32680-1-linjie.fu@intel.com
State Accepted
Commit e1d993d829a6386d1b0514ea38f723d2b31b38fe
Headers show

Commit Message

Fu, Linjie Oct. 18, 2019, 8:28 a.m. UTC
Signed-off-by: Linjie Fu <linjie.fu@intel.com>
---
 libavcodec/qsvdec.c | 27 ---------------------------
 1 file changed, 27 deletions(-)

Comments

Zhong Li Oct. 22, 2019, 8:27 a.m. UTC | #1
> Signed-off-by: Linjie Fu <linjie.fu@intel.com>
> ---
>  libavcodec/qsvdec.c | 27 ---------------------------
>  1 file changed, 27 deletions(-)
>
> diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
> index ae5023989c..0d34021b42 100644
> --- a/libavcodec/qsvdec.c
> +++ b/libavcodec/qsvdec.c
> @@ -164,33 +164,6 @@ static inline unsigned int qsv_fifo_size(const AVFifoBuffer* fifo)
>      return av_fifo_size(fifo) / qsv_fifo_item_size();
>  }
>
> -static int check_dec_param(AVCodecContext *avctx, QSVContext *q, mfxVideoParam *param_in)
> -{
> -    mfxVideoParam param_out = { .mfx.CodecId = param_in->mfx.CodecId };
> -    mfxStatus ret;
> -
> -#define CHECK_MATCH(x) \
> -    do { \
> -      if (param_out.mfx.x != param_in->mfx.x) {   \
> -          av_log(avctx, AV_LOG_WARNING, "Required "#x" %d is unsupported\n", \
> -          param_in->mfx.x); \
> -      } \
> -    } while (0)
> -
> -    ret = MFXVideoDECODE_Query(q->session, param_in, &param_out);
> -
> -    if (ret < 0) {
> -        CHECK_MATCH(CodecId);
> -        CHECK_MATCH(CodecProfile);
> -        CHECK_MATCH(CodecLevel);
> -        CHECK_MATCH(FrameInfo.Width);
> -        CHECK_MATCH(FrameInfo.Height);
> -#undef CHECK_MATCH
> -        return 0;
> -    }
> -    return 1;
> -}
> -
>  static int qsv_decode_preinit(AVCodecContext *avctx, QSVContext *q, enum AVPixelFormat pix_fmt, mfxVideoParam *param)
>  {
>      mfxSession session = NULL;
> --
> 2.17.1

LGTM, will  apply
diff mbox

Patch

diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index ae5023989c..0d34021b42 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -164,33 +164,6 @@  static inline unsigned int qsv_fifo_size(const AVFifoBuffer* fifo)
     return av_fifo_size(fifo) / qsv_fifo_item_size();
 }
 
-static int check_dec_param(AVCodecContext *avctx, QSVContext *q, mfxVideoParam *param_in)
-{
-    mfxVideoParam param_out = { .mfx.CodecId = param_in->mfx.CodecId };
-    mfxStatus ret;
-
-#define CHECK_MATCH(x) \
-    do { \
-      if (param_out.mfx.x != param_in->mfx.x) {   \
-          av_log(avctx, AV_LOG_WARNING, "Required "#x" %d is unsupported\n", \
-          param_in->mfx.x); \
-      } \
-    } while (0)
-
-    ret = MFXVideoDECODE_Query(q->session, param_in, &param_out);
-
-    if (ret < 0) {
-        CHECK_MATCH(CodecId);
-        CHECK_MATCH(CodecProfile);
-        CHECK_MATCH(CodecLevel);
-        CHECK_MATCH(FrameInfo.Width);
-        CHECK_MATCH(FrameInfo.Height);
-#undef CHECK_MATCH
-        return 0;
-    }
-    return 1;
-}
-
 static int qsv_decode_preinit(AVCodecContext *avctx, QSVContext *q, enum AVPixelFormat pix_fmt, mfxVideoParam *param)
 {
     mfxSession session = NULL;