commit 992f2b837f7c150bebe40a8186420c5c065b71f8 Author: Chen-Yu Tsai Date: Mon Jul 31 04:50:11 2023 +0000 media/gpu/v4l2: Only set HEVC .num_delta_pocs_of_ref_rps_idx on ChromeOS The HEVC decode parameter .num_delta_pocs_of_ref_rps_idx field was very recently added to support MediaTek's stateless HEVC decoder. It was accepted upstream, but hasn't been part of a release yet, and so hasn't trickled down into a distro package that can be included in the sysroots. Guard the field assignment for now so that the Linux builds can proceed. Bug: b:258331312, b:291169645 Cq-Include-Trybots: luci.chromium.try:linux-v4l2-codec-rel Change-Id: I1629be2373e7d67ea06a206226ad09bce90c3752 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4728846 Reviewed-by: Nathan Hebert Auto-Submit: Chen-Yu Tsai Commit-Queue: Chen-Yu Tsai Cr-Commit-Position: refs/heads/main@{#1177093} diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc index d683fbb5407a4..0f02f39758fe9 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc @@ -11,6 +11,7 @@ #include #include "base/logging.h" +#include "build/build_config.h" #include "media/gpu/macros.h" #include "media/gpu/v4l2/v4l2_decode_surface.h" #include "media/gpu/v4l2/v4l2_decode_surface_handler.h" @@ -410,8 +411,14 @@ V4L2VideoDecoderDelegateH265::SubmitFrameMetadata( .pic_order_cnt_val = pic->pic_order_cnt_val_, .short_term_ref_pic_set_size = static_cast<__u16>(slice_hdr->st_rps_bits), .long_term_ref_pic_set_size = static_cast<__u16>(slice_hdr->lt_rps_bits), +#if BUILDFLAG(IS_CHROMEOS) + // .num_delta_pocs_of_ref_rps_idx is upstream but not yet pulled + // into linux build sysroot. + // TODO(wenst): Remove once linux-libc-dev package is updated to + // at least v6.5 in the sysroots. .num_delta_pocs_of_ref_rps_idx = static_cast<__u8>(slice_hdr->st_ref_pic_set.rps_idx_num_delta_pocs), +#endif .flags = static_cast<__u64>( (pic->irap_pic_ ? V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC : 0) | ((pic->nal_unit_type_ >= H265NALU::IDR_W_RADL &&