Browse Source

Update to 89.0.4389.114

tags/90.0.4430.93-1
wchen342 1 month ago
parent
commit
b58714fd65
Signed by: wchen342 GPG Key ID: 9C19365D69B04CEC
6 changed files with 705 additions and 5 deletions
  1. +567
    -0
      7ae60470cdb0bea4548a0f5e8271b359f9450c79.patch
  2. +71
    -0
      chromium-89-EnumTable-crash.patch
  3. +29
    -0
      chromium-89.0.4389.82-support-futex_time64.patch
  4. +14
    -0
      chromium-89.0.4389.82-widevine-no-download.patch
  5. +3
    -3
      sources
  6. +21
    -2
      ungoogled-chromium.spec

+ 567
- 0
7ae60470cdb0bea4548a0f5e8271b359f9450c79.patch View File

@ -0,0 +1,567 @@
From 7ae60470cdb0bea4548a0f5e8271b359f9450c79 Mon Sep 17 00:00:00 2001
From: Jeffrey Kardatzke <[email protected]>
Date: Fri, 5 Feb 2021 03:33:58 +0000
Subject: [PATCH] vaapi: Update for libva forwards compatibility
There was a downstream patch applied for protected content for libva.
This patch is now upstreamed, but is not compatible with the downstream
version. This change will allow us to update libva in ChromeOS to an
intermediate version that'll be compatible with both downstream and
upstream. Then we can shift Chrome to the upstream API, and then remove
the downstream compatibility layer from ChromeOS after that and be on
upstream.
BUG=b:174951211
TEST=Chrome builds, protected content plays back
Change-Id: Id06b21daf19a54b340236b354b5f4a828e2362de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2672690
Reviewed-by: Andres Calderon Jaramillo <[email protected]>
Reviewed-by: J Kardatzke <[email protected]>
Commit-Queue: J Kardatzke <[email protected]>
Cr-Commit-Position: refs/heads/[email protected]{#850949}
---
.../h264_vaapi_video_decoder_delegate.cc | 7 +
.../vaapi/h265_vaapi_video_decoder_delegate.h | 7 +
media/gpu/vaapi/va_prot.sigs | 1 -
media/gpu/vaapi/vaapi_utils.h | 7 +
.../gpu/vaapi/vaapi_video_decoder_delegate.cc | 11 +-
.../gpu/vaapi/vaapi_video_decoder_delegate.h | 7 +
media/gpu/vaapi/vaapi_wrapper.cc | 30 +--
media/gpu/vaapi/vaapi_wrapper.h | 7 +
.../va_protected_content.h | 225 ++----------------
tools/metrics/histograms/enums.xml | 2 +-
10 files changed, 75 insertions(+), 229 deletions(-)
diff --git a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
index 6e82506082ede..22fa594610540 100644
--- a/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
+++ b/media/gpu/vaapi/h264_vaapi_video_decoder_delegate.cc
@@ -4,6 +4,13 @@
#include "media/gpu/vaapi/h264_vaapi_video_decoder_delegate.h"
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/memory/aligned_memory.h"
diff --git a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
index d152c3df8a90a..986c2b530076e 100644
--- a/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
+++ b/media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_H265_VAAPI_VIDEO_DECODER_DELEGATE_H_
#define MEDIA_GPU_VAAPI_H265_VAAPI_VIDEO_DECODER_DELEGATE_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/memory/scoped_refptr.h"
diff --git a/media/gpu/vaapi/va_prot.sigs b/media/gpu/vaapi/va_prot.sigs
index 1ffcd61778d11..dd13dafef1add 100644
--- a/media/gpu/vaapi/va_prot.sigs
+++ b/media/gpu/vaapi/va_prot.sigs
@@ -9,5 +9,4 @@ VAStatus vaCreateProtectedSession(VADisplay dpy, VAConfigID config_id, VAProtect
VAStatus vaDestroyProtectedSession(VADisplay dpy, VAProtectedSessionID protected_session);
VAStatus vaAttachProtectedSession(VADisplay dpy, VAContextID reserved, VAProtectedSessionID protected_session);
VAStatus vaDetachProtectedSession(VADisplay dpy, VAContextID reserved);
-VAStatus vaProtectedSessionHwUpdate(VADisplay dpy, VAProtectedSessionID protected_session, VABufferID buf_id);
VAStatus vaProtectedSessionExecute(VADisplay dpy, VAProtectedSessionID protected_session, VABufferID buf_id);
\ No newline at end of file
diff --git a/media/gpu/vaapi/vaapi_utils.h b/media/gpu/vaapi/vaapi_utils.h
index 9bcee23ce96d1..fd42ad2a148e3 100644
--- a/media/gpu/vaapi/vaapi_utils.h
+++ b/media/gpu/vaapi/vaapi_utils.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_UTILS_H_
#define MEDIA_GPU_VAAPI_VAAPI_UTILS_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <va/va.h>
#include "base/callback_forward.h"
diff --git a/media/gpu/vaapi/vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
index 07b7b3ce03f1b..a0a8ea67bd8c6 100644
--- a/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
+++ b/media/gpu/vaapi/vaapi_video_decoder_delegate.cc
@@ -133,11 +133,13 @@ VaapiVideoDecoderDelegate::SetupDecryptDecode(
DCHECK_EQ(protected_session_state_, ProtectedSessionState::kCreated);
if (encryption_scheme_ == EncryptionScheme::kCenc) {
- crypto_params->encryption_type =
- full_sample ? VA_ENCRYPTION_TYPE_CENC_CTR : VA_ENCRYPTION_TYPE_CTR_128;
+ crypto_params->encryption_type = full_sample
+ ? VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR;
} else {
- crypto_params->encryption_type =
- full_sample ? VA_ENCRYPTION_TYPE_CENC_CBC : VA_ENCRYPTION_TYPE_CBC;
+ crypto_params->encryption_type = full_sample
+ ? VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC;
}
// For multi-slice we may already have segment information in here, so
@@ -224,6 +226,7 @@ VaapiVideoDecoderDelegate::SetupDecryptDecode(
memcpy(crypto_params->wrapped_decrypt_blob,
hw_key_data_map_[decrypt_config_->key_id()].data(),
DecryptConfig::kDecryptionKeySize);
+ crypto_params->key_blob_size = DecryptConfig::kDecryptionKeySize;
crypto_params->segment_info = &segments->front();
#else // if BUILDFLAG(IS_CHROMEOS_ASH)
protected_session_state_ = ProtectedSessionState::kFailed;
diff --git a/media/gpu/vaapi/vaapi_video_decoder_delegate.h b/media/gpu/vaapi/vaapi_video_decoder_delegate.h
index 1e222a41c543c..aeb48a75bd2c9 100644
--- a/media/gpu/vaapi/vaapi_video_decoder_delegate.h
+++ b/media/gpu/vaapi/vaapi_video_decoder_delegate.h
@@ -5,6 +5,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_VIDEO_DECODER_DELEGATE_H_
#define MEDIA_GPU_VAAPI_VAAPI_VIDEO_DECODER_DELEGATE_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <map>
#include <memory>
#include <string>
diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc
index 696ffaf00d866..cd2ee37998fbd 100644
--- a/media/gpu/vaapi/vaapi_wrapper.cc
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
@@ -133,7 +133,7 @@ enum class VaapiFunctions {
kVADestroyProtectedSession = 26,
kVAAttachProtectedSession = 27,
kVADetachProtectedSession = 28,
- kVAProtectedSessionHwUpdate = 29,
+ kVAProtectedSessionHwUpdate_Deprecated = 29,
kVAProtectedSessionExecute = 30,
// Anything else is captured in this last entry.
kOtherVAFunction = 31,
@@ -176,7 +176,7 @@ constexpr std::array<const char*,
"vaDestroyProtectedSession",
"vaAttachProtectedSession",
"vaDetachProtectedSession",
- "vaProtectedSessionHwUpdate",
+ "vaProtectedSessionHwUpdate (Deprecated)",
"vaProtectedSessionExecute",
"Other VA function"};
@@ -811,7 +811,7 @@ bool GetRequiredAttribs(const base::Lock* va_lock,
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (mode == VaapiWrapper::kDecodeProtected && profile != VAProfileProtected) {
required_attribs->push_back(
- {VAConfigAttribEncryption, VA_ENCRYPTION_TYPE_CTR_128});
+ {VAConfigAttribEncryption, VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR});
required_attribs->push_back(
{VAConfigAttribDecProcessing, VA_DEC_PROCESSING});
}
@@ -1852,13 +1852,14 @@ bool VaapiWrapper::CreateProtectedSession(
// We have to hold the VABuffer outside of the lock because its destructor
// will acquire the lock when it goes out of scope. We also must do this after
// we create the protected session.
- VAProtectedSessionHwUpdateBuffer hw_update_buf;
+ VAProtectedSessionExecuteBuffer hw_update_buf;
std::unique_ptr<ScopedVABuffer> hw_update = CreateVABuffer(
- VAProtectedSessionHwUpdateBufferType, sizeof(hw_update_buf));
+ VAProtectedSessionExecuteBufferType, sizeof(hw_update_buf));
{
base::AutoLock auto_lock(*va_lock_);
constexpr size_t kHwIdentifierMaxSize = 64;
memset(&hw_update_buf, 0, sizeof(hw_update_buf));
+ hw_update_buf.function_id = VA_TEE_EXEC_TEE_FUNCID_HW_UPDATE;
hw_update_buf.input.data_size = hw_config.size();
hw_update_buf.input.data =
static_cast<void*>(const_cast<uint8_t*>(hw_config.data()));
@@ -1868,22 +1869,22 @@ bool VaapiWrapper::CreateProtectedSession(
if (!MapAndCopy_Locked(
hw_update->id(),
{hw_update->type(), hw_update->size(), &hw_update_buf})) {
- LOG(ERROR) << "Failed mapping HwUpdate buf";
+ LOG(ERROR) << "Failed mapping Execute buf";
return false;
}
- VAStatus va_res = vaProtectedSessionHwUpdate(
+ VAStatus va_res = vaProtectedSessionExecute(
va_display_, va_protected_session_id_, hw_update->id());
- VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAProtectedSessionHwUpdate,
+ VA_SUCCESS_OR_RETURN(va_res, VaapiFunctions::kVAProtectedSessionExecute,
false);
ScopedVABufferMapping mapping(va_lock_, va_display_, hw_update->id());
if (!mapping.IsValid()) {
- LOG(ERROR) << "Failed mapping returned HwUpdate buf";
+ LOG(ERROR) << "Failed mapping returned Execute buf";
return false;
}
auto* hw_update_buf_out =
- reinterpret_cast<VAProtectedSessionHwUpdateBuffer*>(mapping.data());
+ reinterpret_cast<VAProtectedSessionExecuteBuffer*>(mapping.data());
if (!hw_update_buf_out->output.data_size) {
LOG(ERROR) << "Received empty HW identifier";
return false;
@@ -1964,10 +1965,9 @@ bool VaapiWrapper::IsProtectedSessionDead() {
if (va_protected_session_id_ == VA_INVALID_ID)
return false;
- constexpr uint32_t kVaTeeExecGpuFuncIdIsSessionAlive = 0x40000103;
uint8_t alive;
VAProtectedSessionExecuteBuffer tee_exec_buf = {};
- tee_exec_buf.function_id = kVaTeeExecGpuFuncIdIsSessionAlive;
+ tee_exec_buf.function_id = VA_TEE_EXEC_TEE_FUNCID_IS_SESSION_ALIVE;
tee_exec_buf.input.data_size = 0;
tee_exec_buf.input.data = nullptr;
tee_exec_buf.output.data_size = sizeof(alive);
@@ -2518,7 +2518,7 @@ std::unique_ptr<ScopedVABuffer> VaapiWrapper::CreateVABuffer(VABufferType type,
base::AutoLock auto_lock(*va_lock_);
TRACE_EVENT0("media,gpu", "VaapiWrapper::CreateVABufferLocked");
#if BUILDFLAG(IS_CHROMEOS_ASH)
- VAContextID context_id = type == VAProtectedSessionHwUpdateBufferType
+ VAContextID context_id = type == VAProtectedSessionExecuteBufferType
? va_protected_session_id_
: va_context_id_;
#else
@@ -2807,8 +2807,8 @@ bool VaapiWrapper::Initialize(CodecMode mode,
for (auto& attrib : required_attribs) {
if (attrib.type == VAConfigAttribEncryption) {
attrib.value = (encryption_scheme == EncryptionScheme::kCbcs)
- ? VA_ENCRYPTION_TYPE_CBC
- : VA_ENCRYPTION_TYPE_CTR_128;
+ ? VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC
+ : VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR;
}
}
}
diff --git a/media/gpu/vaapi/vaapi_wrapper.h b/media/gpu/vaapi/vaapi_wrapper.h
index 29b6864998240..f58723a0e852e 100644
--- a/media/gpu/vaapi/vaapi_wrapper.h
+++ b/media/gpu/vaapi/vaapi_wrapper.h
@@ -10,6 +10,13 @@
#ifndef MEDIA_GPU_VAAPI_VAAPI_WRAPPER_H_
#define MEDIA_GPU_VAAPI_VAAPI_WRAPPER_H_
+// TODO(jkardatzke): Remove this once the transition to the new upstream
+// protected content API is complete. This is used to bridge a transition
+// between the libva pull request we used, and what actually landed upstream.
+#ifndef LEGACY_UPSTREAM_PROTECTED_LIBVA
+#define LEGACY_UPSTREAM_PROTECTED_LIBVA
+#endif
+
#include <stddef.h>
#include <stdint.h>
#include <va/va.h>
diff --git a/third_party/libva_protected_content/va_protected_content.h b/third_party/libva_protected_content/va_protected_content.h
index dfea3ce94a285..c14a77da41389 100644
--- a/third_party/libva_protected_content/va_protected_content.h
+++ b/third_party/libva_protected_content/va_protected_content.h
@@ -46,6 +46,7 @@ extern "C" {
* @{
*/
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/**
*
* A protected content function for processing cipher protected content.
@@ -97,16 +98,19 @@ extern "C" {
/** \brief Encryption parameters buffer for content protection usage */
#define VAEncryptionParameterBufferType ((VABufferType)0x20001)
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
+
/**\brief CENC status paramter, used for vendor content protection only.
* The buffer corresponds to #VACencStatusParameters for va/cp*/
#define VACencStatusParameterBufferType ((VABufferType)0x20002)
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/** attribute values for VAConfigAttribEncryption */
#define VA_ENCRYPTION_TYPE_NONE 0x00000000
-#define VA_ENCRYPTION_TYPE_CENC_CBC 0x00000002
-#define VA_ENCRYPTION_TYPE_CENC_CTR 0x00000008
-#define VA_ENCRYPTION_TYPE_CTR_128 0x00000010
-#define VA_ENCRYPTION_TYPE_CBC 0x00000020
+#define VA_ENCRYPTION_TYPE_FULLSAMPLE_CBC 0x00000002
+#define VA_ENCRYPTION_TYPE_FULLSAMPLE_CTR 0x00000008
+#define VA_ENCRYPTION_TYPE_SUBSAMPLE_CTR 0x00000010
+#define VA_ENCRYPTION_TYPE_SUBSAMPLE_CBC 0x00000020
/** attribute values for VAConfigAttribContentProtectionSessionMode */
#define VA_PC_SESSION_MODE_NONE 0x00000000
@@ -132,18 +136,11 @@ extern "C" {
#define VA_PC_SAMPLE_TYPE_FULLSAMPLE 0x00000001
#define VA_PC_SAMPLE_TYPE_SUBSAMPLE 0x00000002
-/** \brief TeeExec Function Codes. */
-typedef enum _VA_TEE_EXEC_FUNCTION_ID {
- VA_TEE_EXEC_TEE_FUNCID_PASS_THROUGH_NONE = 0x0,
-
- // 0x40000000~0x400000FFF reserved for TEE Exec GPU function
- VA_TEE_EXEC_GPU_FUNCID_ENCRYPTION_BLT = 0x40000000,
- VA_TEE_EXEC_GPU_FUNCID_DECRYPTION_BLT = 0x40000001,
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
- // 0x40001000~0x400001FFF reserved for TEE Exec TEE function
- VA_TEE_EXEC_TEE_FUNCID_PASS_THROUGH = 0x40001000,
-
-} VA_TEE_EXEC_FUNCTION_ID;
+/** \brief TeeExec Function Codes. */
+#define VA_TEE_EXEC_TEE_FUNCID_HW_UPDATE 0x40000002
+#define VA_TEE_EXEC_TEE_FUNCID_IS_SESSION_ALIVE 0x40000103
/** \brief values for the encryption return status. */
typedef enum {
@@ -159,6 +156,7 @@ typedef enum {
VA_ENCRYPTION_STATUS_UNSUPPORT
} VAEncryptionStatus;
+#ifdef LEGACY_UPSTREAM_PROTECTED_LIBVA
/** \brief structure for encrypted segment info. */
typedef struct _VAEncryptionSegmentInfo {
/** \brief The offset relative to the start of the bitstream input in
@@ -212,23 +210,12 @@ typedef struct _VAEncryptionParameters {
* encrypted, i.e. the CENC or CBC1 scheme is being used.
*/
uint32_t blocks_stripe_clear;
+ /* Forwards compatibility */
+ uint32_t key_blob_size;
/** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
+ uint32_t va_reserved[VA_PADDING_MEDIUM - sizeof(uint32_t)];
} VAEncryptionParameters;
-
-/** \brief structure for VA_TEE_EXEC_GPU_FUNCID_ENCRYPTION_BLT */
-typedef struct _VA_PROTECTED_BLT_PARAMS {
- uint8_t* src_resource; // The source resource which contains the clear data.
- uint8_t*
- dst_resource; // The Destination resource. This resource will contain the
- // encrypted data. It should be allocated by the caller.
- uint32_t width; // The width of the surface in Bytes.
- uint32_t height; // The height of the surface in Bytes (pay attention that
- // for NV12 the height(Bytes) = 1.5*height(Pixel)).
- VAEncryptionParameters*
- enc_params; // The encryption parameters as defined by application
- void* reserved_extension; // The reserved extension for future BLT operations
-} VA_PROTECTED_BLT_PARAMS;
+#endif // LEGACY_UPSTREAM_PROTECTED_LIBVA
/** \brief cenc status parameters, corresponding to
* #VACencStatusParameterBufferType*/
@@ -311,184 +298,6 @@ typedef struct _VACencSliceParameterBufferH264 {
uint32_t va_reserved[VA_PADDING_MEDIUM];
} VACencSliceParameterBufferH264;
-/**
- * \brief Slice parameter for HEVC cenc decode in main & main 10 profiles.
- *
- * This structure holds information for \c
- * slice_segment_header() and nal_unit_header() of the slice as
- * defined by the HEVC specification.
- *
- */
-typedef struct _VACencSliceParameterBufferHEVC {
- /** \brief Same as the HEVC bitstream syntax element. */
- uint8_t nal_unit_type;
- /** \brief Corresponds to the HEVC bitstream syntax element.
- * Same as nuh_temporal_id_plus1 - 1*/
- uint8_t nuh_temporal_id;
- /** \brief Slice type.
- * Corresponds to HEVC syntax element of the same name. */
- uint8_t slice_type;
- /** \brief Same as the HEVC bitstream syntax element. */
- uint16_t slice_pic_order_cnt_lsb;
- /** \brief Indicates EOS_NUT or EOB_NUT is detected in picture. */
- uint16_t has_eos_or_eob;
-
- union {
- struct {
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t no_output_of_prior_pics_flag : 1;
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t pic_output_flag : 1;
- /** \brief Same as the HEVC bitstream syntax element */
- uint32_t colour_plane_id : 2;
- /** \brief Reserved for future use, must be zero */
- uint32_t reserved : 19;
- } bits;
- uint32_t value;
- } slice_fields;
-
- /** \brief Parameters for driver reference frame set */
- /**@{*/
-
- /** \brief number of entries as current before in short-term rps
- * Corresponds to NumPocStCurrBefore as the HEVC specification. */
- uint8_t num_of_curr_before;
- /** \brief number of entries as current after in short-term rps
- * Corresponds to NumPocStCurrAfter as the HEVC specification. */
- uint8_t num_of_curr_after;
- /** \brief number of entries as current total in short-term rps*/
- uint8_t num_of_curr_total;
- /** \brief number of entries as foll in short-term rps
- * Corresponds to NumPocStFoll as the HEVC specification.*/
- uint8_t num_of_foll_st;
- /** \brief number of entries as current in long-term rps
- * Corresponds to NumPocLtCurr as the HEVC specification. */
- uint8_t num_of_curr_lt;
- /** \brief number of entries as foll in long-term rps
- * Corresponds to NumPocLtFoll as the HEVC specification.*/
- uint8_t num_of_foll_lt;
- /** \brief delta poc as short-term current before
- * Corresponds to PocStCurrBefore as the HEVC specification. */
- int32_t delta_poc_curr_before[8];
- /** \brief delta poc as short-term current after
- * Corresponds to PocStCurrAfter, as the HEVC specification.*/
- int32_t delta_poc_curr_after[8];
- /** \brief delta poc as short-term current total */
- int32_t delta_poc_curr_total[8];
- /** \brief delta poc as short-term foll
- * Corresponds to PocStFoll as the HEVC specification.*/
- int32_t delta_poc_foll_st[16];
- /** \brief delta poc as long-term current
- * Corresponds to PocLtCurr as the HEVC specification.*/
- int32_t delta_poc_curr_lt[8];
- /** \brief delta poc as long-term foll
- * Corresponds to PocLtFoll, as the HEVC specification.*/
- int32_t delta_poc_foll_lt[16];
- /** \brief delta poc msb present flag
- * Same as the HEVC bitstream syntax element. */
- uint8_t delta_poc_msb_present_flag[16];
- /** \brief long-term reference RPS is used for reference by current picture*/
- uint8_t is_lt_curr_total[8];
- /** \brief index of reference picture list. [0] is for P and B slice, [1] is
- * for B slice*/
- uint8_t ref_list_idx[2][16];
- /**@}*/
- /** \brief Pointer to the next #VACencSliceParameterBufferHEVC element,
- * or \c nullptr if there is none.*/
- void* next;
-
- /** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
-} VACencSliceParameterBufferHEVC;
-
-/**
- * \brief uncompressed header for VP9 cenc decode
- *
- * This structure holds information for \c
- * uncompressed_header() as defined by the VP9 specification.
- *
- */
-typedef struct _VACencSliceParameterBufferVP9 {
- union {
- struct {
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t profile : 2;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t show_existing_frame_flag : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_to_show_map_idx : 3;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_type : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t show_frame : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t error_resilient_mode : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t intra_only : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t ten_or_twelve_bit : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t color_space : 3;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t color_range : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t subsampling_x : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t subsampling_y : 1;
- /** \brief Corresponds to ref_frame_idx[0]
- * as the VP9 specification */
- uint32_t ref_frame_idx0 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[LAST_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias0 : 1;
- /** \brief Corresponds to ref_frame_idx[1]
- * as the VP9 specification */
- uint32_t ref_frame_idx1 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[GOLDEN_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias1 : 1;
- /** \brief Corresponds to ref_frame_idx[2]
- * as the VP9 specification */
- uint32_t ref_frame_idx2 : 3;
- /** \brief Corresponds to ref_frame_sign_bias[ALTREF_FRAME]
- * as the VP9 specification */
- uint32_t ref_frame_sign_bias2 : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t frame_parallel_decoding_mode : 1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint32_t render_and_frame_size_different : 1;
- /** \brief Reserved for future use, must be zero */
- uint32_t reserved : 1;
- } bits;
- uint32_t value;
- } header_fields;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t frame_width_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t frame_height_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t render_width_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint16_t render_height_minus1;
- /** \brief Same as the VP9 bitstream syntax element. */
- uint8_t refresh_frame_flags;
- /** \brief Parameters for super frame*/
- /**@{*/
- /** \brief Superframe index, from 0 to frames_in_superframe_minus_1.
- * as the VP9 specification */
- uint8_t sf_index;
- /** \brief Superframe size, corresponds to frame_sizes[ sf_index ]
- * as the VP9 specification */
- uint32_t sf_frame_size;
- /**@}*/
- /** \brief Pointer to the next #VACencSliceParameterBufferVP9 element,
- * or \c nullptr if there is none.*/
- void* next;
-
- /** \brief Reserved bytes for future use, must be zero */
- uint32_t va_reserved[VA_PADDING_MEDIUM];
-} VACencSliceParameterBufferVP9;
-
/** \brief Cenc Slice Buffer Type*/
typedef enum {
/** \brief Parsed slice parameters \c VACencSliceParameterBuffer* */
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml
index e88db8a3f1201..c1bd0d7db925f 100644
--- a/tools/metrics/histograms/enums.xml
+++ b/tools/metrics/histograms/enums.xml
@@ -77050,7 +77050,7 @@ Full version information for the fingerprint enum values:
<int value="26" label="vaDestroyProtectedSession()"/>
<int value="27" label="vaAttachProtectedSession()"/>
<int value="28" label="vaDetachProtectedSession()"/>
- <int value="29" label="vaProtectedSessionHwUpdate()"/>
+ <int value="29" label="vaProtectedSessionHwUpdate() (deprecated)"/>
<int value="30" label="kVAProtectedSessionExecute()"/>
<int value="31" label="Other VA functions"/>
</enum>

+ 71
- 0
chromium-89-EnumTable-crash.patch View File

@ -0,0 +1,71 @@
diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
index e3130c7..2ad16ea 100644
--- a/components/cast_channel/enum_table.h
+++ b/components/cast_channel/enum_table.h
@@ -212,7 +212,7 @@ class
template <typename E>
friend class EnumTable;
- DISALLOW_COPY_AND_ASSIGN(GenericEnumTableEntry);
+ DISALLOW_ASSIGN(GenericEnumTableEntry);
};
// Yes, these constructors really needs to be inlined. Even though they look
@@ -250,8 +250,7 @@ class EnumTable {
// Constructor for regular entries.
constexpr Entry(E value, base::StringPiece str)
: GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
-
- DISALLOW_COPY_AND_ASSIGN(Entry);
+ DISALLOW_ASSIGN(Entry);
};
static_assert(sizeof(E) <= sizeof(int32_t),
@@ -306,15 +305,14 @@ class EnumTable {
if (is_sorted_) {
const std::size_t index = static_cast<std::size_t>(value);
if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
- const auto& entry = data_.begin()[index];
+ const auto& entry = data_[index];
if (ANALYZER_ASSUME_TRUE(entry.has_str()))
return entry.str();
}
return base::nullopt;
}
return GenericEnumTableEntry::FindByValue(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), static_cast<int32_t>(value));
+ &data_[0], data_.size(), static_cast<int32_t>(value));
}
// This overload of GetString is designed for cases where the argument is a
@@ -342,8 +340,7 @@ class EnumTable {
// enum value directly.
base::Optional<E> GetEnum(base::StringPiece str) const {
auto* entry = GenericEnumTableEntry::FindByString(
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
- data_.size(), str);
+ &data_[0], data_.size(), str);
return entry ? static_cast<E>(entry->value) : base::Optional<E>();
}
@@ -358,7 +355,7 @@ class EnumTable {
// Align the data on a cache line boundary.
alignas(64)
#endif
- std::initializer_list<Entry> data_;
+ const std::vector<Entry> data_;
bool is_sorted_;
constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
@@ -370,8 +367,8 @@ class EnumTable {
for (std::size_t i = 0; i < data.size(); i++) {
for (std::size_t j = i + 1; j < data.size(); j++) {
- const Entry& ei = data.begin()[i];
- const Entry& ej = data.begin()[j];
+ const Entry& ei = data[i];
+ const Entry& ej = data[j];
DCHECK(ei.value != ej.value)
<< "Found duplicate enum values at indices " << i << " and " << j;
DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))

+ 29
- 0
chromium-89.0.4389.82-support-futex_time64.patch View File

@ -0,0 +1,29 @@
diff -up chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.futex-time64 chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc.futex-time64 2021-03-15 15:31:09.440719811 -0400
+++ chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2021-03-15 15:33:27.494393985 -0400
@@ -191,7 +191,11 @@ ResultExpr EvaluateSyscallImpl(int fs_de
}
#endif
- if (sysno == __NR_futex)
+ if (sysno == __NR_futex
+#if defined(__NR_futex_time64)
+ || sysno == __NR_futex_time64
+#endif
+ )
return RestrictFutex();
if (sysno == __NR_set_robust_list)
diff -up chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.futex-time64 chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc.futex-time64 2021-03-15 15:33:45.018479568 -0400
+++ chromium-89.0.4389.82/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2021-03-15 15:34:55.002821350 -0400
@@ -420,6 +420,9 @@ bool SyscallSets::IsAllowedFutex(int sys
case __NR_get_robust_list:
case __NR_set_robust_list:
case __NR_futex:
+#if defined(__NR_futex_time64)
+ case __NR_futex_time64:
+#endif
default:
return false;
}

+ 14
- 0
chromium-89.0.4389.82-widevine-no-download.patch View File

@ -0,0 +1,14 @@
diff -up chromium-89.0.4389.82/chrome/browser/component_updater/registration.cc.widevine-no-download chromium-89.0.4389.82/chrome/browser/component_updater/registration.cc
--- chromium-89.0.4389.82/chrome/browser/component_updater/registration.cc.widevine-no-download 2021-03-18 14:10:27.606759188 -0400
+++ chromium-89.0.4389.82/chrome/browser/component_updater/registration.cc 2021-03-18 14:10:41.792833905 -0400
@@ -96,10 +96,6 @@ void RegisterComponentsForUpdate(bool is
// TODO(crbug.com/1069814): Remove after 2021-10-01.
CleanUpPepperFlashComponent();
-#if BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
- RegisterWidevineCdmComponent(cus);
-#endif // BUILDFLAG(ENABLE_WIDEVINE_CDM_COMPONENT)
-
#if BUILDFLAG(ENABLE_NACL) && !defined(OS_ANDROID)
#if BUILDFLAG(IS_CHROMEOS_ASH)
// PNaCl on Chrome OS is on rootfs and there is no need to download it. But

+ 3
- 3
sources View File

@ -19,6 +19,6 @@ SHA512 (NotoSansSymbols2-Regular.ttf) = 8889d356da290fb4a75584db238a874eaea41c7e
SHA512 (NotoSansTibetan-Regular.ttf) = 7256b3219b0607e86d58661dd382a1429babc412b82a4fce659b2db41cd8ebd9d7183c9dddd55b5deae45140627951698edbc7f6b5d36cd486e23c1886a98971
SHA512 (node-v10.15.3-linux-x64.tar.gz) = 5eb544ef706562981340a82acc79e2162c6a3e4049b4a95f69ce353ee5b0f929c60b1fc457e8249b3fb0696f82fc28c5f543f5947db19fae4e9d5c21b906bb20
SHA512 (xcb-proto-1.14.tar.xz) = de66d568163b6da2be9d6c59984f3afa3acd119a781378638045fd68018665ef5c9af98f024e9962ba3eb7c7a4d85c27ba70ffafceb2324ccc6940f34de16690
SHA512 (depot_tools.git-master.tar.gz) = 2462b647a60bc8fa54b0f38f92adbba2e68a63dd947f6d7d1d839c204162554d065339e4d493b8c0bc162d4722231463b69f7a9fef95268e2ee0ce6e5e10637c
SHA512 (chromium-89.0.4389.90-clean.tar.xz) = 2c0d542bcb63cdbd47daf9541ff97b24d4235d34522d6ab4d1b588b24d3eba59305fe74046537c1786ee6b92fda7197fe34b32ab9c53185f38980f07ee0e2734
SHA512 (ungoogled-chromium-89.0.4389.90-1.tar.gz) = 2bcbf985ea246137dc944930e34de29f18d5ba5fc6f83b37d85fdb2e7d5ecb80f6a5eca65a4818e4ba2427f8593bad0c5ff8904b64c14ec9c267e7e85e229324
SHA512 (depot_tools.git-master.tar.gz) = 54a2f822e6c4cc9f41e377296551b8c4c26146dfe058337140dc099297c3656f0e63d940f794ed6e8ba749afc5eaf02154fa4a4b7b6445848a2dbfd003753001
SHA512 (chromium-89.0.4389.114-clean.tar.xz) = 9906ad5bc51e12eef2d4bb64e90ab6a4e366e899b9e05229d7adba5c03c464deb12c342e12b1532a33dbbe266dd0c3902b4462066577a9e914a03a851b6e52ad
SHA512 (ungoogled-chromium-89.0.4389.114-1.tar.gz) = 935d02429752bbb71f8d1199325ac5c8c8705043f284c15c4cd49f4508ccad9ffaf99f7b3a7bb4f46a761e364a7bb4a86dd954c76ee30a403427ccf8df9a9559

+ 21
- 2
ungoogled-chromium.spec View File

@ -168,7 +168,7 @@ Name: ungoogled-chromium%{nsuffix}
%else
Name: ungoogled-chromium
%endif
Version: %{majorversion}.0.4389.90
Version: %{majorversion}.0.4389.114
Release: 1%{?dist}.%{revision}
%if %{?freeworld}
# chromium-freeworld
@ -246,6 +246,18 @@ Patch75: chromium-88.0.4324.96-fstatfix.patch
Patch76: chromium-88.0.4324.182-rawhide-gcc-std-max-fix.patch
# Fix symbol visibility with gcc on swiftshader's libEGL
Patch77: chromium-88.0.4324.182-gcc-fix-swiftshader-libEGL-visibility.patch
# Include support for futex_time64 (64bit time on 32bit platforms)
# https://chromium.googlesource.com/chromium/src/+/955a586c63c4f99fb734e44221db63f5b2ca25a9%5E%21/#F0
Patch78: chromium-89.0.4389.82-support-futex_time64.patch
# Do not download proprietary widevine module in the background (thanks Debian)
Patch79: chromium-89.0.4389.82-widevine-no-download.patch
# Fix crashes with components/cast_*
# Thanks to Gentoo
# https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/chromium/files/chromium-89-EnumTable-crash.patch
Patch80: chromium-89-EnumTable-crash.patch
# Fix build issues with newer libva
# https://github.com/chromium/chromium/commit/7ae60470cdb0bea4548a0f5e8271b359f9450c79.patch
Patch81: 7ae60470cdb0bea4548a0f5e8271b359f9450c79.patch
# Use lstdc++ on EPEL7 only
Patch101: chromium-75.0.3770.100-epel7-stdc++.patch
@ -330,7 +342,7 @@ Source20: https://www.x.org/releases/individual/proto/xcb-proto-1.14.tar.xz
Source21: %{name}.appdata.xml
# ungoogled-chromium source
%global ungoogled_chromium_revision 89.0.4389.90-1
%global ungoogled_chromium_revision 89.0.4389.114-1
Source300: https://github.com/Eloston/ungoogled-chromium/archive/%{ungoogled_chromium_revision}/ungoogled-chromium-%{ungoogled_chromium_revision}.tar.gz
# We can assume gcc and binutils.
@ -673,6 +685,10 @@ Requires: minizip%{_isa}
%patch76 -p1 -b .sigstkszfix
%endif
%patch77 -p1 -b .gcc-swiftshader-visibility
%patch78 -p1 -b .futex-time64
%patch79 -p1 -b .widevine-no-download
%patch80 -p1 -b .EnumTable-crash
%patch81 -p1 -b .libva-forward-compat
# EPEL specific patches
@ -1466,6 +1482,9 @@ fi
%endif
%changelog
* Thu Apr 1 2021 wchen342 <[email protected]> - 89.0.4389.114-1
- Update Chromium to 89.0.4389.114
* Tue Mar 9 2021 wchen342 <[email protected]> - 89.0.4389.82-1
- Update Chromium to 89.0.4389.82


Loading…
Cancel
Save