From 60955f363789a3c9745878810019a3413274bdcf Mon Sep 17 00:00:00 2001 From: Aleksoid Date: Tue, 13 Feb 2024 17:39:46 +1000 Subject: [PATCH] =?UTF-8?q?ffmpeg=20-=20=D0=BD=D0=B5=20=D0=B8=D1=81=D0=BF?= =?UTF-8?q?=D0=BE=D0=BB=D1=8C=D0=B7=D1=83=D0=B5=D0=BC=20AV=5FPIX=5FFMT=5FY?= =?UTF-8?q?UVJ420P=20=D0=B4=D0=BB=D1=8F=20H.264=20=D0=BA=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D0=BA=D0=B0,=20=D1=82=D0=B5=D0=BC=20=D0=B1=D0=BE=D0=BB=D0=B5?= =?UTF-8?q?=D0=B5=20=D1=87=D1=82=D0=BE=20=D0=B2=20=D1=81=D0=B0=D0=BC=D0=BE?= =?UTF-8?q?=D0=BC=20ffmpeg=20=D0=BE=D0=BD=20=D1=83=D0=BA=D0=B0=D0=B7=D0=B0?= =?UTF-8?q?=D0=BD=20=D0=BA=D0=B0=D0=BA=20=D1=83=D1=81=D1=82=D0=B0=D1=80?= =?UTF-8?q?=D0=B5=D0=B2=D1=88=D0=B8=D0=B9.=20=D0=AD=D1=82=D0=BE=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D1=82=20=D0=BD=D0=B5=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20?= =?UTF-8?q?=D0=B0=D0=BF=D0=BF=D0=B0=D1=80=D0=B0=D1=82=D0=BD=D0=BE=D0=B3?= =?UTF-8?q?=D0=BE=20=D1=83=D1=81=D0=BA=D0=BE=D1=80=D0=B5=D0=BD=D0=B8=D1=8F?= =?UTF-8?q?=20=D1=82=D0=B0=D0=BA=D0=B8=D1=85=20=D0=BF=D0=BE=D1=82=D0=BE?= =?UTF-8?q?=D0=BA=D0=BE=D0=B2.=20=D0=90=D0=BF=D0=BF=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BD=D1=8B=D0=B5=20=D0=B4=D0=B5=D0=BA=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D1=80=D1=8B=20H.264=20-=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=B4=D0=B5=D1=80=D0=B6?= =?UTF-8?q?=D0=BA=D0=B0=20"=D1=87=D0=B8=D1=81=D1=82=D0=BE=D0=B3=D0=BE"=20B?= =?UTF-8?q?aseline=20=D0=BF=D1=80=D0=BE=D1=84=D0=B8=D0=BB=D1=8F,=20=D1=8D?= =?UTF-8?q?=D1=82=D0=BE=20=D0=B4=D0=B0=D1=81=D1=82=20=D0=B2=D0=BE=D0=B7?= =?UTF-8?q?=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D1=8C=20?= =?UTF-8?q?Copy=20Back=20=D0=B4=D0=B5=D0=BA=D0=BE=D0=B4=D0=B5=D1=80=D1=8B?= =?UTF-8?q?=20=D0=B2=20MPCVideoDec=20=D0=BD=D0=B0=20=D1=82=D0=B0=D0=BA?= =?UTF-8?q?=D0=B8=D1=85=20=D0=BF=D0=BE=D1=82=D0=BE=D0=BA=D0=B0=D1=85.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ExtLib/ffmpeg/libavcodec/dxva2.c | 3 +++ src/ExtLib/ffmpeg/libavcodec/h264_slice.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/ExtLib/ffmpeg/libavcodec/dxva2.c b/src/ExtLib/ffmpeg/libavcodec/dxva2.c index 3c96fffbd4..a917d39df7 100644 --- a/src/ExtLib/ffmpeg/libavcodec/dxva2.c +++ b/src/ExtLib/ffmpeg/libavcodec/dxva2.c @@ -72,6 +72,9 @@ static const int prof_mpeg2_main[] = {AV_PROFILE_MPEG2_SIMPLE, static const int prof_h264_high[] = {AV_PROFILE_H264_CONSTRAINED_BASELINE, AV_PROFILE_H264_MAIN, AV_PROFILE_H264_HIGH, + // ==> Start patch MPC + AV_PROFILE_H264_BASELINE, + // ==> End patch MPC AV_PROFILE_UNKNOWN}; static const int prof_hevc_main[] = {AV_PROFILE_HEVC_MAIN, AV_PROFILE_UNKNOWN}; diff --git a/src/ExtLib/ffmpeg/libavcodec/h264_slice.c b/src/ExtLib/ffmpeg/libavcodec/h264_slice.c index 8e42b94ee1..007ded5eab 100644 --- a/src/ExtLib/ffmpeg/libavcodec/h264_slice.c +++ b/src/ExtLib/ffmpeg/libavcodec/h264_slice.c @@ -897,10 +897,15 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) #if CONFIG_H264_VAAPI_HWACCEL *fmt++ = AV_PIX_FMT_VAAPI; #endif + // ==> Start patch MPC + /* if (h->avctx->color_range == AVCOL_RANGE_JPEG) *fmt++ = AV_PIX_FMT_YUVJ420P; else *fmt++ = AV_PIX_FMT_YUV420P; + */ + *fmt++ = AV_PIX_FMT_YUV420P; + // ==> End patch MPC } break; default: