Commit b25a657d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove the XvMC plugin

In 0.9, the output refuses to work and the codec just segfaults.
In 1.0, it is inoperant due to the removal of the forked libmpeg2.
In 1.1, we would anyway need to rewrite it to the new vout API.
parent 10ab70ed
......@@ -3661,28 +3661,6 @@ AS_IF([test "${enable_glx}" != "no"], [
],[AC_MSG_ERROR([Please install GL development package. Alternatively you can also configure with --disable-glx.])])
])
dnl
dnl XVMC module
dnl (disabled by default except on win32)
dnl
AC_ARG_ENABLE(xvmc,
[ --enable-xvmc XvMC support (default disabled)],, [
enable_xvmc="no"
])
AS_IF([test "${enable_xvmc}" != "no"], [
AC_CHECK_HEADERS(X11/extensions/vldXvMC.h, [
AS_IF([test "${enable_libmpeg2}" = "yes"], [
VLC_ADD_PLUGIN([xvmc])
VLC_ADD_LIBS([xvmc],[${X_LIBS} ${X_PRE_LIBS} -lX11 -lXext -lXvMCW -lXv ${LIBMPEG2_LIBS}])
VLC_ADD_CPPFLAGS([xvmc],[${X_CFLAGS} ${LIBMPEG2_CFLAGS}])
], [
AC_MSG_ERROR([XVideo-MotionCompensation needs libmpeg2 which isn't available])
])
], [
AC_MSG_ERROR([XVideo-MotionCompensation extension not found!])
])
])
dnl End of Xlib tests
CPPFLAGS="${CPPFLAGS_save}"
......@@ -5108,8 +5086,8 @@ AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
dnl Tests for Xsp
AC_CHECK_LIB(Xsp, XSPSetPixelDoubling,[
VLC_ADD_CPPFLAGS([xvmc glx],[-DHAVE_XSP])
VLC_ADD_LIBS([xvmc glx],[-lXsp])
VLC_ADD_CPPFLAGS([glx],[-DHAVE_XSP])
VLC_ADD_LIBS([glx],[-lXsp])
])
dnl
......@@ -5309,7 +5287,6 @@ AC_CONFIG_FILES([
modules/codec/subtitles/Makefile
modules/codec/spudec/Makefile
modules/codec/wmafixed/Makefile
modules/codec/xvmc/Makefile
modules/control/Makefile
modules/control/http/Makefile
modules/control/globalhotkeys/Makefile
......
......@@ -366,7 +366,6 @@ $Id$
* xml: LibXML xml parser
* xosd: X On Screen Display interface
* xtag: XTAG xml parser
* xvmc: XVMC video output and decoder
* yuv: yuv video output
* yuvp: YUVP to YUVA/RGBA chroma converter
* yuy2_i420: yuy2 to 4:2:0 conversions functions
......
SUBDIRS = cmml dmo avcodec shine subtitles spudec wmafixed xvmc
SUBDIRS = cmml dmo avcodec shine subtitles spudec wmafixed
SOURCES_a52 = a52.c a52.h
SOURCES_dts = dts.c
SOURCES_flac = flac.c
......
SOURCES_xvmc = \
xxmc.c \
accel_xvmc.h \
mpeg2_internal.h \
$(NULL)
/*****************************************************************************
* xvmc.c : Common acceleration definitions for XvMC
*****************************************************************************
* Copyright (C) 2006 VideoLAN
* $Id$
*
* Authors: Christophe Burgalat <c _dot_ burgalat _at_ broadcastavenue _dot_ com>
* Jean-Paul Saman <jpsaman _at_ videolan _dot_ org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
/*
* Common acceleration definitions for XvMC
*
*
*/
#ifndef HAVE_VLC_ACCEL_H
#define HAVE_VLC_ACCEL_H
#ifdef __cplusplus
extern "C" {
#endif
typedef struct vlc_macroblock_s
{
short *blockptr; /* pointer to current dct block */
short *blockbaseptr; /* pointer to base of dct block array in blocks */
short xvmc_accel; /* type of acceleration supported */
} vlc_macroblocks_t;
typedef struct vlc_vld_frame_s
{
int version; /* Backward compatibility */
int mv_ranges[2][2];
int picture_structure;
int picture_coding_type;
int intra_dc_precision;
int mpeg_coding;
int progressive_sequence;
int scan;
int pred_dct_frame;
int concealment_motion_vectors;
int q_scale_type;
int intra_vlc_format;
int second_field;
int load_intra_quantizer_matrix;
int load_non_intra_quantizer_matrix;
uint8_t intra_quantizer_matrix[64];
uint8_t non_intra_quantizer_matrix[64];
picture_t *backward_reference_picture;
picture_t *forward_reference_picture;
} vlc_vld_frame_t;
typedef struct vlc_xvmc_s
{
vlc_macroblocks_t *macroblocks;
void (*proc_macro_block)(int x,int y,int mb_type,
int motion_type,int (*mv_field_sel)[2],
int *dmvector,int cbp,int dct_type,
picture_t *current_picture,picture_t *forward_ref_picture,
picture_t *backward_ref_picture,int picture_structure,
int second_field,int (*f_mot_pmv)[2],int (*b_mot_pmv)[2]);
} vlc_xvmc_t ;
typedef struct vlc_xxmc_s
{
/*
* We inherit the xine_xvmc_t properties.
*/
vlc_xvmc_t xvmc;
unsigned mpeg;
unsigned acceleration;
vlc_fourcc_t fallback_format;
vlc_vld_frame_t vld_frame;
uint8_t *slice_data;
unsigned slice_data_size;
unsigned slice_code;
int result;
int decoded;
float sleep;
void (*proc_xxmc_update_frame) (picture_t *picture_gen,
uint32_t width, uint32_t height, double ratio,
int format, int flags);
void (*proc_xxmc_begin) (picture_t *vo_img);
void (*proc_xxmc_slice) (picture_t *vo_img);
void (*proc_xxmc_flush) (picture_t *vo_img);
void (*proc_xxmc_flushsync) (picture_t *vo_img);
} vlc_xxmc_t;
#define VLC_IMGFMT_XXMC VLC_FOURCC('X','x','M','C')
/*
* Register XvMC stream types here.
*/
#define VLC_XVMC_MPEG_1 0x00000001
#define VLC_XVMC_MPEG_2 0x00000002
#define VLC_XVMC_MPEG_4 0x00000004
/*
* Register XvMC acceleration levels here.
*/
#define VLC_XVMC_ACCEL_MOCOMP 0x00000001
#define VLC_XVMC_ACCEL_IDCT 0x00000002
#define VLC_XVMC_ACCEL_VLD 0x00000004
/* xvmc acceleration types */
#define VLC_VO_MOTION_ACCEL 1
#define VLC_VO_IDCT_ACCEL 2
#define VLC_VO_SIGNED_INTRA 4
/* motion types */
#define VLC_MC_FIELD 1
#define VLC_MC_FRAME 2
#define VLC_MC_16X8 2
#define VLC_MC_DMV 3
/* picture coding type */
#define VLC_PICT_I_TYPE 1
#define VLC_PICT_P_TYPE 2
#define VLC_PICT_B_TYPE 3
#define VLC_PICT_D_TYPE 4
/* macroblock modes */
#define VLC_MACROBLOCK_INTRA 1
#define VLC_MACROBLOCK_PATTERN 2
#define VLC_MACROBLOCK_MOTION_BACKWARD 4
#define VLC_MACROBLOCK_MOTION_FORWARD 8
#define VLC_MACROBLOCK_QUANT 16
#define VLC_MACROBLOCK_DCT_TYPE_INTERLACED 32
#ifdef __cplusplus
}
#endif
#endif
/* $Id$
* mpeg2_internal.h
* Copyright (C) 2000-2003 Michel Lespinasse <walken@zoy.org>
* Copyright (C) 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
*
* This file is part of mpeg2dec, a free MPEG-2 video stream decoder.
* See http://libmpeg2.sourceforge.net/ for updates.
*
* mpeg2dec is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* mpeg2dec is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef LIBMPEG2_MPEG2_INTERNAL_H
#define LIBMPEG2_MPEG2_INTERNAL_H
#define STATE_INTERNAL_NORETURN ((mpeg2_state_t)-1)
/* macroblock modes */
#define MACROBLOCK_INTRA 1
#define MACROBLOCK_PATTERN 2
#define MACROBLOCK_MOTION_BACKWARD 4
#define MACROBLOCK_MOTION_FORWARD 8
#define MACROBLOCK_QUANT 16
#define DCT_TYPE_INTERLACED 32
/* motion_type */
#define MOTION_TYPE_SHIFT 6
#define MC_FIELD 1
#define MC_FRAME 2
#define MC_16X8 2
#define MC_DMV 3
/* picture structure */
#define TOP_FIELD 1
#define BOTTOM_FIELD 2
#define FRAME_PICTURE 3
/* picture coding type */
#define I_TYPE 1
#define P_TYPE 2
#define B_TYPE 3
#define D_TYPE 4
typedef void mpeg2_mc_fct (uint8_t *, const uint8_t *, int, int);
typedef struct {
uint8_t * ref[2][3];
uint8_t ** ref2[2];
int pmv[2][2];
int f_code[2];
} motion_t;
typedef void motion_parser_t (mpeg2_decoder_t * decoder,
motion_t * motion,
mpeg2_mc_fct * const * table);
struct mpeg2_decoder_s {
/* first, state that carries information from one macroblock to the */
/* next inside a slice, and is never used outside of mpeg2_slice() */
/* bit parsing stuff */
uint32_t bitstream_buf; /* current 32 bit working set */
int bitstream_bits; /* used bits in working set */
const uint8_t * bitstream_ptr; /* buffer with stream data */
uint8_t * dest[3];
int offset;
int stride;
int uv_stride;
int slice_stride;
int slice_uv_stride;
int stride_frame;
unsigned int limit_x;
unsigned int limit_y_16;
unsigned int limit_y_8;
unsigned int limit_y;
/* Motion vectors */
/* The f_ and b_ correspond to the forward and backward motion */
/* predictors */
motion_t b_motion;
motion_t f_motion;
motion_parser_t * motion_parser[5];
/* predictor for DC coefficients in intra blocks */
int16_t dc_dct_pred[3];
/* DCT coefficients */
int16_t DCTblock[64] ATTR_ALIGN(64);
uint8_t * picture_dest[3];
void (* convert) (void * convert_id, uint8_t * const * src,
unsigned int v_offset);
void * convert_id;
int dmv_offset;
unsigned int v_offset;
/* now non-slice-specific information */
/* sequence header stuff */
uint16_t * quantizer_matrix[4];
uint16_t (* chroma_quantizer[2])[64];
uint16_t quantizer_prescale[4][32][64];
/* The width and height of the picture snapped to macroblock units */
int width;
int height;
int vertical_position_extension;
int chroma_format;
/* picture header stuff */
/* what type of picture this is (I, P, B, D) */
int coding_type;
/* picture coding extension stuff */
/* quantization factor for intra dc coefficients */
int intra_dc_precision;
/* top/bottom/both fields */
int picture_structure;
/* bool to indicate all predictions are frame based */
int frame_pred_frame_dct;
/* bool to indicate whether intra blocks have motion vectors */
/* (for concealment) */
int concealment_motion_vectors;
/* bool to use different vlc tables */
int intra_vlc_format;
/* used for DMV MC */
int top_field_first;
/* stuff derived from bitstream */
/* pointer to the zigzag scan we're supposed to be using */
const uint8_t * scan;
int second_field;
int mpeg1;
/* XXX: stuff due to xine shit */
int8_t q_scale_type;
};
typedef struct {
mpeg2_fbuf_t fbuf;
} fbuf_alloc_t;
struct mpeg2dec_s {
mpeg2_decoder_t decoder;
mpeg2_info_t info;
uint32_t shift;
int is_display_initialized;
mpeg2_state_t (* action) (struct mpeg2dec_s * mpeg2dec);
mpeg2_state_t state;
uint32_t ext_state;
/* allocated in init - gcc has problems allocating such big structures */
uint8_t * chunk_buffer;
/* pointer to start of the current chunk */
uint8_t * chunk_start;
/* pointer to current position in chunk_buffer */
uint8_t * chunk_ptr;
/* last start code ? */
uint8_t code;
/* picture tags */
uint32_t tag_current, tag2_current, tag_previous, tag2_previous;
int num_tags;
int bytes_since_tag;
int first;
int alloc_index_user;
int alloc_index;
uint8_t first_decode_slice;
uint8_t nb_decode_slices;
unsigned int user_data_len;
mpeg2_sequence_t new_sequence;
mpeg2_sequence_t sequence;
mpeg2_gop_t new_gop;
mpeg2_gop_t gop;
mpeg2_picture_t new_picture;
mpeg2_picture_t pictures[4];
mpeg2_picture_t * picture;
/*const*/ mpeg2_fbuf_t * fbuf[3]; /* 0: current fbuf, 1-2: prediction fbufs */
fbuf_alloc_t fbuf_alloc[3];
int custom_fbuf;
uint8_t * yuv_buf[3][3];
int yuv_index;
mpeg2_convert_t * convert;
void * convert_arg;
unsigned int convert_id_size;
int convert_stride;
void (* convert_start) (void * id, const mpeg2_fbuf_t * fbuf,
const mpeg2_picture_t * picture,
const mpeg2_gop_t * gop);
uint8_t * buf_start;
uint8_t * buf_end;
int16_t display_offset_x, display_offset_y;
int copy_matrix;
int8_t scaled[4]; /* XXX: MOVED */
//int8_t q_scale_type, scaled[4];
uint8_t quantizer_matrix[4][64];
uint8_t new_quantizer_matrix[4][64];
};
typedef struct {
#ifdef ARCH_PPC
uint8_t regv[12*16];
#endif
int dummy;
} cpu_state_t;
/* cpu_accel.c */
uint32_t mpeg2_detect_accel (uint32_t accel);
/* cpu_state.c */
void mpeg2_cpu_state_init (uint32_t accel);
/* decode.c */
mpeg2_state_t mpeg2_seek_header (mpeg2dec_t * mpeg2dec);
mpeg2_state_t mpeg2_parse_header (mpeg2dec_t * mpeg2dec);
/* header.c */
void mpeg2_header_state_init (mpeg2dec_t * mpeg2dec);
void mpeg2_reset_info (mpeg2_info_t * info);
int mpeg2_header_sequence (mpeg2dec_t * mpeg2dec);
int mpeg2_header_gop (mpeg2dec_t * mpeg2dec);
mpeg2_state_t mpeg2_header_picture_start (mpeg2dec_t * mpeg2dec);
int mpeg2_header_picture (mpeg2dec_t * mpeg2dec);
int mpeg2_header_extension (mpeg2dec_t * mpeg2dec);
int mpeg2_header_user_data (mpeg2dec_t * mpeg2dec);
void mpeg2_header_sequence_finalize (mpeg2dec_t * mpeg2dec);
void mpeg2_header_gop_finalize (mpeg2dec_t * mpeg2dec);
void mpeg2_header_picture_finalize (mpeg2dec_t * mpeg2dec, uint32_t accels);
mpeg2_state_t mpeg2_header_slice_start (mpeg2dec_t * mpeg2dec);
mpeg2_state_t mpeg2_header_end (mpeg2dec_t * mpeg2dec);
void mpeg2_set_fbuf (mpeg2dec_t * mpeg2dec, int b_type);
/* idct.c */
extern void mpeg2_idct_init (uint32_t accel);
extern uint8_t mpeg2_scan_norm[64];
extern uint8_t mpeg2_scan_alt[64];
/* idct_mmx.c */
void mpeg2_idct_copy_sse2 (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_sse2 (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_copy_mmxext (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_mmxext (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_copy_mmx (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_mmx (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_mmx_init (void);
/* idct_altivec.c */
void mpeg2_idct_copy_altivec (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_altivec (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_altivec_init (void);
/* idct_alpha.c */
void mpeg2_idct_copy_mvi (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_mvi (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_copy_alpha (int16_t * block, uint8_t * dest, int stride);
void mpeg2_idct_add_alpha (int last, int16_t * block,
uint8_t * dest, int stride);
void mpeg2_idct_alpha_init (void);
/* motion_comp.c */
void mpeg2_mc_init (uint32_t accel);
typedef struct {
mpeg2_mc_fct * put [8];
mpeg2_mc_fct * avg [8];
} mpeg2_mc_t;
#define MPEG2_MC_EXTERN(x) mpeg2_mc_t mpeg2_mc_##x = { \
{MC_put_o_16_##x, MC_put_x_16_##x, MC_put_y_16_##x, MC_put_xy_16_##x, \
MC_put_o_8_##x, MC_put_x_8_##x, MC_put_y_8_##x, MC_put_xy_8_##x}, \
{MC_avg_o_16_##x, MC_avg_x_16_##x, MC_avg_y_16_##x, MC_avg_xy_16_##x, \
MC_avg_o_8_##x, MC_avg_x_8_##x, MC_avg_y_8_##x, MC_avg_xy_8_##x} \
};
extern mpeg2_mc_t mpeg2_mc_c;
extern mpeg2_mc_t mpeg2_mc_mmx;
extern mpeg2_mc_t mpeg2_mc_mmxext;
extern mpeg2_mc_t mpeg2_mc_3dnow;
extern mpeg2_mc_t mpeg2_mc_altivec;
extern mpeg2_mc_t mpeg2_mc_alpha;
extern mpeg2_mc_t mpeg2_mc_vis;
extern mpeg2_mc_t mpeg2_mc_arm;
#endif /* LIBMPEG2_MPEG2_INTERNAL_H */
This diff is collapsed.
......@@ -3,10 +3,3 @@ SOURCES_glx = \
xcommon.c \
xcommon.h \
$(NULL)
SOURCES_xvmc = \
xvmc.c \
xcommon.c \
xcommon.h \
$(NULL)
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment