[FFmpeg-cvslog] avcodec/magicyuv: add support for recently added new format

Paul B Mahol git at videolan.org
Tue Sep 22 19:39:09 EEST 2020


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Tue Sep 22 18:31:14 2020 +0200| [904ab5365cf4881eae1e5cac980f3c4f252b69cd] | committer: Paul B Mahol

avcodec/magicyuv: add support for recently added new format

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=904ab5365cf4881eae1e5cac980f3c4f252b69cd
---

 libavcodec/magicyuv.c | 8 ++++++++
 libavformat/isom.c    | 1 +
 libavformat/riff.c    | 1 +
 3 files changed, 10 insertions(+)

diff --git a/libavcodec/magicyuv.c b/libavcodec/magicyuv.c
index eed5ad1b40..b56d3e9d32 100644
--- a/libavcodec/magicyuv.c
+++ b/libavcodec/magicyuv.c
@@ -529,6 +529,14 @@ static int magy_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt = AV_PIX_FMT_GRAY10;
         s->bps = 10;
         break;
+    case 0x7b:
+        avctx->pix_fmt = AV_PIX_FMT_YUV420P10;
+        s->hshift[1] =
+        s->vshift[1] =
+        s->hshift[2] =
+        s->vshift[2] = 1;
+        s->bps = 10;
+        break;
     default:
         avpriv_request_sample(avctx, "Format 0x%X", format);
         return AVERROR_PATCHWELCOME;
diff --git a/libavformat/isom.c b/libavformat/isom.c
index 209bbac5d1..019175d814 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -290,6 +290,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'R', '0') },
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'R', 'A') },
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'R', 'G') },
+    { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '0') },
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '2') },
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '4') },
     { AV_CODEC_ID_MAGICYUV, MKTAG('M', '8', 'R', 'G') },
diff --git a/libavformat/riff.c b/libavformat/riff.c
index 162e2b1bf2..388047fc4b 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -454,6 +454,7 @@ const AVCodecTag ff_codec_bmp_tags[] = {
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'R', 'A') },
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'R', 'G') },
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'G', '0') },
+    { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'Y', '0') },
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'Y', '2') },
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '0', 'Y', '4') },
     { AV_CODEC_ID_MAGICYUV,     MKTAG('M', '2', 'R', 'A') },



More information about the ffmpeg-cvslog mailing list