Repository navigation
media: apple: ave: enable 6070 HEVC Main 10 (P010) and HEVC SPS VUI colorimetry/HDR10 - #3913
RyanTheTide wants to merge 3 commits into
Conversation
Enable 10-bit HEVC Main 10 encoding from P010 input on the 6070 firmware layout (M1 Pro / T6000 and T8112 13.5). The 6070 Start layout already maps the profile, compatibility flags, luma/chroma bit depth, input depth, and 10-bit reconstruction surface layout, and the session allocator already scales reconstruction and entropy channel buffers for 10-bit. Lift the layout gate in ave_main10_supported() and ave_sess_params(), scale the 6070 entropy aux channels alongside the main entropy channels, adjust the 6070 CQ QP floor by -12 (QpBdOffset) and Main compatibility flag for 10-bit, and populate the 6070 Process reconstruction pointers for 10-bit frames. Add KUnit coverage (ave_6070_hevc_main10) checking the 6070 Main 10 Start and Process command fields. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Map V4L2 OUTPUT format colorimetry (colorspace, xfer_func, ycbcr_enc, quantization) to ITU-T H.273 / H.265 Annex E VUI parameters and write them into the HEVC Start command across the 9003, 26A428/26B123, and 6070 firmware layouts. When V4L2 colorimetry is set (including Rec.709 SDR, BT.2020 + SMPTE ST 2084 PQ HDR10, and full/limited range), set vui_parameters_present_flag, video_signal_type_present_flag, video_format (unspecified), video_full_range_flag, colour_description_present_flag, colour_primaries, transfer_characteristics, and matrix_coeffs in the HEVC SPS template so decoders identify BT.709/BT.2020/HDR10 and range from the bitstream. Add KUnit coverage (ave_hevc_vui_colorimetry) across all four layouts while keeping ave_9003_byte_equality unchanged. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Updated: merged main @7b10eb104ce6 (3514112, clean; main's ave.h and tests/run.py changes auto-merged). No code change. Local on the merged head: Still needed: the M1 Pro (6070) row, which is the encoder the Main 10 half of this PR enables and is still marked pending in the body; queued in HWROWS for our J314s, with a J473 regression check on the merged head. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
|
Hardware verification at exact head Summary
Root Cause Observed on
|
|
Hardware row at exact head
How: one combined test kernel for six PRs, not this PR alone. Kernel |
|
Back to draft: the exact-head M1 Pro row above fails. HEVC Main 10 (P010) encodes finish with the exact VUI and no decode errors, but the picture is garbled (Y PSNR about 9 dB at 1080p and 4K); NV12 is fine. That matches the separate M1 Pro row from 16:11. The 6070 Main 10 path needs a fix before this comes out of draft again. |
Summary
Two focused changes to
drivers/media/platform/apple/ave/(~146 non-test lines):Enable HEVC Main 10 (P010) on the 6070 encoder (
M1 Pro / T6000,T8112 13.5):AVE_LAYOUT_6070inave_main10_supported()and drop the 8-bit-only guard inave_sess_params().min_qpfloor to-AVE_QP_BD_OFFSET_10(-12), clearprofile_compatibility_flag[1](Main) for 10-bit, and populate the 6070 Process reconstruction descriptors for 10-bit frames.ave_6070_hevc_main10).Signal HEVC VUI colorimetry and HDR10 transfer in SPS (all AVE layouts):
colorspace,xfer_func,ycbcr_enc,quantization) to ITU-T H.273 / H.265 Annex E VUI codes (including Rec.709 SDR, BT.2020 + SMPTE ST 2084 PQ HDR10, BT.2020 10-bit, sRGB, and full/limited range).9003,26A428/26B123, and6070layouts.ave_9003_byte_equalityunchanged and add KUnit coverage (ave_hevc_vui_colorimetry) across all four layouts.Verification (exact head
04227a3dd7e7de0490c1b63c58c71c28957b5a5a)scripts/checkpatch.pl --git HEAD~2..HEAD --no-tree: 0 errors, 0 warnings.python3 tools/asahi/run-host-tests.py --only ave: 11/11 PASS (ASan+UBSan).drivers/media/platform/apple/ave/.kunitconfig): 58/58 PASS (incl.ave_9003_byte_equality,ave_6070_hevc_main10,ave_hevc_vui_colorimetry).LLVM=1 W=1 KCFLAGS="-Werror" drivers/media/platform/apple/ave/: clean (0 warnings, 0 errors).Exact-Head Hardware Rows (5 Macs / 40 streams verified; M1 Pro
6070.11.1row pending lock release)All bitstreams verified with
ffprobe(profile,pix_fmt, VUIcolor_*),ffmpegsoftware decode (0 errors), and frame-for-frame planar PSNR against deterministic source YUVs. Zero DART faults, zero Oops/BUGs.pix_fmtspace/xfer/prim/range)j473, T8112,26B123)yuv420pbt709 / bt709 / bt709 / tvj473, T8112,26B123)yuv420p10lebt709 / bt709 / bt709 / tvj473, T8112,26B123)yuv420p10lebt2020nc / smpte2084 / bt2020 / tvj473, T8112,26B123)yuv420p10lebt2020nc / bt2020-10 / bt2020 / pcj473, T8112,26B123)bt709,smpte2084/tv,bt2020-10/pc)j413, T8112,26B123)bt709,smpte2084/tv,bt2020-10/pc)j615, T8122,26B123)bt709,smpte2084/tv,bt2020-10/pc)j713, T8132,26B123)bt709,smpte2084/tv,bt2020-10/pc)neo, T8140,9003.78.0)bt709,smpte2084/tv,bt2020-10/pc)neo, T8140,9003.78.0)bt709,smpte2084/tv,bt2020-10/pc)m1pro, T6000,6070.11.1)