mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
4ef2722f89
20 changed files with 194 additions and 130 deletions
|
|
@ -25,6 +25,7 @@
|
|||
#define AV_PIX_FMT_YUV420P PIX_FMT_YUV420P
|
||||
#define AV_PIX_FMT_YUVJ420P PIX_FMT_YUVJ420P
|
||||
#define AV_PIX_FMT_YUV444P PIX_FMT_YUV444P
|
||||
#define AV_PIX_FMT_GBRP PIX_FMT_GBRP
|
||||
#define AV_PIX_FMT_NONE PIX_FMT_NONE
|
||||
#endif
|
||||
|
||||
|
|
@ -55,6 +56,9 @@ ChoosePixelFormat(AVCodecContext* aCodecContext, const AVPixelFormat* aFormats)
|
|||
case AV_PIX_FMT_YUVJ420P:
|
||||
FFMPEG_LOG("Requesting pixel format YUVJ420P.");
|
||||
return AV_PIX_FMT_YUVJ420P;
|
||||
case AV_PIX_FMT_GBRP:
|
||||
FFMPEG_LOG("Requesting pixel format GBRP.");
|
||||
return AV_PIX_FMT_GBRP;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -360,7 +364,8 @@ FFmpegVideoDecoder<LIBAV_VER>::CreateImage(int64_t aOffset, int64_t aPts,
|
|||
|
||||
b.mPlanes[0].mWidth = mFrame->width;
|
||||
b.mPlanes[0].mHeight = mFrame->height;
|
||||
if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P) {
|
||||
if (mCodecContext->pix_fmt == AV_PIX_FMT_YUV444P ||
|
||||
mCodecContext->pix_fmt == AV_PIX_FMT_GBRP) {
|
||||
b.mPlanes[1].mWidth = b.mPlanes[2].mWidth = mFrame->width;
|
||||
b.mPlanes[1].mHeight = b.mPlanes[2].mHeight = mFrame->height;
|
||||
} else {
|
||||
|
|
@ -376,6 +381,9 @@ FFmpegVideoDecoder<LIBAV_VER>::CreateImage(int64_t aOffset, int64_t aPts,
|
|||
case AVCOL_SPC_BT470BG:
|
||||
b.mYUVColorSpace = YUVColorSpace::BT601;
|
||||
break;
|
||||
case AVCOL_SPC_RGB:
|
||||
b.mYUVColorSpace = YUVColorSpace::IDENTITY;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue