1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/magicyuv: add support for recently added new format

This commit is contained in:
Paul B Mahol 2020-09-22 18:31:14 +02:00
parent 519bd469d0
commit 904ab5365c
3 changed files with 10 additions and 0 deletions

View File

@ -529,6 +529,14 @@ static int magy_decode_frame(AVCodecContext *avctx, void *data,
avctx->pix_fmt = AV_PIX_FMT_GRAY10; avctx->pix_fmt = AV_PIX_FMT_GRAY10;
s->bps = 10; s->bps = 10;
break; 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: default:
avpriv_request_sample(avctx, "Format 0x%X", format); avpriv_request_sample(avctx, "Format 0x%X", format);
return AVERROR_PATCHWELCOME; return AVERROR_PATCHWELCOME;

View File

@ -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', '0') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'R', 'A') }, { 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', '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', '2') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '4') }, { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '4') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '8', 'R', 'G') }, { AV_CODEC_ID_MAGICYUV, MKTAG('M', '8', 'R', 'G') },

View File

@ -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', 'A') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'R', 'G') }, { 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', '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', '2') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '4') }, { AV_CODEC_ID_MAGICYUV, MKTAG('M', '0', 'Y', '4') },
{ AV_CODEC_ID_MAGICYUV, MKTAG('M', '2', 'R', 'A') }, { AV_CODEC_ID_MAGICYUV, MKTAG('M', '2', 'R', 'A') },