Sophie

Sophie

distrib > Mageia > 8 > aarch64 > by-pkgid > 5e8eaa8fde5e7d69b8ede68f46766092 > files > 35

chromium-browser-stable-104.0.5112.101-1.mga8.src.rpm

--- patch98/media/gpu/vaapi/vaapi_video_decode_accelerator.cc	2022-02-01 01:41:53.000000000 +0100
+++ patch98/media/gpu/vaapi/vaapi_video_decode_accelerator.cc.fix_intel	2022-02-01 17:07:58.056113867 +0100
@@ -58,6 +58,7 @@ unsigned int GetVaFormatForVideoCodecPro
   return VA_RT_FORMAT_YUV420;
 }
 
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
 // Returns true if the CPU is an Intel Gemini Lake or later (including Kaby
 // Lake) Cpu platform id's are referenced from the following file in kernel
 // source arch/x86/include/asm/intel-family.h
@@ -70,6 +71,7 @@ bool IsGeminiLakeOrLater() {
       cpuid.model() >= kGeminiLakeModelId;
   return is_geminilake_or_later;
 }
+#endif
 
 }  // namespace
 
@@ -1228,6 +1230,8 @@ VaapiVideoDecodeAccelerator::DecideBuffe
   if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
     return BufferAllocationMode::kNormal;
 
+#if defined(OS_ANDROID) || defined(OS_CHROMEOS)
+  // Move this to chromeOs only as it is causing problem in some intel linux drivers
   // On Gemini Lake, Kaby Lake and later we can pass to libva the client's
   // PictureBuffers to decode onto, which skips the use of the Vpp unit and its
   // associated format reconciliation copy, avoiding all internal buffer
@@ -1243,6 +1247,7 @@ VaapiVideoDecodeAccelerator::DecideBuffe
       num_extra_pics_ = 3;
     return BufferAllocationMode::kNone;
   }
+#endif 
 
   // For H.264 on older devices, another +1 is experimentally needed for
   // high-to-high resolution changes.