[FFmpeg-devel] [PATCH 1/3] hevc: support Main10 decoding through dxva2
Hendrik Leppkes
h.leppkes at gmail.com
Mon Feb 15 12:42:07 CET 2016
On Thu, Jan 28, 2016 at 5:08 PM, wm4 <nfxjfg at googlemail.com> wrote:
> On Thu, 28 Jan 2016 12:58:25 +0100
> Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>
>> ---
>> libavcodec/hevc.c | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c
>> index c245d3b..5677f0f 100644
>> --- a/libavcodec/hevc.c
>> +++ b/libavcodec/hevc.c
>> @@ -346,7 +346,9 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
>>
>> export_stream_params(s->avctx, &s->ps, sps);
>>
>> - if (sps->pix_fmt == AV_PIX_FMT_YUV420P || sps->pix_fmt == AV_PIX_FMT_YUVJ420P) {
>> + switch (sps->pix_fmt) {
>> + case AV_PIX_FMT_YUV420P:
>> + case AV_PIX_FMT_YUVJ420P:
>> #if CONFIG_HEVC_DXVA2_HWACCEL
>> *fmt++ = AV_PIX_FMT_DXVA2_VLD;
>> #endif
>> @@ -359,6 +361,15 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps, enum AVPixelFormat pix_fm
>> #if CONFIG_HEVC_VDPAU_HWACCEL
>> *fmt++ = AV_PIX_FMT_VDPAU;
>> #endif
>> + break;
>> + case AV_PIX_FMT_YUV420P10:
>> +#if CONFIG_HEVC_DXVA2_HWACCEL
>> + *fmt++ = AV_PIX_FMT_DXVA2_VLD;
>> +#endif
>> +#if CONFIG_HEVC_D3D11VA_HWACCEL
>> + *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
>> +#endif
>> + break;
>> }
>>
>> if (pix_fmt == AV_PIX_FMT_NONE) {
>
> Patches 1-3 LGTM. There was a discussion whether there is a
> compatibility problem with API users which don't check for the profile.
> These would now attempt to decode 10 bit with a 8 bit decoder. On the
> other hand, if you don't check for profiles with hw decoding, you're
> bound to run into problems anyway.
>
Applied the set.
More information about the ffmpeg-devel
mailing list