Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2013-05-09 15:11:42 +0400
committerHendrik Leppkes <h.leppkes@gmail.com>2013-05-09 15:11:42 +0400
commit1d39964bd0b3d9704fab6f4a86b79df536083757 (patch)
tree183bb3583fd0eceedaee9f35cc61c7e15ff9b35e /decoder
parent66cfe2262a7b42d98512e9485a7012310201efa9 (diff)
Add RGB48 as an internal pixel format
Diffstat (limited to 'decoder')
-rw-r--r--decoder/LAVVideo/LAVPixFmtConverter.cpp2
-rw-r--r--decoder/LAVVideo/decoders/ILAVDecoder.h1
-rw-r--r--decoder/LAVVideo/decoders/avcodec.cpp38
-rw-r--r--decoder/LAVVideo/decoders/pixfmt.cpp2
4 files changed, 24 insertions, 19 deletions
diff --git a/decoder/LAVVideo/LAVPixFmtConverter.cpp b/decoder/LAVVideo/LAVPixFmtConverter.cpp
index 9dfdbf5b..6362e870 100644
--- a/decoder/LAVVideo/LAVPixFmtConverter.cpp
+++ b/decoder/LAVVideo/LAVPixFmtConverter.cpp
@@ -45,6 +45,7 @@
* RGB24 - - - - - - - - - - - - - - - x -
* RGB32 - - - - - - - - - - - - - - - - x
* ARGB32 - - - - - - - - - - - - - - - - x
+ * RGB48 - - - - - - - - - - - - - - - - -
*
* Every processing path has a swscale fallback (even those with a "-" above), every combination of input/output is possible, just not optimized (ugly and/or slow)
*/
@@ -96,6 +97,7 @@ static LAV_INOUT_PIXFMT_MAP lav_pixfmt_map[] = {
{ LAVPixFmt_RGB24, 8, { LAVOutPixFmt_RGB24, LAVOutPixFmt_RGB32, PIXOUT_444_16, PIXOUT_444_10, PIXOUT_444_8, PIXOUT_422_16, PIXOUT_422_10, PIXOUT_422_8, PIXOUT_420_16, PIXOUT_420_10, PIXOUT_420_8 } },
{ LAVPixFmt_RGB32, 8, { PIXOUT_RGB_8, PIXOUT_444_16, PIXOUT_444_10, PIXOUT_444_8, PIXOUT_422_16, PIXOUT_422_10, PIXOUT_422_8, PIXOUT_420_16, PIXOUT_420_10, PIXOUT_420_8 } },
{ LAVPixFmt_ARGB32, 8, { PIXOUT_RGB_8, PIXOUT_444_16, PIXOUT_444_10, PIXOUT_444_8, PIXOUT_422_16, PIXOUT_422_10, PIXOUT_422_8, PIXOUT_420_16, PIXOUT_420_10, PIXOUT_420_8 } },
+ { LAVPixFmt_RGB48, 8, { PIXOUT_RGB_8, PIXOUT_444_16, PIXOUT_444_10, PIXOUT_444_8, PIXOUT_422_16, PIXOUT_422_10, PIXOUT_422_8, PIXOUT_420_16, PIXOUT_420_10, PIXOUT_420_8 } },
{ LAVPixFmt_DXVA2, 8, { PIXOUT_420_8, PIXOUT_420_10, PIXOUT_420_16, PIXOUT_422_16, PIXOUT_422_10, PIXOUT_422_8, PIXOUT_RGB_8, PIXOUT_444_16, PIXOUT_444_10, PIXOUT_444_8 } },
};
diff --git a/decoder/LAVVideo/decoders/ILAVDecoder.h b/decoder/LAVVideo/decoders/ILAVDecoder.h
index c4b0bf3a..dc34aa04 100644
--- a/decoder/LAVVideo/decoders/ILAVDecoder.h
+++ b/decoder/LAVVideo/decoders/ILAVDecoder.h
@@ -50,6 +50,7 @@ typedef enum LAVPixelFormat {
LAVPixFmt_RGB24, ///< RGB24, in BGR order
LAVPixFmt_RGB32, ///< RGB32, in BGRA order (A is invalid and should be 0xFF)
LAVPixFmt_ARGB32, ///< ARGB32, in BGRA order
+ LAVPixFmt_RGB48, ///< RGB48, in BGR order (16-bit per pixel)
LAVPixFmt_DXVA2, ///< DXVA2 Surface
diff --git a/decoder/LAVVideo/decoders/avcodec.cpp b/decoder/LAVVideo/decoders/avcodec.cpp
index 764880ea..965deff5 100644
--- a/decoder/LAVVideo/decoders/avcodec.cpp
+++ b/decoder/LAVVideo/decoders/avcodec.cpp
@@ -159,8 +159,8 @@ static struct PixelFormatMapping {
{ PIX_FMT_YUV440P, LAVPixFmt_YUV444, TRUE },
{ PIX_FMT_YUVJ440P, LAVPixFmt_YUV444, TRUE },
{ PIX_FMT_YUVA420P, LAVPixFmt_YUV420, TRUE },
- { PIX_FMT_RGB48BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_RGB48LE, LAVPixFmt_RGB32, TRUE },
+ { PIX_FMT_RGB48BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_RGB48LE, LAVPixFmt_RGB48, TRUE },
{ PIX_FMT_RGB565BE, LAVPixFmt_RGB32, TRUE },
{ PIX_FMT_RGB565LE, LAVPixFmt_RGB32, TRUE },
@@ -184,8 +184,8 @@ static struct PixelFormatMapping {
{ PIX_FMT_BGR444LE, LAVPixFmt_RGB32, TRUE },
{ PIX_FMT_BGR444BE, LAVPixFmt_RGB32, TRUE },
{ PIX_FMT_GRAY8A, LAVPixFmt_YUV420, TRUE },
- { PIX_FMT_BGR48BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_BGR48LE, LAVPixFmt_RGB32, TRUE },
+ { PIX_FMT_BGR48BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_BGR48LE, LAVPixFmt_RGB48, FALSE },
{ PIX_FMT_YUV420P9BE, LAVPixFmt_YUV420bX, TRUE, 9 },
{ PIX_FMT_YUV420P9LE, LAVPixFmt_YUV420bX, FALSE, 9 },
@@ -201,17 +201,17 @@ static struct PixelFormatMapping {
{ PIX_FMT_YUV422P9LE, LAVPixFmt_YUV422bX, FALSE, 9 },
{ PIX_FMT_GBRP, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP9BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP9LE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP10BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP10LE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP16BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP16LE, LAVPixFmt_RGB32, TRUE },
-
- { PIX_FMT_RGBA64BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_RGBA64LE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_BGRA64BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_BGRA64LE, LAVPixFmt_RGB32, TRUE },
+ { PIX_FMT_GBRP9BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP9LE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP10BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP10LE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP16BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP16LE, LAVPixFmt_RGB48, TRUE },
+
+ { PIX_FMT_RGBA64BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_RGBA64LE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_BGRA64BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_BGRA64LE, LAVPixFmt_RGB48, TRUE },
{ PIX_FMT_0RGB, LAVPixFmt_RGB32, TRUE },
{ PIX_FMT_RGB0, LAVPixFmt_RGB32, TRUE },
@@ -232,10 +232,10 @@ static struct PixelFormatMapping {
{ PIX_FMT_YUV444P12LE, LAVPixFmt_YUV444bX, FALSE, 12 },
{ PIX_FMT_YUV444P14BE, LAVPixFmt_YUV444bX, TRUE, 14 },
{ PIX_FMT_YUV444P14LE, LAVPixFmt_YUV444bX, FALSE, 14 },
- { PIX_FMT_GBRP12BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP12LE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP14BE, LAVPixFmt_RGB32, TRUE },
- { PIX_FMT_GBRP14LE, LAVPixFmt_RGB32, TRUE },
+ { PIX_FMT_GBRP12BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP12LE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP14BE, LAVPixFmt_RGB48, TRUE },
+ { PIX_FMT_GBRP14LE, LAVPixFmt_RGB48, TRUE },
{ PIX_FMT_DXVA2_VLD, LAVPixFmt_DXVA2, FALSE },
};
diff --git a/decoder/LAVVideo/decoders/pixfmt.cpp b/decoder/LAVVideo/decoders/pixfmt.cpp
index e7cff8b4..83c49293 100644
--- a/decoder/LAVVideo/decoders/pixfmt.cpp
+++ b/decoder/LAVVideo/decoders/pixfmt.cpp
@@ -32,6 +32,7 @@ static LAVPixFmtDesc lav_pixfmt_desc[] = {
{ 3, 1, { 1 }, { 1 } }, ///< LAVPixFmt_RGB24
{ 4, 1, { 1 }, { 1 } }, ///< LAVPixFmt_RGB32
{ 4, 1, { 1 }, { 1 } }, ///< LAVPixFmt_ARGB32
+ { 6, 1, { 1 }, { 1 } }, ///< LAVPixFmt_RGB48
};
LAVPixFmtDesc getPixelFormatDesc(LAVPixelFormat pixFmt)
@@ -51,6 +52,7 @@ static struct {
{ LAVPixFmt_RGB24, PIX_FMT_BGR24 },
{ LAVPixFmt_RGB32, PIX_FMT_BGRA },
{ LAVPixFmt_ARGB32, PIX_FMT_BGRA },
+ { LAVPixFmt_RGB48, PIX_FMT_BGR48LE },
};
PixelFormat getFFPixelFormatFromLAV(LAVPixelFormat pixFmt, int bpp)