Commit b538efdf authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

Fix linking postproc

parent 135b7417
......@@ -37,7 +37,6 @@ SOURCES_swscale = \
$(NULL)
SOURCES_postproc = \
postproc.c \
postprocess.c \
$(NULL)
......
/*****************************************************************************
* ffmpeg.c: video decoder using ffmpeg library
*****************************************************************************
* Copyright (C) 1999-2001 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"
#ifdef HAVE_POSTPROC_POSTPROCESS_H
# include <postproc/postprocess.h>
#else
# include <libpostproc/postprocess.h>
#endif
/*****************************************************************************
* decoder_sys_t: decoder descriptor
*****************************************************************************/
struct decoder_sys_t
{
/* Common part between video and audio decoder */
FFMPEG_COMMON_MEMBERS
};
/****************************************************************************
* Local prototypes
****************************************************************************/
static int OpenDecoder( vlc_object_t * );
static void CloseDecoder( vlc_object_t * );
static const int nloopf_list[] = { 0, 1, 2, 3, 4 };
static const char *const nloopf_list_text[] =
{ N_("None"), N_("Non-ref"), N_("Bidir"), N_("Non-key"), N_("All") };
#ifdef ENABLE_SOUT
static const char *const enc_hq_list[] = { "rd", "bits", "simple" };
static const char *const enc_hq_list_text[] = {
N_("rd"), N_("bits"), N_("simple") };
#endif
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
static const int pi_mode_values[] = { 0, 1, 2, 4, 8, 5, 6, 9, 10 };
static const char *const ppsz_mode_descriptions[] =
{ N_("Fast bilinear"), N_("Bilinear"), N_("Bicubic (good quality)"),
N_("Experimental"), N_("Nearest neighbour (bad quality)"),
N_("Area"), N_("Luma bicubic / chroma bilinear"), N_("Gauss"),
N_("SincR"), N_("Lanczos"), N_("Bicubic spline") };
#endif
/*****************************************************************************
* Module descriptor
*****************************************************************************/
#define MODULE_DESCRIPTION N_( "Various audio and video decoders/encoders" \
"delivered by the FFmpeg library. This includes (MS)MPEG4, DivX, SV1,"\
"H261, H263, H264, WMV, WMA, AAC, AMR, DV, MJPEG and other codecs")
vlc_module_begin();
set_shortname( "FFmpeg");
set_category( CAT_INPUT );
set_subcategory( SUBCAT_INPUT_SCODEC );
/* decoder main module */
#if defined(MODULE_NAME_is_ffmpegaltivec) \
|| (defined(CAN_COMPILE_ALTIVEC) && !defined(NO_ALTIVEC_IN_FFMPEG))
set_description( N_("AltiVec FFmpeg audio/video decoder/encoder ((MS)MPEG4,SVQ1,H263,WMV,WMA)") );
/*add_requirement( ALTIVEC );*/
set_capability( "decoder", 71 );
#else
set_description( N_("FFmpeg audio/video decoders/encoders") );
set_help( MODULE_DESCRIPTION );
set_capability( "decoder", 70 );
#endif
set_section( N_("Decoding") , NULL );
set_callbacks( OpenDecoder, CloseDecoder );
add_bool( "ffmpeg-dr", 1, NULL, DR_TEXT, DR_TEXT, true );
add_integer ( "ffmpeg-error-resilience", 1, NULL, ERROR_TEXT,
ERROR_LONGTEXT, true );
add_integer ( "ffmpeg-workaround-bugs", 1, NULL, BUGS_TEXT, BUGS_LONGTEXT,
false );
add_bool( "ffmpeg-hurry-up", 1, NULL, HURRYUP_TEXT, HURRYUP_LONGTEXT,
false );
add_integer( "ffmpeg-skip-frame", 0, NULL, SKIP_FRAME_TEXT,
SKIP_FRAME_LONGTEXT, true );
change_integer_range( -1, 4 );
add_integer( "ffmpeg-skip-idct", 0, NULL, SKIP_IDCT_TEXT,
SKIP_IDCT_LONGTEXT, true );
change_integer_range( -1, 4 );
add_integer ( "ffmpeg-vismv", 0, NULL, VISMV_TEXT, VISMV_LONGTEXT,
true );
add_integer ( "ffmpeg-lowres", 0, NULL, LOWRES_TEXT, LOWRES_LONGTEXT,
true );
change_integer_range( 0, 2 );
add_integer ( "ffmpeg-skiploopfilter", 0, NULL, SKIPLOOPF_TEXT,
SKIPLOOPF_LONGTEXT, true );
change_integer_list( nloopf_list, nloopf_list_text, 0 );
add_integer( "ffmpeg-pp-q", 0, NULL, PP_Q_TEXT, PP_Q_LONGTEXT, false );
add_string( "ffmpeg-pp-name", "default", NULL, LIBAVCODEC_PP_TEXT,
LIBAVCODEC_PP_LONGTEXT, true );
add_integer( "ffmpeg-debug", 0, NULL, DEBUG_TEXT, DEBUG_LONGTEXT,
true );
#ifdef ENABLE_SOUT
/* encoder submodule */
add_submodule();
set_section( N_("Encoding") , NULL );
set_description( N_("FFmpeg audio/video encoder") );
set_capability( "encoder", 100 );
set_callbacks( OpenEncoder, CloseEncoder );
add_string( ENC_CFG_PREFIX "hq", "simple", NULL, ENC_HQ_TEXT,
ENC_HQ_LONGTEXT, false );
change_string_list( enc_hq_list, enc_hq_list_text, 0 );
add_integer( ENC_CFG_PREFIX "keyint", 0, NULL, ENC_KEYINT_TEXT,
ENC_KEYINT_LONGTEXT, false );
add_integer( ENC_CFG_PREFIX "bframes", 0, NULL, ENC_BFRAMES_TEXT,
ENC_BFRAMES_LONGTEXT, false );
add_bool( ENC_CFG_PREFIX "hurry-up", 0, NULL, ENC_HURRYUP_TEXT,
ENC_HURRYUP_LONGTEXT, false );
add_bool( ENC_CFG_PREFIX "interlace", 0, NULL, ENC_INTERLACE_TEXT,
ENC_INTERLACE_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "interlace-me", 1, NULL, ENC_INTERLACE_ME_TEXT,
ENC_INTERLACE_ME_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "vt", 0, NULL, ENC_VT_TEXT,
ENC_VT_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "pre-me", 0, NULL, ENC_PRE_ME_TEXT,
ENC_PRE_ME_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "strict-rc", 0, NULL, ENC_RC_STRICT_TEXT,
ENC_RC_STRICT_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "rc-buffer-size", 224*1024*8, NULL,
ENC_RC_BUF_TEXT, ENC_RC_BUF_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "rc-buffer-aggressivity", 1.0, NULL,
ENC_RC_BUF_AGGR_TEXT, ENC_RC_BUF_AGGR_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "i-quant-factor", 0, NULL,
ENC_IQUANT_FACTOR_TEXT, ENC_IQUANT_FACTOR_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "noise-reduction", 0, NULL,
ENC_NOISE_RED_TEXT, ENC_NOISE_RED_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "mpeg4-matrix", 0, NULL,
ENC_MPEG4_MATRIX_TEXT, ENC_MPEG4_MATRIX_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "qmin", 0, NULL,
ENC_QMIN_TEXT, ENC_QMIN_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "qmax", 0, NULL,
ENC_QMAX_TEXT, ENC_QMAX_LONGTEXT, true );
add_bool( ENC_CFG_PREFIX "trellis", 0, NULL,
ENC_TRELLIS_TEXT, ENC_TRELLIS_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "qscale", 0, NULL,
ENC_QSCALE_TEXT, ENC_QSCALE_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "strict", 0, NULL,
ENC_STRICT_TEXT, ENC_STRICT_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "lumi-masking", 0.0, NULL,
ENC_LUMI_MASKING_TEXT, ENC_LUMI_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "dark-masking", 0.0, NULL,
ENC_DARK_MASKING_TEXT, ENC_DARK_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "p-masking", 0.0, NULL,
ENC_P_MASKING_TEXT, ENC_P_MASKING_LONGTEXT, true );
add_float( ENC_CFG_PREFIX "border-masking", 0.0, NULL,
ENC_BORDER_MASKING_TEXT, ENC_BORDER_MASKING_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "luma-elim-threshold", 0, NULL,
ENC_LUMA_ELIM_TEXT, ENC_LUMA_ELIM_LONGTEXT, true );
add_integer( ENC_CFG_PREFIX "chroma-elim-threshold", 0, NULL,
ENC_CHROMA_ELIM_TEXT, ENC_CHROMA_ELIM_LONGTEXT, true );
#if LIBAVCODEC_VERSION_INT >= ((51<<16)+(40<<8)+4)
/* Audio AAC encoder profile */
add_string( ENC_CFG_PREFIX "aac-profile", "main", NULL,
ENC_PROFILE_TEXT, ENC_PROFILE_LONGTEXT, true );
#endif
#endif /* ENABLE_SOUT */
#if defined(HAVE_LIBAVFORMAT_AVFORMAT_H) || defined(HAVE_FFMPEG_AVFORMAT_H)
/* demux submodule */
add_submodule();
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
#endif
#if defined(HAVE_LIBSWSCALE_SWSCALE_H) || defined(HAVE_FFMPEG_SWSCALE_H)
/* video filter submodule */
add_submodule();
set_description( N_("Video scaling filter") );
set_capability( "video filter2", 1000 );
set_category( CAT_VIDEO );
set_subcategory( SUBCAT_VIDEO_VFILTER );
set_callbacks( OpenScaler, CloseScaler );
add_integer( "swscale-mode", 0, NULL, SCALEMODE_TEXT, SCALEMODE_LONGTEXT, true );
change_integer_list( pi_mode_values, ppsz_mode_descriptions, 0 );
#else
/* video filter submodule */
add_submodule();
set_capability( "video filter2", 50 );
set_callbacks( OpenFilter, CloseFilter );
set_description( N_("FFmpeg video filter") );
/* crop/padd submodule */
add_submodule();
set_capability( "crop padd", 10 );
set_callbacks( OpenCropPadd, CloseFilter );
set_description( N_("FFmpeg crop padd filter") );
/* chroma conversion submodule */
add_submodule();
set_capability( "chroma", 50 );
set_callbacks( OpenChroma, CloseChroma );
set_description( N_("FFmpeg chroma conversion") );
#endif
/* video filter submodule */
add_submodule();
set_capability( "video filter2", 0 );
set_callbacks( OpenDeinterlace, CloseDeinterlace );
set_description( N_("FFmpeg deinterlace video filter") );
add_shortcut( "ffmpeg-deinterlace" );
vlc_module_end();
/*****************************************************************************
* OpenDecoder: probe the decoder and return score
*****************************************************************************/
static int OpenDecoder( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t*) p_this;
int i_cat, i_codec_id, i_result;
const char *psz_namecodec;
AVCodecContext *p_context = NULL;
AVCodec *p_codec = NULL;
/* *** determine codec type *** */
if( !GetFfmpegCodec( p_dec->fmt_in.i_codec, &i_cat, &i_codec_id,
&psz_namecodec ) )
{
return VLC_EGENERIC;
}
/* Bail out if buggy decoder */
if( i_codec_id == CODEC_ID_AAC )
{
msg_Dbg( p_dec, "refusing to use ffmpeg's (%s) decoder which is buggy",
psz_namecodec );
return VLC_EGENERIC;
}
/* Initialization must be done before avcodec_find_decoder() */
InitLibavcodec(p_this);
/* *** ask ffmpeg for a decoder *** */
p_codec = avcodec_find_decoder( i_codec_id );
if( !p_codec )
{
msg_Dbg( p_dec, "codec not found (%s)", psz_namecodec );
return VLC_EGENERIC;
}
/* *** get a p_context *** */
p_context = avcodec_alloc_context();
if( !p_context )
return VLC_ENOMEM;
p_context->debug = config_GetInt( p_dec, "ffmpeg-debug" );
p_context->opaque = (void *)p_this;
/* Set CPU capabilities */
unsigned i_cpu = vlc_CPU();
p_context->dsp_mask = 0;
if( !(i_cpu & CPU_CAPABILITY_MMX) )
{
p_context->dsp_mask |= FF_MM_MMX;
}
if( !(i_cpu & CPU_CAPABILITY_MMXEXT) )
{
p_context->dsp_mask |= FF_MM_MMXEXT;
}
if( !(i_cpu & CPU_CAPABILITY_3DNOW) )
{
p_context->dsp_mask |= FF_MM_3DNOW;
}
if( !(i_cpu & CPU_CAPABILITY_SSE) )
{
p_context->dsp_mask |= FF_MM_SSE;
}
if( !(i_cpu & CPU_CAPABILITY_SSE2) )
{
p_context->dsp_mask |= FF_MM_SSE2;
}
p_dec->b_need_packetized = true;
switch( i_cat )
{
case VIDEO_ES:
p_dec->pf_decode_video = DecodeVideo;
i_result = InitVideoDec ( p_dec, p_context, p_codec,
i_codec_id, psz_namecodec );
break;
case AUDIO_ES:
p_dec->pf_decode_audio = DecodeAudio;
i_result = InitAudioDec ( p_dec, p_context, p_codec,
i_codec_id, psz_namecodec );
break;
default:
i_result = VLC_EGENERIC;
}
if( i_result == VLC_SUCCESS ) p_dec->p_sys->i_cat = i_cat;
return i_result;
}
/*****************************************************************************
* CloseDecoder: decoder destruction
*****************************************************************************/
static void CloseDecoder( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t *)p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
switch( p_sys->i_cat )
{
case AUDIO_ES:
EndAudioDec ( p_dec );
break;
case VIDEO_ES:
EndVideoDec ( p_dec );
break;
}
if( p_sys->p_context )
{
vlc_mutex_t *lock;
if( p_sys->p_context->extradata )
free( p_sys->p_context->extradata );
p_sys->p_context->extradata = NULL;
lock = var_AcquireMutex( "avcodec" );
avcodec_close( p_sys->p_context );
vlc_mutex_unlock( lock );
msg_Dbg( p_dec, "ffmpeg codec (%s) stopped", p_sys->psz_namecodec );
av_free( p_sys->p_context );
}
free( p_sys );
}
/*****************************************************************************
*
*****************************************************************************/
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)" },