[vlc-devel] [PATCH 10/10] avcodec: va: remove unused PixelFormat->vlc_fourcc_t mapping function

Steve Lhomme robux4 at ycbcr.xyz
Wed Dec 18 15:53:13 CET 2019


---
 modules/codec/avcodec/va.c | 65 --------------------------------------
 modules/codec/avcodec/va.h |  9 ------
 2 files changed, 74 deletions(-)

diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index 46ff25814c7..014112f3c43 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -30,71 +30,6 @@
 #include <libavcodec/avcodec.h>
 #include "va.h"
 
-vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt)
-{
-    /* NOTE: At the time of writing this comment, the return value was only
-     * used to probe support as decoder output. So incorrect values were not
-     * fatal, especially not if a software format. */
-    switch (hwfmt)
-    {
-        case AV_PIX_FMT_VAAPI_VLD:
-            switch (swfmt)
-            {
-                case AV_PIX_FMT_YUVJ420P:
-                case AV_PIX_FMT_YUV420P:
-                    return VLC_CODEC_VAAPI_420;
-                case AV_PIX_FMT_YUV420P10LE:
-                    return VLC_CODEC_VAAPI_420_10BPP;
-                default:
-                    return 0;
-            }
-        case AV_PIX_FMT_DXVA2_VLD:
-            switch (swfmt)
-            {
-                case AV_PIX_FMT_YUV420P10LE:
-                    return VLC_CODEC_D3D9_OPAQUE_10B;
-                case AV_PIX_FMT_YUVJ420P:
-                case AV_PIX_FMT_YUV420P:
-                    return VLC_CODEC_D3D9_OPAQUE;
-                default:
-                    return 0;
-            }
-            break;
-
-        case AV_PIX_FMT_D3D11VA_VLD:
-            switch (swfmt)
-            {
-                case AV_PIX_FMT_YUV420P10LE:
-                    return VLC_CODEC_D3D11_OPAQUE_10B;
-                case AV_PIX_FMT_YUVJ420P:
-                case AV_PIX_FMT_YUV420P:
-                    return VLC_CODEC_D3D11_OPAQUE;
-                default:
-                    return 0;
-            }
-        break;
-
-        case AV_PIX_FMT_VDPAU:
-            switch (swfmt)
-            {
-                case AV_PIX_FMT_YUVJ444P:
-                case AV_PIX_FMT_YUV444P:
-                    return VLC_CODEC_VDPAU_VIDEO_444;
-                case AV_PIX_FMT_YUVJ422P:
-                case AV_PIX_FMT_YUV422P:
-                    return VLC_CODEC_VDPAU_VIDEO_422;
-                case AV_PIX_FMT_YUVJ420P:
-                case AV_PIX_FMT_YUV420P:
-                    return VLC_CODEC_VDPAU_VIDEO_420;
-                default:
-                    return 0;
-            }
-            break;
-        default:
-            return 0;
-    }
-}
-
 bool vlc_va_MightDecode(enum PixelFormat hwfmt, enum PixelFormat swfmt)
 {
     switch (hwfmt)
diff --git a/modules/codec/avcodec/va.h b/modules/codec/avcodec/va.h
index 5cec3c92852..564e5edd66b 100644
--- a/modules/codec/avcodec/va.h
+++ b/modules/codec/avcodec/va.h
@@ -56,15 +56,6 @@ typedef int (*vlc_va_open)(vlc_va_t *, AVCodecContext *,
     } \
     set_capability( "hw decoder", priority )
 
-/**
- * Determines the VLC video chroma value for a pair of hardware acceleration
- * PixelFormat and software PixelFormat.
- * @param hwfmt the hardware acceleration pixel format
- * @param swfmt the software pixel format
- * @return a VLC chroma value, or 0 on error.
- */
-vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt);
-
 /**
  * Determines whether the hardware acceleration PixelFormat can be used to
  * decode pixels similar to the software PixelFormat.
-- 
2.17.1



More information about the vlc-devel mailing list