Mercurial > mplayer.hg
changeset 36104:4e3c56728d1e
Support playback of JPEG 2000 digital cinema files.
author | cehoyos |
---|---|
date | Wed, 01 May 2013 11:18:58 +0000 |
parents | 236d31040749 |
children | 10a63b5e6513 |
files | codec-cfg.c etc/codecs.conf fmt-conversion.c libmpcodecs/img_format.c libmpcodecs/img_format.h libmpcodecs/mp_image.c m_option.c |
diffstat | 7 files changed, 30 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/codec-cfg.c Tue Apr 30 13:10:27 2013 +0000 +++ b/codec-cfg.c Wed May 01 11:18:58 2013 +0000 @@ -235,6 +235,7 @@ {"ABGR", IMGFMT_ABGR}, {"RGB1", IMGFMT_RGB1}, {"BGR1", IMGFMT_BGR1}, + {"XYZ12", IMGFMT_XYZ12}, {"GBR24P", IMGFMT_GBR24P}, {"GBR12P", IMGFMT_GBR12P}, {"GBR14P", IMGFMT_GBR14P},
--- a/etc/codecs.conf Tue Apr 30 13:10:27 2013 +0000 +++ b/etc/codecs.conf Wed May 01 11:18:58 2013 +0000 @@ -1954,6 +1954,16 @@ out 444P16,444P14,444P12,444P10,444P9 out 420A,422A,444A +videocodec ffjpeg2000 + info "FFmpeg JPEG 2000 digital cinema" + status working + fourcc mjp2 + driver ffmpeg + dll "jpeg2000" + out XYZ12 + out Y800,Y16 + out RGB48LE,RGB48BE,RGB32,BGR32,RGB24 + videocodec ffj2k info "FFmpeg JPEG 2000" status working
--- a/fmt-conversion.c Tue Apr 30 13:10:27 2013 +0000 +++ b/fmt-conversion.c Wed May 01 11:18:58 2013 +0000 @@ -64,6 +64,8 @@ { IMGFMT_RGB64LE, AV_PIX_FMT_RGBA64LE }, { IMGFMT_RGB64BE, AV_PIX_FMT_RGBA64BE }, #endif /* LIBAVUTIL_VERSION_MICRO >= 100 */ + { IMGFMT_XYZ12LE, AV_PIX_FMT_XYZ12LE }, + { IMGFMT_XYZ12BE, AV_PIX_FMT_XYZ12BE }, { IMGFMT_422A, AV_PIX_FMT_YUVA422P }, { IMGFMT_444A, AV_PIX_FMT_YUVA444P }, { IMGFMT_GBR24P, AV_PIX_FMT_GBRP },
--- a/libmpcodecs/img_format.c Tue Apr 30 13:10:27 2013 +0000 +++ b/libmpcodecs/img_format.c Wed May 01 11:18:58 2013 +0000 @@ -52,6 +52,8 @@ case IMGFMT_BGRA: return "BGRA"; case IMGFMT_ARGB: return "ARGB"; case IMGFMT_RGBA: return "RGBA"; + case IMGFMT_XYZ12LE: return "XYZ 36-bit LE"; + case IMGFMT_XYZ12BE: return "XYZ 36-bit BE"; case IMGFMT_GBR24P: return "Planar GBR 24-bit"; case IMGFMT_GBR12P: return "Planar GBR 36-bit"; case IMGFMT_GBR14P: return "Planar GBR 42-bit";
--- a/libmpcodecs/img_format.h Tue Apr 30 13:10:27 2013 +0000 +++ b/libmpcodecs/img_format.h Wed May 01 11:18:58 2013 +0000 @@ -51,6 +51,11 @@ #define IMGFMT_BGR24 (IMGFMT_BGR|24) #define IMGFMT_BGR32 (IMGFMT_BGR|32) +#define IMGFMT_XYZ_MASK 0xFFFFFF00 +#define IMGFMT_XYZ (('X'<<24)|('Y'<<16)|('Z'<<8)) +#define IMGFMT_XYZ12LE (IMGFMT_XYZ|12) +#define IMGFMT_XYZ12BE (IMGFMT_XYZ|12|128) + #define IMGFMT_GBR24P (('G'<<24)|('B'<<16)|('R'<<8)|24) #define IMGFMT_GBR12PLE (('G'<<24)|('B'<<16)|('R'<<8)|36) #define IMGFMT_GBR12PBE (('G'<<24)|('B'<<16)|('R'<<8)|36|128) @@ -76,6 +81,7 @@ #define IMGFMT_BGR15LE (IMGFMT_BGR15|128) #define IMGFMT_BGR16BE IMGFMT_BGR16 #define IMGFMT_BGR16LE (IMGFMT_BGR16|128) +#define IMGFMT_XYZ12 IMGFMT_XYZ12BE #define IMGFMT_GBR12P IMGFMT_GBR12PBE #define IMGFMT_GBR14P IMGFMT_GBR14PBE #else @@ -97,6 +103,7 @@ #define IMGFMT_BGR15LE IMGFMT_BGR15 #define IMGFMT_BGR16BE (IMGFMT_BGR16|128) #define IMGFMT_BGR16LE IMGFMT_BGR16 +#define IMGFMT_XYZ12 IMGFMT_XYZ12LE #define IMGFMT_GBR12P IMGFMT_GBR12PLE #define IMGFMT_GBR14P IMGFMT_GBR14PLE #endif @@ -107,9 +114,11 @@ #define IMGFMT_IS_RGB(fmt) (((fmt)&IMGFMT_RGB_MASK)==IMGFMT_RGB) #define IMGFMT_IS_BGR(fmt) (((fmt)&IMGFMT_BGR_MASK)==IMGFMT_BGR) +#define IMGFMT_IS_XYZ(fmt) (((fmt)&IMGFMT_XYZ_MASK)==IMGFMT_XYZ) #define IMGFMT_RGB_DEPTH(fmt) ((fmt)&0x7F) #define IMGFMT_BGR_DEPTH(fmt) ((fmt)&0x7F) +#define IMGFMT_XYZ_DEPTH(fmt) ((fmt)&0x7F) /* Planar YUV Formats */
--- a/libmpcodecs/mp_image.c Tue Apr 30 13:10:27 2013 +0000 +++ b/libmpcodecs/mp_image.c Wed May 01 11:18:58 2013 +0000 @@ -121,6 +121,10 @@ mpi->flags|=MP_IMGFLAG_SWAPPED; return; } + if (IMGFMT_IS_XYZ(out_fmt)) { + mpi->bpp=3*IMGFMT_XYZ_DEPTH(out_fmt); + return; + } mpi->num_planes=3; if (out_fmt == IMGFMT_GBR24P) { mpi->bpp=24;
--- a/m_option.c Tue Apr 30 13:10:27 2013 +0000 +++ b/m_option.c Wed May 01 11:18:58 2013 +0000 @@ -1166,6 +1166,8 @@ {"argb", IMGFMT_ARGB}, {"bgra", IMGFMT_BGRA}, {"abgr", IMGFMT_ABGR}, + {"xyz12be", IMGFMT_XYZ12LE}, + {"xyz12le", IMGFMT_XYZ12BE}, {"gbr14pbe", IMGFMT_GBR14PLE}, {"gbr14ple", IMGFMT_GBR14PBE}, {"gbr12pbe", IMGFMT_GBR12PLE},