[vlc-commits] vdpau: remove dead code

Rémi Denis-Courmont git at videolan.org
Wed Mar 5 21:26:01 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Mar  5 21:56:09 2014 +0200| [37efc237e4caa6c4688e403eb325d01c24bd6da5] | committer: Rémi Denis-Courmont

vdpau: remove dead code

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

 modules/codec/avcodec/avcommon_compat.h |    4 ---
 modules/codec/avcodec/hwdummy.c         |    1 -
 modules/hw/vdpau/avcodec.c              |   48 -------------------------------
 3 files changed, 53 deletions(-)

diff --git a/modules/codec/avcodec/avcommon_compat.h b/modules/codec/avcodec/avcommon_compat.h
index f6301bf..0c02010 100644
--- a/modules/codec/avcodec/avcommon_compat.h
+++ b/modules/codec/avcodec/avcommon_compat.h
@@ -479,10 +479,6 @@ enum {
 # define err_recognition error_recognition
 #endif
 
-#if LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR <= 42 && LIBAVCODEC_VERSION_MICRO >= 100
-# define av_vdpau_alloc_context av_alloc_vdpaucontext
-#endif
-
 #endif /* HAVE_LIBAVCODEC_AVCODEC_H */
 
 #ifdef HAVE_LIBAVUTIL_AVUTIL_H
diff --git a/modules/codec/avcodec/hwdummy.c b/modules/codec/avcodec/hwdummy.c
index 658669d..112087d 100644
--- a/modules/codec/avcodec/hwdummy.c
+++ b/modules/codec/avcodec/hwdummy.c
@@ -34,7 +34,6 @@
 #include <vlc_fourcc.h>
 #include <vlc_picture.h>
 #include "../../codec/avcodec/va.h"
-#include "../../codec/avcodec/avcommon_compat.h"
 
 static int Open(vlc_va_t *, AVCodecContext *, const es_format_t *);
 static void Close(vlc_va_t *);
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 6302317..0b21f0f 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -37,7 +37,6 @@
 #include <vlc_xlib.h>
 #include "vlc_vdpau.h"
 #include "../../codec/avcodec/va.h"
-#include "../../codec/avcodec/avcommon_compat.h"
 
 static int Open(vlc_va_t *, AVCodecContext *, const es_format_t *);
 static void Close(vlc_va_t *);
@@ -170,53 +169,6 @@ static int Setup(vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
     return Init(va, ctxp, chromap, width, height);
 }
 
-#if LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR <= 42 && LIBAVCODEC_VERSION_MICRO >= 100
-static inline int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile)
-{
-#define PROFILE(prof)       \
-do {                        \
-    *profile = prof;        \
-    return 0;               \
-} while (0)
-
-    switch (avctx->codec_id) {
-    case AV_CODEC_ID_MPEG1VIDEO:               PROFILE(VDP_DECODER_PROFILE_MPEG1);
-    case AV_CODEC_ID_MPEG2VIDEO:
-        switch (avctx->profile) {
-        case FF_PROFILE_MPEG2_MAIN:            PROFILE(VDP_DECODER_PROFILE_MPEG2_MAIN);
-        case FF_PROFILE_MPEG2_SIMPLE:          PROFILE(VDP_DECODER_PROFILE_MPEG2_SIMPLE);
-        default:                               return AVERROR(EINVAL);
-        }
-    case AV_CODEC_ID_H263:                     PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_ASP);
-    case AV_CODEC_ID_MPEG4:
-        switch (avctx->profile) {
-        case FF_PROFILE_MPEG4_SIMPLE:          PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_SP);
-        case FF_PROFILE_MPEG4_ADVANCED_SIMPLE: PROFILE(VDP_DECODER_PROFILE_MPEG4_PART2_ASP);
-        default:                               return AVERROR(EINVAL);
-        }
-    case AV_CODEC_ID_H264:
-        switch (avctx->profile) {
-        case FF_PROFILE_H264_CONSTRAINED_BASELINE:
-        case FF_PROFILE_H264_BASELINE:         PROFILE(VDP_DECODER_PROFILE_H264_BASELINE);
-        case FF_PROFILE_H264_MAIN:             PROFILE(VDP_DECODER_PROFILE_H264_MAIN);
-        case FF_PROFILE_H264_HIGH:             PROFILE(VDP_DECODER_PROFILE_H264_HIGH);
-        default:                               return AVERROR(EINVAL);
-        }
-    case AV_CODEC_ID_WMV3:
-    case AV_CODEC_ID_VC1:
-        switch (avctx->profile) {
-        case FF_PROFILE_VC1_SIMPLE:            PROFILE(VDP_DECODER_PROFILE_VC1_SIMPLE);
-        case FF_PROFILE_VC1_MAIN:              PROFILE(VDP_DECODER_PROFILE_VC1_MAIN);
-        case FF_PROFILE_VC1_ADVANCED:          PROFILE(VDP_DECODER_PROFILE_VC1_ADVANCED);
-        default:                               return AVERROR(EINVAL);
-        }
-    default:
-        return AVERROR(EINVAL);
-    }
-#undef PROFILE
-}
-#endif
-
 static int Open(vlc_va_t *va, AVCodecContext *ctx, const es_format_t *fmt)
 {
     VdpStatus err;



More information about the vlc-commits mailing list