diff options
author | Uoti Urpala <uau@mplayer2.org> | 2012-08-22 15:54:56 +0300 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-08-28 23:26:16 +0200 |
commit | d5aa8dc88f00ac07f2f35788a230385abd404634 (patch) | |
tree | 88810e1e576192936a2731e7066fb82882b7a2d5 /libmpcodecs | |
parent | da374c40de9ca166c04cccc0ce526407f5e58e8e (diff) | |
download | mpv-d5aa8dc88f00ac07f2f35788a230385abd404634.tar.bz2 mpv-d5aa8dc88f00ac07f2f35788a230385abd404634.tar.xz |
cleanup: remove XvMC remains, reformat img_format.c
Remove remaining references to XvMC. It was already not supported;
remove references to the imgfmt too. Reformat img_format.c.
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/img_format.c | 61 | ||||
-rw-r--r-- | libmpcodecs/img_format.h | 10 | ||||
-rw-r--r-- | libmpcodecs/vd_ffmpeg.c | 3 |
3 files changed, 33 insertions, 41 deletions
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index bae52c3399..a56446f17f 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -107,8 +107,6 @@ const char *vo_format_name(int format) case IMGFMT_YUVP: return "Packed YUVP"; case IMGFMT_UYVP: return "Packed UYVP"; case IMGFMT_MPEGPES: return "Mpeg PES"; - case IMGFMT_XVMC_MOCO_MPEG2: return "MPEG1/2 Motion Compensation"; - case IMGFMT_XVMC_IDCT_MPEG2: return "MPEG1/2 Motion Compensation and IDCT"; case IMGFMT_VDPAU_MPEG1: return "MPEG1 VDPAU acceleration"; case IMGFMT_VDPAU_MPEG2: return "MPEG2 VDPAU acceleration"; case IMGFMT_VDPAU_H264: return "H.264 VDPAU acceleration"; @@ -116,11 +114,12 @@ const char *vo_format_name(int format) case IMGFMT_VDPAU_WMV3: return "WMV3 VDPAU acceleration"; case IMGFMT_VDPAU_VC1: return "VC1 VDPAU acceleration"; } - snprintf(unknown_format,20,"Unknown 0x%04x",format); + snprintf(unknown_format, 20, "Unknown 0x%04x", format); return unknown_format; } -int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_bits) +int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, + int *component_bits) { int xs = 0, ys = 0; int bpp; @@ -170,31 +169,35 @@ int mp_get_chroma_shift(int format, int *x_shift, int *y_shift, int *component_b err = 1; break; } - } else switch (format) { - case IMGFMT_420A: - case IMGFMT_I420: - case IMGFMT_IYUV: - case IMGFMT_YV12: - xs = 1; - ys = 1; - break; - case IMGFMT_IF09: - case IMGFMT_YVU9: - xs = 2; - ys = 2; - break; - case IMGFMT_Y8: - case IMGFMT_Y800: - xs = 31; - ys = 31; - break; - default: - err = 1; - break; - } - if (x_shift) *x_shift = xs; - if (y_shift) *y_shift = ys; - if (component_bits) *component_bits = bits; + } else + switch (format) { + case IMGFMT_420A: + case IMGFMT_I420: + case IMGFMT_IYUV: + case IMGFMT_YV12: + xs = 1; + ys = 1; + break; + case IMGFMT_IF09: + case IMGFMT_YVU9: + xs = 2; + ys = 2; + break; + case IMGFMT_Y8: + case IMGFMT_Y800: + xs = 31; + ys = 31; + break; + default: + err = 1; + break; + } + if (x_shift) + *x_shift = xs; + if (y_shift) + *y_shift = ys; + if (component_bits) + *component_bits = bits; bpp = 8 + ((16 >> xs) >> ys); if (format == IMGFMT_420A) bpp += 8; diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 61873ad72a..e62ecc4dc1 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -198,14 +198,6 @@ #define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S')) #define IMGFMT_MJPEG (('M')|('J'<<8)|('P'<<16)|('G'<<24)) -// I think that this code could not be used by any other codec/format -#define IMGFMT_XVMC 0x1DC70000 -#define IMGFMT_XVMC_MASK 0xFFFF0000 -#define IMGFMT_IS_XVMC(fmt) (((fmt)&IMGFMT_XVMC_MASK)==IMGFMT_XVMC) -//these are chroma420 -#define IMGFMT_XVMC_MOCO_MPEG2 (IMGFMT_XVMC|0x02) -#define IMGFMT_XVMC_IDCT_MPEG2 (IMGFMT_XVMC|0x82) - // VDPAU specific format. #define IMGFMT_VDPAU 0x1DC80000 #define IMGFMT_VDPAU_MASK 0xFFFF0000 @@ -217,7 +209,7 @@ #define IMGFMT_VDPAU_VC1 (IMGFMT_VDPAU|0x05) #define IMGFMT_VDPAU_MPEG4 (IMGFMT_VDPAU|0x06) -#define IMGFMT_IS_HWACCEL(fmt) (IMGFMT_IS_VDPAU(fmt) || IMGFMT_IS_XVMC(fmt)) +#define IMGFMT_IS_HWACCEL(fmt) IMGFMT_IS_VDPAU(fmt) typedef struct { void* data; diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c index b2150579ea..21c24a2702 100644 --- a/libmpcodecs/vd_ffmpeg.c +++ b/libmpcodecs/vd_ffmpeg.c @@ -194,9 +194,6 @@ static int init(sh_video_t *sh) avctx->release_buffer = release_buffer; avctx->reget_buffer = get_buffer; avctx->draw_horiz_band = draw_slice; - if (lavc_codec->capabilities & CODEC_CAP_HWACCEL) - mp_msg(MSGT_DECVIDEO, MSGL_V, "[VD_FFMPEG] XVMC-accelerated " - "MPEG-2.\n"); if (lavc_codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) mp_msg(MSGT_DECVIDEO, MSGL_V, "[VD_FFMPEG] VDPAU hardware " "decoding.\n"); |