summaryrefslogtreecommitdiff
path: root/libavcodec/dpx.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2013-10-07 10:10:39 +0000
committerPaul B Mahol <onemda@gmail.com>2013-10-07 11:45:46 +0000
commit23824b9698bbc5b2640c87f6538598510f4bbf18 (patch)
tree95350cf3bf24c2b71f9dcb94141393e0d3370471 /libavcodec/dpx.c
parente745dc2d6f3bae21cd471a3dcfa0ffe700f39c6e (diff)
avcodec/dpx: support for 8 and 16 bit luma only files
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/dpx.c')
-rw-r--r--libavcodec/dpx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index e956f6dd10..4b997e421f 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -149,6 +149,9 @@ static int decode_frame(AVCodecContext *avctx,
avctx->sample_aspect_ratio = (AVRational){ 0, 1 };
switch (descriptor) {
+ case 6: // Y
+ elements = 1;
+ break;
case 51: // RGBA
elements = 4;
break;
@@ -191,6 +194,10 @@ static int decode_frame(AVCodecContext *avctx,
}
switch (1000 * descriptor + 10 * bits_per_color + endian) {
+ case 6081:
+ case 6080:
+ avctx->pix_fmt = AV_PIX_FMT_GRAY8;
+ break;
case 50081:
case 50080:
avctx->pix_fmt = AV_PIX_FMT_RGB24;
@@ -211,6 +218,12 @@ static int decode_frame(AVCodecContext *avctx,
case 51121:
avctx->pix_fmt = AV_PIX_FMT_GBRP12;
break;
+ case 6161:
+ avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
+ break;
+ case 6160:
+ avctx->pix_fmt = AV_PIX_FMT_GRAY16LE;
+ break;
case 50161:
avctx->pix_fmt = AV_PIX_FMT_RGB48BE;
break;