File chromium-86-fix-vaapi-on-intel.patch of Package chromium-ffmpeg-extra (Revision b30401c0254353da4e772a68807e8dc6)

Currently displaying revision b30401c0254353da4e772a68807e8dc6 , Show latest

37
 
1
diff -up chromium-86.0.4240.75/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.vaapi-intel-fix chromium-86.0.4240.75/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
2
--- chromium-86.0.4240.75/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.vaapi-intel-fix 2020-10-07 12:38:47.000000000 -0400
3
+++ chromium-86.0.4240.75/media/gpu/vaapi/vaapi_video_decode_accelerator.cc 2020-10-14 16:20:46.938556042 -0400
4
@@ -58,6 +58,7 @@ unsigned int GetVaFormatForVideoCodecPro
5
   return VA_RT_FORMAT_YUV420;
6
 }
7
 
8
+#if defined(OS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH)
9
 // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
10
 // Lake) Cpu platform id's are referenced from the following file in kernel
11
 // source arch/x86/include/asm/intel-family.h
12
@@ -70,6 +71,7 @@ bool IsGeminiLakeOrLater() {
13
       cpuid.model() >= kGeminiLakeModelId;
14
   return is_geminilake_or_later;
15
 }
16
+#endif
17
 
18
 }  // namespace
19
 
20
@@ -1214,6 +1216,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe
21
   if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
22
     return BufferAllocationMode::kNormal;
23
 
24
+#if defined(OS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH)
25
+  // Move this to chromeOs only as it is causing problem in some intel linux drivers
26
   // On Gemini Lake, Kaby Lake and later we can pass to libva the client's
27
   // PictureBuffers to decode onto, which skips the use of the Vpp unit and its
28
   // associated format reconciliation copy, avoiding all internal buffer
29
@@ -1229,6 +1233,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
30
       num_extra_pics_ = 3;
31
     return BufferAllocationMode::kNone;
32
   }
33
+#endif
34
 
35
   // For H.264 on older devices, another +1 is experimentally needed for
36
   // high-to-high resolution changes.
37