diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-08-13 02:44:52 +0300 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2016-08-13 02:44:52 +0300 |
commit | ceab04fb5db89052b3d8abcb57b137de24ed42b0 (patch) | |
tree | fccbf10764ab2615a0a7ddb3805d3e50fc91df1f /libavcodec/rawdec.c | |
parent | bc7031265441a47595eadc39a44080e4e1fe208f (diff) |
lavc/raw: Support QT b64a ARGB64 rawvideo.
Decoder based on a patch by v0lt, v0lt rambler ru
Fixes ticket #5657.
Diffstat (limited to 'libavcodec/rawdec.c')
-rw-r--r-- | libavcodec/rawdec.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index f97a839f5d..1bde67993a 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -453,6 +453,17 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, } } + if (avctx->codec_tag == AV_RL32("b64a") && + avctx->pix_fmt == AV_PIX_FMT_RGBA64BE) { + uint8_t *dst = frame->data[0]; + uint64_t v; + int x; + for (x = 0; x >> 3 < avctx->width * avctx->height; x += 8) { + v = AV_RB64(&dst[x]); + AV_WB64(&dst[x], v << 16 | v >> 48); + } + } + if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in container */ frame->interlaced_frame = 1; if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB) |