Commit 7a4ce7a3 authored by Sandeep Vijayasekar's avatar Sandeep Vijayasekar Committed by Commit Bot

Misc fixes to allow HDR video profiles on ATV

Bug:internal b/68950223
Test:none

Change-Id: I200bb5cd32b7ae1962a0f6b07ef90916e2b3f352
Reviewed-on: https://chromium-review.googlesource.com/756371
Commit-Queue: Sandeep Vijayasekar <sandv@chromium.org>
Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarFredrik Hubinette <hubbe@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520794}
parent a3923e4a
...@@ -117,8 +117,10 @@ class CodecProfileLevelList { ...@@ -117,8 +117,10 @@ class CodecProfileLevelList {
case CodecProfileLevel.VP9Profile1: case CodecProfileLevel.VP9Profile1:
return VideoCodecProfile.VP9PROFILE_PROFILE1; return VideoCodecProfile.VP9PROFILE_PROFILE1;
case CodecProfileLevel.VP9Profile2: case CodecProfileLevel.VP9Profile2:
case CodecProfileLevel.VP9Profile2HDR:
return VideoCodecProfile.VP9PROFILE_PROFILE2; return VideoCodecProfile.VP9PROFILE_PROFILE2;
case CodecProfileLevel.VP9Profile3: case CodecProfileLevel.VP9Profile3:
case CodecProfileLevel.VP9Profile3HDR:
return VideoCodecProfile.VP9PROFILE_PROFILE3; return VideoCodecProfile.VP9PROFILE_PROFILE3;
default: default:
throw new UnsupportedCodecProfileException(); throw new UnsupportedCodecProfileException();
...@@ -128,9 +130,8 @@ class CodecProfileLevelList { ...@@ -128,9 +130,8 @@ class CodecProfileLevelList {
case CodecProfileLevel.HEVCProfileMain: case CodecProfileLevel.HEVCProfileMain:
return VideoCodecProfile.HEVCPROFILE_MAIN; return VideoCodecProfile.HEVCPROFILE_MAIN;
case CodecProfileLevel.HEVCProfileMain10: case CodecProfileLevel.HEVCProfileMain10:
return VideoCodecProfile.HEVCPROFILE_MAIN10;
case CodecProfileLevel.HEVCProfileMain10HDR10: case CodecProfileLevel.HEVCProfileMain10HDR10:
return VideoCodecProfile.HEVCPROFILE_MAIN_STILL_PICTURE; return VideoCodecProfile.HEVCPROFILE_MAIN10;
default: default:
throw new UnsupportedCodecProfileException(); throw new UnsupportedCodecProfileException();
} }
......
...@@ -502,6 +502,11 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream, ...@@ -502,6 +502,11 @@ bool AVStreamToVideoDecoderConfig(const AVStream* stream,
format = PIXEL_FORMAT_I420; format = PIXEL_FORMAT_I420;
profile = AV1PROFILE_PROFILE0; profile = AV1PROFILE_PROFILE0;
break; break;
#if BUILDFLAG(ENABLE_HEVC_DEMUXING)
case kCodecHEVC:
profile = HEVCPROFILE_MAIN;
break;
#endif
case kCodecTheora: case kCodecTheora:
profile = THEORAPROFILE_ANY; profile = THEORAPROFILE_ANY;
break; break;
......
...@@ -207,7 +207,8 @@ void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config, ...@@ -207,7 +207,8 @@ void GpuVideoDecoder::Initialize(const VideoDecoderConfig& config,
needs_all_picture_buffers_to_decode_ = needs_all_picture_buffers_to_decode_ =
capabilities.flags & capabilities.flags &
VideoDecodeAccelerator::Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE; VideoDecodeAccelerator::Capabilities::NEEDS_ALL_PICTURE_BUFFERS_TO_DECODE;
needs_bitstream_conversion_ = (config.codec() == kCodecH264); needs_bitstream_conversion_ =
(config.codec() == kCodecH264) || (config.codec() == kCodecHEVC);
requires_texture_copy_ = requires_texture_copy_ =
!!(capabilities.flags & !!(capabilities.flags &
VideoDecodeAccelerator::Capabilities::REQUIRES_TEXTURE_COPY); VideoDecodeAccelerator::Capabilities::REQUIRES_TEXTURE_COPY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment