[FFmpeg-cvslog] dpx: abgr support
Paul B Mahol
git at videolan.org
Tue Oct 8 16:53:41 CEST 2013
ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Oct 8 11:29:29 2013 +0000| [3abbf20962f7285e0bcdb511aab14b600ddfe345] | committer: Paul B Mahol
dpx: abgr support
Signed-off-by: Paul B Mahol <onemda at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3abbf20962f7285e0bcdb511aab14b600ddfe345
---
libavcodec/dpx.c | 5 +++++
libavcodec/dpxenc.c | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 4b997e4..8468720 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -152,6 +152,7 @@ static int decode_frame(AVCodecContext *avctx,
case 6: // Y
elements = 1;
break;
+ case 52: // ABGR
case 51: // RGBA
elements = 4;
break;
@@ -202,6 +203,10 @@ static int decode_frame(AVCodecContext *avctx,
case 50080:
avctx->pix_fmt = AV_PIX_FMT_RGB24;
break;
+ case 52081:
+ case 52080:
+ avctx->pix_fmt = AV_PIX_FMT_ABGR;
+ break;
case 51081:
case 51080:
avctx->pix_fmt = AV_PIX_FMT_RGBA;
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 875862d..0eb1297 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -43,6 +43,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->planar = !!(desc->flags & AV_PIX_FMT_FLAG_PLANAR);
switch (avctx->pix_fmt) {
+ case AV_PIX_FMT_ABGR:
+ s->descriptor = 52;
+ break;
case AV_PIX_FMT_GRAY16BE:
case AV_PIX_FMT_GRAY16LE:
case AV_PIX_FMT_GRAY8:
@@ -248,7 +251,7 @@ AVCodec ff_dpx_encoder = {
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]){
AV_PIX_FMT_GRAY8,
- AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA,
+ AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_ABGR,
AV_PIX_FMT_GRAY16LE, AV_PIX_FMT_GRAY16BE,
AV_PIX_FMT_RGB48LE, AV_PIX_FMT_RGB48BE,
AV_PIX_FMT_RGBA64LE, AV_PIX_FMT_RGBA64BE,
More information about the ffmpeg-cvslog
mailing list