Commit a519cacc authored by Antoine Cellerier's avatar Antoine Cellerier

Split ffmpeg module in avcodec (decoders, encoders, deinterlacing), avformat...

Split ffmpeg module in avcodec (decoders, encoders, deinterlacing), avformat (demuxers, muxers), swscale (scaling, chroma conversion) and postproc modules.
parent 7f9999df
......@@ -192,7 +192,7 @@ case "${host_os}" in
VLC_ADD_LDFLAGS([mkv mp4], [-Wl,-framework,IOKit,-framework,CoreFoundation])
VLC_ADD_LDFLAGS([vlc],[-Wl,-undefined,dynamic_lookup])
VLC_ADD_LDFLAGS([libvlc_control],[-Wl,dynamic_lookup])
VLC_ADD_LDFLAGS([ffmpeg i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
VLC_ADD_LDFLAGS([avcodec avformat swscale postproc i420_rgb_mmx x264],[-Wl,-read_only_relocs,suppress])
VLC_ADD_CFLAGS([motion],[-fconstant-cfstrings])
VLC_ADD_LDFLAGS([libvlc],[-Wl,-framework,Cocoa,-framework,CoreFoundation])
VLC_ADD_LDFLAGS([motion],[-Wl,-framework,IOKit,-framework,CoreFoundation])
......@@ -645,7 +645,7 @@ AC_CHECK_LIB(m,cos,[
VLC_ADD_LIBS([adjust wave ripple psychedelic gradient a52tofloat32 dtstofloat32 x264 goom visual panoramix rotate noise grain],[-lm])
])
AC_CHECK_LIB(m,pow,[
VLC_ADD_LIBS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm])
VLC_ADD_LIBS([avcodec avformat swscale postproc ffmpegaltivec stream_out_transrate i420_rgb faad twolame equalizer spatializer param_eq libvlc vorbis freetype mod mpc dmo quicktime realaudio realvideo galaktos opengl],[-lm])
])
AC_CHECK_LIB(m,sqrt,[
VLC_ADD_LIBS([headphone_channel_mixer normvol speex mono colorthres extract],[-lm])
......@@ -2993,102 +2993,98 @@ AS_IF([test "${enable_id3tag}" != "no"], [
])
dnl
dnl ffmpeg decoder/demuxer plugin
dnl avcodec decoder/encoder plugin
dnl
dnl we try to find ffmpeg using : 1- given tree, 2- pkg-config
dnl 3- default place,
AC_ARG_ENABLE(ffmpeg,
[ --enable-ffmpeg ffmpeg codec (default enabled)])
if test "${enable_ffmpeg}" != "no"
AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
if test "${enable_avcodec}" != "no"
then
PKG_CHECK_MODULES(AVCODEC,[libavcodec, libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
VLC_ADD_PLUGIN([avcodec])
VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libavcodec or libavutil.])
])
fi
dnl
dnl avformat demuxer/muxer plugin
dnl
dnl Trying with pkg-config
PKG_CHECK_MODULES(FFMPEG,[libavcodec, libavformat, libavutil],
AC_ARG_ENABLE(avformat,
[ --enable-avformat libavformat containers (default enabled)])
if test "${enable_avformat}" != "no"
then
PKG_CHECK_MODULES(AVFORMAT,[libavformat, libavcodec, libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${FFMPEG_CFLAGS}"
CFLAGS="${CFLAGS} ${FFMPEG_CFLAGS}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h libavutil/avutil.h)
dnl newer ffmpeg have a separate libpostproc
PKG_CHECK_MODULES(POSTPROC, libpostproc,[
VLC_ADD_CFLAGS([ffmpeg],[${POSTPROC_CFLAGS}])
VLC_ADD_LIBS([ffmpeg],[${POSTPROC_LIBS}])
])
CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
AC_CHECK_HEADERS(postproc/postprocess.h)
VLC_ADD_PLUGIN([ffmpeg])
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
VLC_ADD_PLUGIN([stream_out_switcher])
fi
VLC_ADD_CFLAGS([ffmpeg stream_out_switcher],[${FFMPEG_CFLAGS}])
VLC_ADD_LIBS([ffmpeg stream_out_switcher],[${FFMPEG_LIBS}])
dnl even newer ffmpeg has a libswscale
PKG_CHECK_MODULES(SWSCALE,[libswscale],[
VLC_ADD_CFLAGS([ffmpeg],[${SWSCALE_CFLAGS}])
VLC_ADD_LIBS([ffmpeg],[${SWSCALE_LIBS}])
AC_CHECK_LIB(swscale, sws_getContext,
[AC_CHECK_HEADERS([ffmpeg/swscale.h libswscale/swscale.h])],
[AC_CHECK_LIB(avcodec,img_resample,[],
[AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
[${FFMPEG_LIBS}])
],
[${SWSCALE_LIBS}])
],[AC_CHECK_LIB(avcodec,img_resample,[],
[AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
[${FFMPEG_LIBS}])
]
)
VLC_RESTORE_FLAGS
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${AVFORMAT_CFLAGS}"
CFLAGS="${CFLAGS} ${AVFORMAT_CFLAGS}"
AC_CHECK_HEADERS(libavformat/avformat.h ffmpeg/avformat.h)
AC_CHECK_HEADERS(libavcodec/avcodec.h ffmpeg/avcodec.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
VLC_ADD_PLUGIN([avformat])
VLC_ADD_LIBS([avformat],[$AVFORMAT_LIBS])
VLC_ADD_CFLAGS([avformat],[$AVFORMAT_CFLAGS])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libavformat, libavcodec or libavutil.])
])
fi
],[
dnl
dnl swscale image scaling and conversion plugin
dnl
dnl
dnl last chance: at the default place
dnl
AC_ARG_ENABLE(swscale,
[ --enable-swscale libswscale image scaling and conversion (default enabled)])
if test "${enable_swscale}" != "no"
then
PKG_CHECK_MODULES(SWSCALE,[libswscale, libavutil],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_ffmpeg}"
LDFLAGS="${LDFLAGS_save} ${LDFLAGS_ffmpeg} ${LIBS_ffmpeg}"
AC_CHECK_HEADERS(ffmpeg/avcodec.h libavcodec/avcodec.h)
AC_CHECK_HEADERS(ffmpeg/avformat.h libavformat/avformat.h)
AC_CHECK_HEADERS(ffmpeg/avutil.h libavutil/avutil.h)
AC_CHECK_HEADERS(postproc/postprocess.h)
AC_CHECK_LIB(avutil, av_crc_init, [
VLC_ADD_LIBS([ffmpeg],[-lavutil])
LDAVUTIL="-lavutil"])
AC_CHECK_LIB(avcodec, avcodec_init, [
VLC_ADD_BUILTINS([ffmpeg])
VLC_ADD_LIBS([ffmpeg],[-lavcodec])
if test "${enable_sout}" != "no" -a "${enable_switcher}" = "yes"; then
VLC_ADD_BUILTINS([stream_out_switcher])
fi],
[ AC_MSG_ERROR([Could not find ffmpeg on your system: you may get it from http://ffmpeg.sf.net/ (svn version is recommended). Alternatively you can use --disable-ffmpeg to disable the ffmpeg plugins.]) ], [$LDAVUTIL])
AC_CHECK_LIB(postproc, pp_postprocess, [
VLC_ADD_LIBS([ffmpeg],[-lpostproc])],
AC_MSG_ERROR([Could not find libpostproc inside FFmpeg. You should configure FFmpeg with --enable-gpl --enable-postproc.]),
[$LDAVUTIL])
AC_CHECK_LIB(avformat, av_open_input_stream, [
VLC_ADD_LIBS([ffmpeg],[-lavformat -lz]) ], [], [-lavcodec -lz $LDAVUTIL])
CPPFLAGS="${CPPFLAGS} ${SWSCALE_CFLAGS}"
CFLAGS="${CFLAGS} ${SWSCALE_CFLAGS}"
AC_CHECK_HEADERS(libswscale/swscale.h ffmpeg/swscale.h)
AC_CHECK_HEADERS(libavutil/avutil.h ffmpeg/avutil.h)
VLC_ADD_PLUGIN([swscale])
VLC_ADD_LIBS([swscale],[$SWSCALE_LIBS])
VLC_ADD_CFLAGS([swscale],[$SWSCALE_CFLAGS])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libswscale or libavutil.])
])
fi
AC_CHECK_LIB(swscale, sws_getContext, [
AC_CHECK_HEADERS(ffmpeg/swscale.h libswscale/swscale.h)
VLC_ADD_LIBS([ffmpeg],[-lswscale]) ],
[AC_CHECK_LIB(avcodec,img_resample,[],
[AC_MSG_ERROR([Your FFmpeg library doesn't have the needed img_resample() function. You should rebuild it with software scaler disabled, or install the swscale headers.])],
[-lavcodec $LDAVUTIL])
],
[${SWSCALE_LIBS}])
dnl
dnl postproc plugin
dnl
AC_ARG_ENABLE(postproc,
[ --enable-postproc libpostproc image post-processing (default enabled)])
if test "${enable_postproc}" != "no"
then
PKG_CHECK_MODULES(POSTPROC,[libpostproc],
[
VLC_SAVE_FLAGS
CPPFLAGS="${CPPFLAGS} ${POSTPROC_CFLAGS}"
CFLAGS="${CFLAGS} ${POSTPROC_CFLAGS}"
AC_CHECK_HEADERS(libpostproc/postproc.h ffmpeg/postproc.h)
VLC_ADD_PLUGIN([postproc])
VLC_ADD_LIBS([postproc],[$POSTPROC_LIBS])
VLC_ADD_CFLAGS([postproc],[$POSTPROC_CFLAGS])
VLC_RESTORE_FLAGS
],[
AC_MSG_ERROR([Could not find libpostproc.])
])
fi
......
SOURCES_ffmpeg = \
ffmpeg.c \
ffmpeg.h \
SOURCES_avcodec = \
avcodec.c \
avcodec.h \
video.c \
audio.c \
video_filter.c \
deinterlace.c \
chroma.c \
postprocess.c \
demux.c \
scale.c \
$(NULL)
EXTRA_libffmpeg_plugin_la_SOURCES = \
mux.c \
if ENABLE_SOUT
SOURCES_avcodec += encoder.c
endif
EXTRA_libavcodec_plugin_la_SOURCES = \
encoder.c \
$(NULL)
SOURCES_avformat = \
avformat.c \
avformat.h \
demux.c \
$(NULL)
if ENABLE_SOUT
SOURCES_ffmpeg += mux.c encoder.c
SOURCES_avformat += mux.c
endif
libvlc_LTLIBRARIES += $(LTLIBffmpeg)
EXTRA_LTLIBRARIES += libffmpeg_plugin.la
SOURCES_ffmpegaltivec = \
ffmpeg.c \
ffmpeg.h \
video.c \
audio.c \
EXTRA_libavformat_plugin_la_SOURCES = \
mux.c \
$(NULL)
SOURCES_swscale = \
swscale.c \
swscale.h \
video_filter.c \
deinterlace.c \
chroma.c \
encoder.c \
postprocess.c \
demux.c \
mux.c \
scale.c \
$(NULL)
SOURCES_postproc = \
postproc.c \
postprocess.c \
$(NULL)
libvlc_LTLIBRARIES += \
$(LTLIBavcodec) \
$(LTLIBavformat) \
$(LTLIBswscale) \
$(LTLIBpostproc)
EXTRA_LTLIBRARIES += \
libavcodec_plugin.la \
libavformat_plugin.la \
libswscale_plugin.la \
libpostproc_plugin.la
# FIXME SOURCES_ffmpegaltivec = \
# FIXME ffmpeg.c \
# FIXME ffmpeg.h \
# FIXME video.c \
# FIXME audio.c \
# FIXME video_filter.c \
# FIXME deinterlace.c \
# FIXME chroma.c \
# FIXME encoder.c \
# FIXME postprocess.c \
# FIXME demux.c \
# FIXME mux.c \
# FIXME scale.c \
# FIXME $(NULL)
This diff is collapsed.
/*****************************************************************************
* avformat.c: demuxer and muxer using libavformat library
*****************************************************************************
* Copyright (C) 1999-2008 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@videolan.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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_codec.h>
/* ffmpeg header */
#define HAVE_MMX 1
#ifdef HAVE_LIBAVCODEC_AVCODEC_H
# include <libavcodec/avcodec.h>
#elif defined(HAVE_FFMPEG_AVCODEC_H)
# include <ffmpeg/avcodec.h>
#else
# include <avcodec.h>
#endif
#if LIBAVCODEC_BUILD < 5000
# error You must have a libavcodec >= 5000 (get CVS)
#endif
#include "ffmpeg.h"
/****************************************************************************
* Local prototypes
****************************************************************************/
/*****************************************************************************
* Module descriptor
*****************************************************************************/
vlc_module_begin();
add_shortcut( "ffmpeg" );
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_SCODEC );
set_description( N_("FFmpeg demuxer" ) );
set_capability( "demux", 2 );
set_callbacks( OpenDemux, CloseDemux );
#ifdef ENABLE_SOUT
/* mux submodule */
add_submodule();
set_description( N_("FFmpeg muxer" ) );
set_capability( "sout mux", 2 );
add_string( "ffmpeg-mux", NULL, NULL, MUX_TEXT,
MUX_LONGTEXT, true );
set_callbacks( OpenMux, CloseMux );
#endif
vlc_module_end();
/*****************************************************************************
*
*****************************************************************************/
void LibavcodecCallback( void *p_opaque, int i_level,
const char *psz_format, va_list va )
{
int i_vlc_level;
AVCodecContext *p_avctx = (AVCodecContext *)p_opaque;
AVClass *p_avc;
vlc_object_t *p_this;
char *psz_new_format;
const char *psz_item_name;
p_avc = p_avctx ? p_avctx->av_class : 0;
#define cln p_avc->class_name
/* Make sure we can get p_this back */
if( !p_avctx || !p_avc || !cln ||
cln[0]!='A' || cln[1]!='V' || cln[2]!='C' || cln[3]!='o' ||
cln[4]!='d' || cln[5]!='e' || cln[6]!='c' )
{
if( i_level == AV_LOG_ERROR ) vfprintf( stderr, psz_format, va );
return;
}
#undef cln
p_this = (vlc_object_t *)p_avctx->opaque;
switch( i_level )
{
case AV_LOG_QUIET:
i_vlc_level = VLC_MSG_ERR;
break;
case AV_LOG_ERROR:
i_vlc_level = VLC_MSG_WARN;
break;
case AV_LOG_INFO:
i_vlc_level = VLC_MSG_DBG;
break;
case AV_LOG_DEBUG:
/* Print debug messages if they were requested */
if( p_avctx->debug ) vfprintf( stderr, psz_format, va );
return;
default:
return;
}
psz_item_name = p_avc->item_name(p_opaque);
psz_new_format = malloc( strlen(psz_format) + strlen(psz_item_name)
+ 18 + 5 );
snprintf( psz_new_format, strlen(psz_format) + strlen(psz_item_name)
+ 18 + 5, "%s (%s@%p)", psz_format, p_avc->item_name(p_opaque), p_opaque );
msg_GenericVa( p_this, i_vlc_level,
MODULE_STRING, psz_new_format, va );
free( psz_new_format );
}
void InitLibavcodec( vlc_object_t *p_object )
{
static int b_ffmpeginit = 0;
vlc_mutex_t *lock = var_AcquireMutex( "avcodec" );
/* *** init ffmpeg library (libavcodec) *** */
if( !b_ffmpeginit )
{
avcodec_init();
avcodec_register_all();
av_log_set_callback( LibavcodecCallback );
b_ffmpeginit = 1;
msg_Dbg( p_object, "libavcodec initialized (interface %d )",
LIBAVCODEC_VERSION_INT );
}
else
{
msg_Dbg( p_object, "libavcodec already initialized" );
}
vlc_mutex_unlock( lock );
}
/*****************************************************************************
* Chroma fourcc -> ffmpeg_id mapping
*****************************************************************************/
static struct
{
vlc_fourcc_t i_chroma;
int i_chroma_id;
} chroma_table[] =
{
/* Planar YUV formats */
{ VLC_FOURCC('Y','U','V','A'), PIX_FMT_YUV444P }, /* Hack */
{ VLC_FOURCC('I','4','4','4'), PIX_FMT_YUV444P },
{ VLC_FOURCC('J','4','4','4'), PIX_FMT_YUVJ444P },
{ VLC_FOURCC('I','4','2','2'), PIX_FMT_YUV422P },
{ VLC_FOURCC('J','4','2','2'), PIX_FMT_YUVJ422P },
{ VLC_FOURCC('I','4','2','0'), PIX_FMT_YUV420P },
{ VLC_FOURCC('Y','V','1','2'), PIX_FMT_YUV420P },
{ VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P },
{ VLC_FOURCC('J','4','2','0'), PIX_FMT_YUVJ420P },
{ VLC_FOURCC('I','4','1','1'), PIX_FMT_YUV411P },
{ VLC_FOURCC('I','4','1','0'), PIX_FMT_YUV410P },
{ VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P },
/* Packed YUV formats */
{ VLC_FOURCC('Y','U','Y','2'), PIX_FMT_YUV422 },
{ VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUV422 },
{ VLC_FOURCC('U','Y','V','Y'), PIX_FMT_UYVY422 },
/* Packed RGB formats */
#if defined(WORDS_BIGENDIAN)
{ VLC_FOURCC('R','G','B','8'), PIX_FMT_BGR8 },
{ VLC_FOURCC('R','V','1','5'), PIX_FMT_BGR555 },
{ VLC_FOURCC('R','V','1','6'), PIX_FMT_BGR565 },
{ VLC_FOURCC('R','V','2','4'), PIX_FMT_BGR24 },
#else
#if defined(PIX_FMT_RGB8)
{ VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8 },
#endif
{ VLC_FOURCC('R','V','1','5'), PIX_FMT_RGB555 },
{ VLC_FOURCC('R','V','1','6'), PIX_FMT_RGB565 },
{ VLC_FOURCC('R','V','2','4'), PIX_FMT_RGB24 },
#endif
{ VLC_FOURCC('R','V','3','2'), PIX_FMT_RGBA32 },
#if defined(PIX_FMT_RGBA)
{ VLC_FOURCC('R','G','B','A'), PIX_FMT_RGBA },
#endif
{ VLC_FOURCC('G','R','E','Y'), PIX_FMT_GRAY8 },
{ 0, 0 }
};
int GetFfmpegChroma( vlc_fourcc_t i_chroma )
{
int i;
for( i = 0; chroma_table[i].i_chroma != 0; i++ )
{
if( chroma_table[i].i_chroma == i_chroma )
return chroma_table[i].i_chroma_id;
}
return -1;
}
vlc_fourcc_t GetVlcChroma( int i_ffmpeg_chroma )
{
int i;
for( i = 0; chroma_table[i].i_chroma != 0; i++ )
{
if( chroma_table[i].i_chroma_id == i_ffmpeg_chroma )
return chroma_table[i].i_chroma;
}
return 0;
}
/*****************************************************************************
* Codec fourcc -> ffmpeg_id mapping
*****************************************************************************/
static struct
{
vlc_fourcc_t i_fourcc;
int i_codec;
int i_cat;
const char *psz_name;
} codecs_table[] =
{
/*
* Video Codecs
*/
/* MPEG-1 Video */
{ VLC_FOURCC('m','p','1','v'), CODEC_ID_MPEG1VIDEO,
VIDEO_ES, "MPEG-1 Video" },
{ VLC_FOURCC('m','p','e','g'), CODEC_ID_MPEG1VIDEO,
VIDEO_ES, "MPEG-1 Video" },
{ VLC_FOURCC('m','p','g','1'), CODEC_ID_MPEG1VIDEO,
VIDEO_ES, "MPEG-1 Video" },
{ VLC_FOURCC('P','I','M','1'), CODEC_ID_MPEG1VIDEO,
VIDEO_ES, "Pinnacle DC1000 (MPEG-1 Video)" },
/* MPEG-2 Video */
{ VLC_FOURCC('m','p','2','v'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG-2 Video" },
{ VLC_FOURCC('M','P','E','G'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG-2 Video" },
{ VLC_FOURCC('m','p','g','v'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG-2 Video" },
{ VLC_FOURCC('m','p','g','2'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG-2 Video" },
{ VLC_FOURCC('h','d','v','1'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "HDV 720p30 (MPEG-2 Video)" },
{ VLC_FOURCC('h','d','v','2'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "Sony HDV (MPEG-2 Video)" },
{ VLC_FOURCC('h','d','v','3'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "FCP HDV (MPEG-2 Video)" },
{ VLC_FOURCC('h','d','v','5'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "HDV 720p25 (MPEG-2 Video)" },
{ VLC_FOURCC('m','x','5','n'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX NTSC 525/60 50mb/s (FCP)" },
{ VLC_FOURCC('m','x','5','p'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX PAL 625/60 50mb/s (FCP)" },
{ VLC_FOURCC('m','x','4','n'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX NTSC 525/60 40mb/s (FCP)" },
{ VLC_FOURCC('m','x','4','p'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX PAL 625/50 40mb/s (FCP)" },
{ VLC_FOURCC('m','x','3','n'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX NTSC 525/60 30mb/s (FCP)" },
{ VLC_FOURCC('m','x','3','p'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "MPEG2 IMX NTSC 625/50 30mb/s (FCP)" },
{ VLC_FOURCC('x','d','v','2'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "XDCAM HD 1080i60" },
{ VLC_FOURCC('A','V','m','p'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "AVID IMX PAL" },
/* ATI VCR2 */
{ VLC_FOURCC('V','C','R','2'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "ATI VCR2 Video" },
{ VLC_FOURCC('M','M','E','S'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "Matrox MPEG-2" },
{ VLC_FOURCC('m','m','e','s'), CODEC_ID_MPEG2VIDEO,
VIDEO_ES, "Matrox MPEG-2" },
/* MPEG-4 Video */
{ VLC_FOURCC('D','I','V','X'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('d','i','v','x'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('M','P','4','S'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('m','p','4','s'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('M','4','S','2'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('m','4','s','2'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
/* XVID flavours */
{ VLC_FOURCC('x','v','i','d'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('X','V','I','D'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('X','v','i','D'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('X','V','I','X'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('x','v','i','x'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
/* DX50 */
{ VLC_FOURCC('D','X','5','0'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('d','x','5','0'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('B','L','Z','0'), CODEC_ID_MPEG4,
VIDEO_ES, "Blizzard MPEG-4 Video" },
{ VLC_FOURCC('D','X','G','M'), CODEC_ID_MPEG4,
VIDEO_ES, "Electronic Arts Game MPEG-4 Video" },
{ VLC_FOURCC('m','p','4','v'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('M','P','4','V'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC( 4, 0, 0, 0 ), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('m','4','c','c'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('M','4','C','C'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('F','M','P','4'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('f','m','p','4'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
/* 3ivx delta 3.5 Unsupported
* putting it here gives extreme distorted images
{ VLC_FOURCC('3','I','V','1'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('3','i','v','1'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" }, */
/* 3ivx delta 4 */
{ VLC_FOURCC('3','I','V','2'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('3','i','v','2'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('U','M','P','4'), CODEC_ID_MPEG4,
VIDEO_ES, "UB MPEG-4 Video" },
{ VLC_FOURCC('W','V','1','F'), CODEC_ID_MPEG4,
VIDEO_ES, "MPEG-4 Video" },
{ VLC_FOURCC('S','E','D','G'), CODEC_ID_MPEG4,
VIDEO_ES, "Samsung MPEG-4 Video" },
{ VLC_FOURCC('R','M','P','4'), CODEC_ID_MPEG4,
VIDEO_ES, "REALmagic MPEG-4 Video" },
{ VLC_FOURCC('H','D','X','4'), CODEC_ID_MPEG4,
VIDEO_ES, "Jomigo HDX4 (MPEG-4 Video)" },
{ VLC_FOURCC('h','d','x','4'), CODEC_ID_MPEG4,
VIDEO_ES, "Jomigo HDX4 (MPEG-4 Video)" },
{ VLC_FOURCC('S','M','P','4'), CODEC_ID_MPEG4,
VIDEO_ES, "Samsung SMP4 (MPEG-4 Video)" },
{ VLC_FOURCC('f','v','f','w'), CODEC_ID_MPEG4,
VIDEO_ES, "FFmpeg MPEG-4" },
{ VLC_FOURCC('F','V','F','W'), CODEC_ID_MPEG4,
VIDEO_ES, "FFmpeg MPEG-4" },
/* MSMPEG4 v1 */
{ VLC_FOURCC('D','I','V','1'), CODEC_ID_MSMPEG4V1,
VIDEO_ES, "MS MPEG-4 Video v1" },
{ VLC_FOURCC('d','i','v','1'), CODEC_ID_MSMPEG4V1,
VIDEO_ES, "MS MPEG-4 Video v1" },
{ VLC_FOURCC('M','P','G','4'), CODEC_ID_MSMPEG4V1,
VIDEO_ES, "MS MPEG-4 Video v1" },
{ VLC_FOURCC('m','p','g','4'), CODEC_ID_MSMPEG4V1,
VIDEO_ES, "MS MPEG-4 Video v1" },
/* MSMPEG4 v2 */
{ VLC_FOURCC('D','I','V','2'), CODEC_ID_MSMPEG4V2,
VIDEO_ES, "MS MPEG-4 Video v2" },
{ VLC_FOURCC('d','i','v','2'), CODEC_ID_MSMPEG4V2,
VIDEO_ES, "MS MPEG-4 Video v2" },
{ VLC_FOURCC('M','P','4','2'), CODEC_ID_MSMPEG4V2,
VIDEO_ES, "MS MPEG-4 Video v2" },
{ VLC_FOURCC('m','p','4','2'), CODEC_ID_MSMPEG4V2,
VIDEO_ES, "MS MPEG-4 Video v2" },
/* MSMPEG4 v3 / M$ mpeg4 v3 */
{ VLC_FOURCC('M','P','G','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('m','p','g','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('d','i','v','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('M','P','4','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('m','p','4','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
/* DivX 3.20 */
{ VLC_FOURCC('D','I','V','3'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('D','I','V','4'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('d','i','v','4'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('D','I','V','5'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('d','i','v','5'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('D','I','V','6'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('d','i','v','6'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
/* Cool Codec */
{ VLC_FOURCC('C','O','L','1'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('c','o','l','1'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('C','O','L','0'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('c','o','l','0'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
/* AngelPotion stuff */
{ VLC_FOURCC('A','P','4','1'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
/* 3ivx doctered divx files */
{ VLC_FOURCC('3','I','V','D'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },
{ VLC_FOURCC('3','i','v','d'), CODEC_ID_MSMPEG4V3,
VIDEO_ES, "MS MPEG-4 Video v3" },