[MPlayer-cvslog] r30174 - in trunk: Changelog configure etc/codecs.conf libmpdemux/demux_mf.c

reimar subversion at mplayerhq.hu
Sun Jan 3 01:58:56 CET 2010


Author: reimar
Date: Sun Jan  3 01:58:56 2010
New Revision: 30174

Log:
Add support for JPEG2000 via FFmpeg/OpenJPEG

Modified:
   trunk/Changelog
   trunk/configure
   trunk/etc/codecs.conf
   trunk/libmpdemux/demux_mf.c

Modified: trunk/Changelog
==============================================================================
--- trunk/Changelog	Sun Jan  3 01:50:15 2010	(r30173)
+++ trunk/Changelog	Sun Jan  3 01:58:56 2010	(r30174)
@@ -14,6 +14,7 @@ MPlayer (1.0)
     * h264 decoder (CoreAVC) on Windows only via binary DLL
     * Kega Game video codec (KGV1) via binary DLL
     * SoftLab-NSK Forward MPEG2 I-frames (SLIF) via binary DLL
+    * JPEG2000 support via OpenJPEG
 
     Demuxers:
     * support for TrueHD in BluRay streams in libmpdemux

Modified: trunk/configure
==============================================================================
--- trunk/configure	Sun Jan  3 01:50:15 2010	(r30173)
+++ trunk/configure	Sun Jan  3 01:58:56 2010	(r30174)
@@ -343,6 +343,7 @@ Codecs:
   --disable-musepack        disable musepack support [autodetect]
   --disable-libopencore_amrnb disable libopencore_amr narrowband [autodetect]
   --disable-libopencore_amrwb disable libopencore_amr wideband [autodetect]
+  --disable-libopenjpeg	    disable OpenJPEG (JPEG2000) input/output support [autodetect]
   --disable-decoder=DECODER disable specified FFmpeg decoder
   --enable-decoder=DECODER  enable specified FFmpeg decoder
   --disable-encoder=ENCODER disable specified FFmpeg encoder
@@ -541,6 +542,7 @@ _libavutil_so=auto
 _libavcodec_a=auto
 _libopencore_amrnb=auto
 _libopencore_amrwb=auto
+libopenjpeg=auto
 _libavdecoders_all=$(sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
 _libavdecoders=$(echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER//)
 _libavencoders_all=$(sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]')
@@ -937,6 +939,8 @@ for ac_option do
   --disable-mng)	_mng=no		;;
   --enable-jpeg)	_jpeg=yes	;;
   --disable-jpeg)	_jpeg=no		;;
+  --enable-libopenjpeg)	libopenjpeg=yes	;;
+  --disable-libopenjpeg)libopenjpeg=no	;;
   --enable-pnm)		_pnm=yes	;;
   --disable-pnm)	_pnm=no		;;
   --enable-md5sum)	_md5sum=yes	;;
@@ -5040,6 +5044,28 @@ else
 fi
 
 
+echocheck "OpenJPEG (JPEG2000) support"
+if test "$libopenjpeg" = auto ; then
+  libopenjpeg=no
+cat > $TMPC << EOF
+#define  OPJ_STATIC
+#include <openjpeg.h>
+int main(void) { opj_dparameters_t dec_params; opj_set_default_decoder_parameters(&dec_params); return 0; }
+EOF
+  cc_check -lopenjpeg $_ld_lm && libopenjpeg=yes
+fi
+echores "$libopenjpeg"
+if test "$libopenjpeg" = yes ; then
+  def_libopenjpeg='#define CONFIG_LIBOPENJPEG 1'
+  extra_ldflags="$extra_ldflags -lopenjpeg"
+  _libavdecoders="$_libavdecoders LIBOPENJPEG_DECODER"
+  _libavencoders="$_libavencoders LIBOPENJPEG_ENCODER"
+  _codecmodules="OpenJPEG $_codecmodules"
+else
+  def_libopenjpeg='#define CONFIG_LIBOPENJPEG 0'
+  _nocodecmodules="OpenJPEG $_nocodecmodules"
+fi
+
 
 echocheck "PNM support"
 if test "$_pnm" = yes; then
@@ -8466,6 +8492,8 @@ CONFIG_LIBMP3LAME_ENCODER=$_mp3lame_lavc
 CONFIG_LIBOPENCORE_AMRNB_DECODER=$_libopencore_amrnb
 CONFIG_LIBOPENCORE_AMRNB_ENCODER=$_libopencore_amrnb
 CONFIG_LIBOPENCORE_AMRWB_DECODER=$_libopencore_amrwb
+OCNFIG_LIBOPENJPEG_DECODER = $libopenjpeg
+OCNFIG_LIBOPENJPEG_ENCODER = $libopenjpeg
 CONFIG_LIBSCHROEDINGER_DECODER=$_libschroedinger_lavc
 CONFIG_LIBSCHROEDINGER_ENCODER=$_libschroedinger_lavc
 CONFIG_LIBVORBIS_ENCODER=$_libvorbis
@@ -8962,6 +8990,7 @@ $def_faac_lavc
 $def_libdirac_lavc
 $def_libopencore_amrnb
 $def_libopencore_amrwb
+$def_libopenjpeg
 $def_libschroedinger_lavc
 $def_mp3lame_lavc
 $def_x264_lavc

Modified: trunk/etc/codecs.conf
==============================================================================
--- trunk/etc/codecs.conf	Sun Jan  3 01:50:15 2010	(r30173)
+++ trunk/etc/codecs.conf	Sun Jan  3 01:58:56 2010	(r30174)
@@ -1399,6 +1399,16 @@ videocodec imagepower
   dll "jp2avi.dll"
   out BGR32,BGR24,BGR15
 
+videocodec fflibopenjpeg
+  info "OpenJPEG MJPEG2000"
+  status working
+  fourcc MJ2C
+  fourcc MJP2
+  fourcc mjp2
+  driver ffmpeg
+  dll "libopenjpeg"
+  out RGB24,RGB32,BGR32,Y8,Y800
+
 videocodec m3jpeg2k
   info "Morgan MJPEG2000"
   status working

Modified: trunk/libmpdemux/demux_mf.c
==============================================================================
--- trunk/libmpdemux/demux_mf.c	Sun Jan  3 01:50:15 2010	(r30173)
+++ trunk/libmpdemux/demux_mf.c	Sun Jan  3 01:58:56 2010	(r30174)
@@ -83,6 +83,8 @@ static const struct {
 } type2format[] = {
   { "bmp",  mmioFOURCC('b', 'm', 'p', ' ') },
   { "dpx",  mmioFOURCC('d', 'p', 'x', ' ') },
+  { "j2k",  mmioFOURCC('M', 'J', '2', 'C') },
+  { "jp2",  mmioFOURCC('M', 'J', '2', 'C') },
   { "jpeg", mmioFOURCC('I', 'J', 'P', 'G') },
   { "jpg",  mmioFOURCC('I', 'J', 'P', 'G') },
   { "jls",  mmioFOURCC('I', 'J', 'P', 'G') },


More information about the MPlayer-cvslog mailing list