[vlc-commits] avcodec: va: remove unused PixelFormat->vlc_fourcc_t mapping function

Steve Lhomme git at videolan.org
Wed Jan 8 08:28:19 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Dec 18 13:40:41 2019 +0100| [6947b9bc9a3213d561143d5788f173a223b6637b] | committer: Steve Lhomme

avcodec: va: remove unused PixelFormat->vlc_fourcc_t mapping function

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6947b9bc9a3213d561143d5788f173a223b6637b
---

 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 46ff25814c..014112f3c4 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 5cec3c9285..564e5edd66 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.



More information about the vlc-commits mailing list