Index: content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc |
diff --git a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc |
index cff95f385a9ce7cf2d646c45ff8d1c5b2ee63b03..7f3e9004d2891475d61068bbdb4d004cff8ca28a 100644 |
--- a/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc |
+++ b/content/common/gpu/media/v4l2_slice_video_decode_accelerator.cc |
@@ -576,8 +576,9 @@ bool V4L2SliceVideoDecodeAccelerator::SetupFormats() { |
} |
size_t input_size; |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode)) |
+ gfx::Size max_resolution = device_->GetMaxSupportedResolution( |
+ input_format_fourcc); |
+ if (max_resolution.width() >= 4096 && max_resolution.height() >= 2160) |
Pawel Osciak
2015/04/22 08:50:55
This should be > 1080p, not > 4k.
henryhsu
2015/04/23 03:56:43
Done.
|
input_size = kInputBufferMaxSizeFor4k; |
else |
input_size = kInputBufferMaxSizeFor1080p; |
@@ -2508,18 +2509,13 @@ V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
SupportedProfile profile; |
profile.min_resolution.SetSize(16, 16); |
- // NOTE: additional autodetection logic may require updating input buffer size |
- // selection. |
- if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
- switches::kIgnoreResolutionLimitsForAcceleratedVideoDecode)) |
- profile.max_resolution.SetSize(4096, 2160); |
- else |
- profile.max_resolution.SetSize(1920, 1088); |
- |
v4l2_fmtdesc fmtdesc; |
memset(&fmtdesc, 0, sizeof(fmtdesc)); |
fmtdesc.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; |
for (; device->Ioctl(VIDIOC_ENUM_FMT, &fmtdesc) == 0; ++fmtdesc.index) { |
+ // Get maximum resolution for each format |
Pawel Osciak
2015/04/22 08:50:56
I feel this comment doesn't really add anything, t
henryhsu
2015/04/23 03:56:43
Done.
|
+ profile.max_resolution = device->GetMaxSupportedResolution( |
+ fmtdesc.pixelformat); |
switch (fmtdesc.pixelformat) { |
case V4L2_PIX_FMT_H264_SLICE: |
for (uint32 media_profile = media::H264PROFILE_MIN; |