diff options
-rw-r--r-- | Changelog | 1 | ||||
-rwxr-xr-x | configure | 29 | ||||
-rw-r--r-- | etc/codecs.conf | 10 | ||||
-rw-r--r-- | libmpdemux/demux_mf.c | 2 |
4 files changed, 42 insertions, 0 deletions
@@ -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 @@ -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 diff --git a/etc/codecs.conf b/etc/codecs.conf index 0c082420c3..c0d88cc42c 100644 --- a/etc/codecs.conf +++ b/etc/codecs.conf @@ -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 diff --git a/libmpdemux/demux_mf.c b/libmpdemux/demux_mf.c index 9320c544ff..fa9b8ae630 100644 --- a/libmpdemux/demux_mf.c +++ b/libmpdemux/demux_mf.c @@ -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') }, |