Add 12-bit profile (Main_444C_12_IP2) - #5112
Conversation
wantehchang
left a comment
There was a problem hiding this comment.
Xin: Thank you for writing this PR. I suggest some simple changes.
9527f14 to
7493fd0
Compare
0c15375 to
978195d
Compare
wantehchang
left a comment
There was a problem hiding this comment.
Xin: LGTM. Thanks! Note that I did not compare this PR with the corresponding spec PR (https://github.com/AOMediaCodec/av2-spec-internal/pull/776),
cfa60fb to
075f76c
Compare
075f76c to
c194f43
Compare
urvangjoshi
left a comment
There was a problem hiding this comment.
One comment related to CI job -- otherwise looks good.
08e7b0d to
a052daa
Compare
Flip the default for the 12-bit test-only profile from 0 to 1 so that 12-bit encode/decode is built in by default. Builds that explicitly opt out can still pass -DCONFIG_TESTONLY_12BIT_SUPPORT=0.
- Rename CONFIG_TESTONLY_12BIT_SUPPORT to CONFIG_12BIT_PROFILE and the profile enum to MAIN_4xx_12_IP2 (spec Main_4xx_12_IP2) - Accept 8/10/12-bit and all chroma formats for profile 5 - Set max mlayer count for profile 5 to 3 (IOP2 limit) - Give profile 5 its own PicSize/Bitrate factor row (36 / 3.0) per Table A.2 - Update Annex A profile/config tables and comments
Per the VCWG decision on 12-bit profile naming, rename the 12-bit profile from MAIN_4xx_12_IP2 to MAIN_444C_12_IP2 (spec Main_444C_12_IP2), where "C" stands for Comprehensive. - Rename the profile enum MAIN_4xx_12_IP2 to MAIN_444C_12_IP2 - Rename the multi-sequence configuration label C_MAIN_4xx_12 to C_MAIN_444C_12 to keep it aligned with the profile label - Update the Annex A profile/configuration tables and comments - Update the CONFIG_12BIT_PROFILE cmake help string Naming only; enum values (profile idc 5, configuration id 3) and all profile constraints and level factors are unchanged.
The spec defines MAXQ_12_BITS (MAXQ_8_BITS + 4 * MAXQ_OFFSET) as the maximum quantizer for bit depth 12, separately from MAXQ_BITS. No functional change: all values are identical before and after.
The function returns a row index into the PicSize/Bitrate factor tables, not the spec's ProfileScalingFactor from Table A.2. The two coincide for profiles 0..4, but MAIN_444C_12_IP2 (idc 5) shares ProfileScalingFactor 2 with MAIN_444_10_IP1 (idc 4) while needing different factors (36 / 3.0 vs 30 / 2.5), so it gets its own row index. Rename the function to get_profile_factor_table_row_index and the callers' locals to profile_factor_row, so the name states what the value is instead of relying on a comment to disclaim the old name. Trim the now-redundant sentence from the comment and replace the stale one-line description in annexA.h with a pointer to the full explanation. No functional change.
a052daa to
0db1923
Compare
|
@xinzhao-apple @wantehchang : the PR contains 9 commits. When merging, do we want Github to squash them into a single commit? Or keep 9 separate commits? |
|
Urvang: Please wait for Xin's reply. I think the 9 commits shoud be squashed into a single commit when you merge this PR. |
Hi @urvangjoshi I think we should squash them into a single commit. Thanks. |
This PR enables the 12-bit profile by default and brings its implementation into conformance with AV2 Spec Draft with 12-bit support: https://github.com/AOMediaCodec/av2-spec-internal/pull/776.