[FFmpeg-devel] [PATCH]Support QT b64a ARGB64 rawvideo

Michael Niedermayer michael at niedermayer.cc
Sat Jul 9 12:52:09 EEST 2016


On Sun, Jul 03, 2016 at 11:08:15PM +0200, Carl Eugen Hoyos wrote:
> Hi!
> 
> Attached patches fix ticket #5657.
> 
> Please comment, Carl Eugen

>  libavcodec/raw.c     |    1 +
>  libavcodec/rawdec.c  |    9 +++++++++
>  libavcodec/version.h |    2 +-
>  libavformat/isom.c   |    1 +
>  4 files changed, 12 insertions(+), 1 deletion(-)
> cd699fd29642c445ed3d785f64f96b94f6b4e027  0001-lavc-rawdec-Support-QuickTime-b64a-ARGB64-rawvideo.patch
> From 1bba7103c093951cab1bb9aa7b5eaf07b44d2781 Mon Sep 17 00:00:00 2001
> From: v0lt <v0lt at rambler.ru>
> Date: Sun, 3 Jul 2016 23:04:08 +0200
> Subject: [PATCH 1/2] lavc/rawdec: Support QuickTime b64a ARGB64 rawvideo.
> 
> Fixes ticket #5657.
> ---
>  libavcodec/raw.c     |    1 +
>  libavcodec/rawdec.c  |    9 +++++++++
>  libavcodec/version.h |    2 +-
>  libavformat/isom.c   |    1 +
>  4 files changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/libavcodec/raw.c b/libavcodec/raw.c
> index bfa2537..35dfbab 100644
> --- a/libavcodec/raw.c
> +++ b/libavcodec/raw.c
> @@ -224,6 +224,7 @@ const PixelFormatTag ff_raw_pix_fmt_tags[] = {
>      { AV_PIX_FMT_ABGR,    MKTAG('A', 'B', 'G', 'R') },
>      { AV_PIX_FMT_GRAY16BE,MKTAG('b', '1', '6', 'g') },
>      { AV_PIX_FMT_RGB48BE, MKTAG('b', '4', '8', 'r') },
> +    { AV_PIX_FMT_RGBA64BE,MKTAG('b', '6', '4', 'a') },
>  
>      /* vlc */
>      { AV_PIX_FMT_YUV410P,     MKTAG('I', '4', '1', '0') },
> diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
> index 765e567..8085ffa 100644
> --- a/libavcodec/rawdec.c
> +++ b/libavcodec/rawdec.c
> @@ -444,6 +444,15 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
>          }
>      }
>  
> +    if (avctx->codec_tag == MKTAG('b', '6', '4', 'a') &&
> +        avctx->pix_fmt   == AV_PIX_FMT_RGBA64BE) {
> +        uint64_t *pixel = frame->data[0];
> +        int i, n = avctx->width * avctx->height;
> +        for (i = 0; i < n; i++) {
> +            *pixel++ = *pixel << 48 | *pixel >> 16;
> +        }
> +    }

does this work on big endian ?

also a fate test would be useful

[...]

thx

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160709/e823034e/attachment.sig>


More information about the ffmpeg-devel mailing list