Introduction
Annex I of ITU-T H.264 (06/2026, version 16) defines 3D-AVC, the last of the 3D extensions. It builds on the multiview and depth (MVCD) structure of Annex H, with texture and depth views in NAL unit types 20 and 21, and adds tools that predict motion and brightness between views using depth: depth-based motion vector prediction, view synthesis prediction, depth-range-based weighted prediction and adaptive luminance compensation. The base view remains plain H.264. Everything not described below is as in Annexes G and H. Depth views are 4:0:0.
A NAL unit of type 21 starts with avc_3d_extension_flag. When it is 1 the
3D-AVC header below follows; when it is 0 the type 21 unit uses the
MVC header and the Annex H rules. Depth
parameter sets travel in NAL unit type 16.
NAL unit header 3D-AVC extension (I.7.3.1.1)
| Field | Coding | Meaning |
|---|---|---|
view_idx | u(8) | view order index (VOIdx) of the unit; view_id is view_id[view_idx] of the active SPS. This replaces the 10-bit view_id and the priority |
depth_flag | u(1) | 1: the unit belongs to a depth view component, 0: a texture view component |
non_idr_flag | u(1) | as in Annex G |
temporal_id | u(3) | as in Annex G |
anchor_pic_flag | u(1) | as in Annex G |
inter_view_flag | u(1) | as in Annex G |
SPS 3D-AVC extension (I.7.3.2.1.5)
Part of the subset SPS after the MVCD extension, when profile_idc is 139.
NumDepthViews, depth_view_present_flag and
texture_view_present_flag come from the
MVCD extension.
| Field | Coding | Condition | Meaning |
|---|---|---|---|
Only when NumDepthViews > 0: | |||
3dv_acquisition_idc | ue(v) | 0: no depth ranges or view synthesis parameters in the SPS; 1: present and valid for the whole sequence; 2: present, and depth parameter sets with id above 0 may be activated; above 2 reserved | |
view_id_3dv[i] | ue(v) | i < NumDepthViews | the view_id that the i-th set of acquisition parameters belongs to |
depth_ranges(NumDepthViews, 2, 0) and vsp_param(NumDepthViews, 2, 0) | idc not 0 | see depth parameter set; always unpredicted here | |
reduced_resolution_flag | u(1) | 1: depth views are half the width and height of the texture views | |
depth_pic_width_in_mbs_minus1, depth_pic_height_in_map_units_minus1 | ue(v) each | reduced resolution | take the place of pic_width_in_mbs_minus1 and pic_height_in_map_units_minus1 for depth views |
depth_hor_mult_minus1, depth_ver_mult_minus1 | ue(v) | reduced resolution | 0 to 1023 (inferred 1 when absent); used by the depth-based disparity derivation (I.8.2.1.1) |
depth_hor_rsh, depth_ver_rsh | ue(v) | reduced resolution | right shifts, 0 to 31 (inferred 0) |
depth_frame_cropping_flag | u(1) | 1: crop offsets for depth views follow | |
depth_frame_crop_left_offset, _right_, _top_, _bottom_offset | ue(v) each | flag | replace the frame_crop_* values for depth views; the crop rectangle is CropUnitX * left to PicWidthInSamplesL − (CropUnitX * right + 1) horizontally and likewise vertically (I-8) |
grid_pos_num_views | ue(v) | 0 to 1024 | |
grid_pos_view_id[i] | ue(v) | per entry | a texture view_id |
grid_pos_x[…], grid_pos_y[…] | se(v) each | per entry | offset of the depth sampling grid relative to the texture luma grid, in texture luma samples; 0 for a view not listed |
slice_header_prediction_flag | u(1) | 1: slice headers may be predicted from another view component (see below) | |
seq_view_synthesis_flag | u(1) | 1: view synthesis prediction is enabled | |
| Always: | |||
alc_sps_enable_flag | u(1) | 1: adaptive luminance compensation flags may occur | |
enable_rle_skip_flag | u(1) | 1: mb_skip_run_type may occur | |
num_anchor_refs_l0[i], anchor_ref_l0[i][j], num_anchor_refs_l1[i], anchor_ref_l1[i][j], num_non_anchor_refs_l0[i], non_anchor_ref_l0[i][j], num_non_anchor_refs_l1[i], non_anchor_ref_l1[i][j] | ue(v) | not all views paired, i from 1, texture view present | texture inter-view references as in MVC; when absent they equal those of the MVCD extension in the same subset SPS. AllViewsPairedFlag is 1 when every view from 1 has both a depth and a texture view |
ViewCompOrder(depthFlag, viewId) is 2 * i + depthFlag for the
first i with that view_id and that component present, which
orders texture before depth when TextureFirstFlag is 1.
Depth parameter set (I.7.3.2.13)
NAL unit type 16. Id 0 stands for the depth ranges and view synthesis parameters in the active SPS. Parameter sets can be predicted from one or two earlier ones.
| Field | Coding | Condition | Meaning |
|---|---|---|---|
depth_parameter_set_id | ue(v) | 1 to 63 | |
pred_direction | ue(v) | 0: ZNear and ZFar of the base view may be predicted from two pictures; 1: from one; 2: not predicted | |
ref_dps_id0 | ue(v) | direction 0 or 1 | first reference parameter set, 0 to 63 (predWeight0 = 64) |
ref_dps_id1 | ue(v) | direction 0 | second reference |
pred_weight0 | u(6) | direction 0 | weight of the first reference, 0 to 63; the second gets 64 minus it |
num_depth_views_minus1 | ue(v) | views − 1, 0 to 1023 | |
depth_ranges(num_depth_views_minus1 + 1, pred_direction, id) | see below | ||
vsp_param_flag | u(1) | 1: vsp_param() follows | |
depth_param_additional_extension_flag | u(1) | 0 (1 is reserved; ignore the data bits that follow) | |
nonlinear_depth_representation_num | ue(v) | segments − 1; 0 means depth samples are uniformly quantised disparity, 0 at ZFar and 255 at ZNear | |
nonlinear_depth_representation_model[i] | ue(v) | i = 1 to num | deviation of node i from the straight line; end nodes (0, 0) and (255, 255) are fixed |
depth_param_additional_extension_data_flag | u(1) repeated | extension flag 1 | ignored; then RBSP trailing bits |
Depth ranges and the acquisition element
| Element | Coding | Meaning |
|---|---|---|
z_near_flag, z_far_flag | u(1) each | presence of the closest and farthest depth values. Each present one is a 3dv_acquisition_element(numViews, 0, predDirection, 7, index, …) with a 7-bit exponent |
element_equal_flag | u(1) when numViews > 1 | 1: all views share one value (one entry); inferred 0 |
mantissa_len_minus1 | u(5) | first entry of an unpredicted element: mantissa length − 1 (0 to 31) |
sign0, exponent0, mantissa0 | u(1), u(v) with expLen bits, u(v) with manLen bits | unpredicted value. The exponent runs 0 to 2expLen − 2; the top code means unspecified |
skip_flag | u(1) | predicted elements: 1 copies sign, exponent and mantissa from ref_dps_id0 |
sign1, exponent_skip_flag, exponent1, mantissa_diff | u(1), u(1), u(v), se(v) | skip 0: new sign; exponent copied from the reference when exponent_skip_flag is 1; mantissa = prediction + mantissa_diff, where the prediction is the reference mantissa or (m0 * predWeight0 + m1 * (64 − predWeight0) + 32) >> 6 for two references. The mantissa length is the reference's |
View synthesis prediction parameters (I.7.3.2.13.3)
vsp_param(numViews, predDirection, index) sends, for every pair of views
j < i, four ue(v) values: disparity_diff_wji[j][i],
disparity_diff_oji[j][i], disparity_diff_wij[i][j] and
disparity_diff_oij[i][j]. Unpredicted (direction 2):
DisparityScale[j][i] = wji, DisparityOffset[j][i] = oji,
DisparityScale[i][j] = wij − wji and DisparityOffset[i][j] = oij − oji.
Predicted: each difference is added to the weighted prediction
(ref0 * predWeight0 + ref1 * (64 − predWeight0) + 32) >> 6 of the same
variable in the reference parameter sets (I-12).
Slice header in 3D-AVC extension (I.7.3.3.4)
Used for type 21 units. The ordinary
slice header applies (with
ref_pic_list_mvc_modification(), as for type 20), so only the added or
reordered parts are listed. When avc_3d_extension_flag and
slice_header_prediction_flag are both set, much of the header may be copied
from another slice header and the header starts differently.
| Field | Coding | Condition | Meaning |
|---|---|---|---|
first_mb_in_slice, slice_type, pic_parameter_set_id | ue(v) each | as the main header | |
| With slice header prediction: | |||
pre_slice_header_src | u(2) | where colour_plane_id, frame_num, the field flags, idr_pic_id, the POC fields, redundant_pic_cnt, direct_spatial_mv_pred_flag, cabac_init_idc, sp_for_switch_flag, slice_qs_delta, the deblocking fields, slice_group_change_cycle, depth_weighted_pred_flag, dmvp_flag, slice_vsp_flag and dps_id come from (Table I-1). Never 0 | |
pre_ref_lists_src | u(2) | P, SP or B | source of num_ref_idx_active_override_flag, the active counts and the list modification. When 0 they follow here |
pre_pred_weight_table_src | u(2) | weighted prediction used | source of pred_weight_table(); 0 means it follows |
pre_dec_ref_pic_marking_src | u(2) | nal_ref_idc not 0 | source of dec_ref_pic_marking(); 0 means it follows |
slice_qp_delta | se(v) | always sent | |
Otherwise the normal fields (frame_num to slice_group_change_cycle) follow in the usual order, then: | |||
depth_weighted_pred_flag | u(1) | type 21, not I or SI, DepthFlag 1 | 1: depth-range-based weighted prediction (I.8.2.2); inferred 0 |
dmvp_flag | u(1) | type 21, not I or SI, texture, 3D-AVC header | enables depth-based motion vector prediction, inter-view prediction, view synthesis prediction and adaptive luminance compensation (I.8.2) |
slice_vsp_flag | u(1) | as dmvp_flag and seq_view_synthesis_flag | with bvsp_flag_lX selects which motion vector derivation applies to inter-view references |
dps_id | ue(v) | 3dv_acquisition_idc not 1 and (depth_weighted_pred_flag or dmvp_flag) | the depth parameter set in use, 0 to 63; 0 means the SPS values. Equal in all slice headers of an access unit |
The source values of Table I-2: 0 the elements are in this header; 1 taken from the
first slice of the previous view component, in decoding order, with the same
DepthFlag, of a view this one depends on, in the same access unit; 2 from the
first slice of the view component with the same view_id and the other
DepthFlag (not allowed when the other component comes later in
ViewCompOrder); 3 from the first slice of the view component of the same access
unit with view order index 0 and the same DepthFlag.
Slice data and macroblock layer in 3D-AVC extension (I.7.3.4.1, I.7.3.6)
Structure as slice data, with these added
elements. VspRefExist is 0 unless seq_view_synthesis_flag is
1 and a view synthesis reference exists in the lists.
| Element | Coding | Condition | Meaning |
|---|---|---|---|
mb_skip_type_flag | u(1) | CAVLC, type 21 texture, mb_skip_run > 0 and VspRefExist | sets MbVSSkipFlag: 1 means the skipped macroblocks use view synthesis prediction |
mb_vsskip_flag | ae(v) | CABAC, type 21 texture, VspRefExist; before mb_skip_flag when the left and upper macroblocks both are view-synthesis skipped, otherwise after it when not skipped | 1: a view-synthesis-skipped macroblock; sets MbVSSkipFlag. It decides whether I.8.2.1.2 or I.8.2.1.3 derives motion for P_Skip and I.8.2.1.4 or I.8.2.1.6 for B_Skip |
mb_skip_run_type | ae(v) | enable_rle_skip_flag, type 21, B slice, both neighbours unavailable or skipped (RLESkipContext()), no run in progress | 1: the next 16 macroblocks are skipped (a run length of 16 counted down) without individual flags. A mb_skip_flag of 0 ends the run |
mb_alc_skip_flag | ae(v) | alc_sps_enable_flag, type 21, P slice, texture, not view-synthesis skipped, skipped | 1: adaptive luminance compensation applies; the macroblock is P_Skip |
mb_direct_type_flag | u(1) or ae(v) | type 21 texture, B slice, direct_spatial_mv_pred_flag, VspRefExist and mb_type = B_Direct_16x16 | selects the motion derivation for B_Direct_16x16 and B_Direct_8x8 (I.8.2.1) |
mb_alc_flag | u(1) or ae(v) | alc_sps_enable_flag, type 21 texture, P slice and mb_type P_L0_16x16, P_L0_L0_16x8 or P_L0_L0_8x16 | 1: adaptive luminance compensation; ref_idx_l0 is then not sent. transform_size_8x8_flag can follow even with a luma coded block pattern of 0 |
bvsp_flag_l0[i], bvsp_flag_l1[i] | u(1) or ae(v) | after ref_idx_lX, when the reference is a view synthesis reference (VspRefLXFlag) and slice_vsp_flag | whether the inter-view reference is predicted by view synthesis; if 1 no mvd_lX is sent for the partition. Inferred 0 when no such reference, else slice_vsp_flag. With 1, a P sub-macroblock type is P_L0_8x8 and a B one is B_L0_8x8, B_L1_8x8 or B_Bi_8x8 |
The P macroblock types are those of Table 7-13 (Table I-3), with an inferred P_Skip of
one 16×16 partition or, when MbVSSkipFlag is 1, four 8×8 ones. Intra
chroma prediction mode is sent only for ChromaArrayType 1 or 2. The
residual is always residual(0, 15).
CABAC contexts for the added elements (I.9.1)
All the new elements are flags, binarised as fixed length with cMax 1 and a
single context-coded bin whose ctxIdxInc is 0, 1 or 2. They use
ctxIdx 1031 to 1052; every other element keeps the
usual contexts.
| Element | Slice | ctxIdxOffset (ctxIdx range) | ctxIdxInc = condTermFlagA + condTermFlagB, with a neighbour A or B being |
|---|---|---|---|
mb_vsskip_flag | P | 1031 (1031 to 1033) | 1 when available and its mb_vsskip_flag is 0 (I-81) |
mb_vsskip_flag | B | 1034 (1034 to 1036) | as above |
mb_direct_type_flag | B | 1037 (1037 to 1039) | 1 when available and its mb_vsskip_flag or mb_direct_type_flag is 1 (I-82) |
mb_skip_run_type | B | 1040 (one context) | no neighbour dependence |
mb_alc_skip_flag | P | 1041 (1041 to 1043) | 1 when available and its mb_alc_skip_flag or mb_alc_flag is 1 (I-83) |
mb_alc_flag | P | 1044 (1044 to 1046) | as for mb_alc_skip_flag (I-84) |
mb_vsp_flag (the context set of bvsp_flag_lX) | P | 1047 (1047 to 1049) | 1 when unavailable or its mb_vsp_flag is 0 (I-85) |
mb_vsp_flag | B | 1050 (1050 to 1052) | as above |
Initial values (m, n; formula 9-5 of the initial values page):
cabac_init_idc | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | |
|---|---|---|---|---|---|---|---|---|---|---|
| 0 | m | 23 | 23 | 21 | 18 | 9 | 29 | −46 | −20 | 1 |
| n | 33 | 2 | 0 | 64 | 43 | 0 | 127 | 104 | 67 | |
| 1 | m | 22 | 34 | 16 | 26 | 19 | 40 | −45 | −15 | −4 |
| n | 25 | 0 | 0 | 34 | 22 | 0 | 127 | 101 | 76 | |
| 2 | m | 29 | 25 | 14 | 20 | 20 | 29 | −32 | −22 | −2 |
| n | 16 | 0 | 0 | 40 | 10 | 0 | 127 | −117 | 74 |
| 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1052 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| m | 18 | 14 | 14 | 10 | 14 | 14 | 10 | 0 | 0 | 0 | 0 | 0 | 0 |
| n | 64 | 4 | 27 | 52 | 4 | 27 | 52 | 64 | 64 | 64 | 64 | 64 | 64 |
The second set (1040 to 1052) is the same for all three cabac_init_idc
values.
Profile and SEI (I.10, I.13)
The Enhanced Multiview Depth High profile is profile_idc 139. The base view
obeys High (SPS profile_idc 100, or 77 or constraint_set1_flag 1). Only I, P
and B slices; no NAL types 2 to 4; one slice group; no redundant pictures; no arbitrary
slice order; frame_mbs_only_flag 1; the 3D-AVC SPS have
chroma_format_idc 0, 8-bit samples and no transform bypass; the active view
SPS share the level_idc of the active SPS. A decoder for it also decodes
streams of profile_idc 138, 128, 118 with constraint_set5_flag 1, 100, and 77
or constraint_set1_flag 1. Levels are those of Annex H (I.10.2).
All Annex H SEI messages apply (MVCD SEI messages) and one more is added, type 54:
| Field | Coding | Meaning |
|---|---|---|
max_dps_id | ue(v) | the largest allowed depth parameter set id is this value plus 1 |
max_dps_id_diff | ue(v) | width of the window of ids in use; twice it is less than max_dps_id |
The constrained depth parameter set identifier message (IDR access unit, valid for the
sequence) limits how far each dps_id may move from the highest one used so
far, in a circular range of ids, so a decoder can tell when a depth parameter set NAL unit
was lost: ids that fall out of the window are marked unavailable, and a slice that
names an unavailable one signals a loss. A dps_id of 0 is always allowed.
The exact update rule is the pseudo-code of I.13.2.1 (I-86).
Not covered on this page
The decoding process of I.8 (depth-based disparity derivation, motion vector derivation for inter-view, view-synthesis and skip macroblocks, depth-range weighted prediction, adaptive luminance compensation, depth range parameter decoding) and the level limits are not reproduced. Source: ITU-T H.264 (06/2026, version 16), Annex I.