pub struct Pps {
pub pic_parameter_set_id: u32,
pub seq_parameter_set_id: u32,
pub num_ref_idx_l0_default_active_minus1: u32,
pub pic_init_qp_minus26: i32,
pub deblocking_filter_control_present_flag: bool,
pub weighted_bipred_idc: u8,
pub weighted_pred_flag: bool,
pub entropy_coding_mode_flag: bool,
pub transform_8x8_mode_flag: bool,
}Expand description
Picture parameter set for a CAVLC, single-slice-group CBP encoder.
Fields§
§pic_parameter_set_id: u32§seq_parameter_set_id: u32§num_ref_idx_l0_default_active_minus1: u32§pic_init_qp_minus26: i32§deblocking_filter_control_present_flag: bool§weighted_bipred_idc: u82 = IMPLICIT weighted bi-prediction (POC-distance weights) — needed so
unequal-distance B-frames (bframes > 1) blend correctly; 0 otherwise
(keeps the B-less PPS byte-identical, and bframes == 1’s equidistant B
gets 32:32 weights == the plain average anyway).
weighted_pred_flag: boolExplicit weighted prediction for P slices (x264 parity — its weightp
default is on). The DECODER side has supported this for months
(validated against x264 weightp streams); the encoder emits identity
weights except where the per-slice fade estimator finds a real gain.
entropy_coding_mode_flag: boolCABAC (1) vs CAVLC (0). Set from EncoderConfig::cabac.
transform_8x8_mode_flag: booltransform_8x8_mode_flag (High-profile PPS extension). Set from
EncoderConfig::transform_8x8; requires profile_idc 100.
Implementations§
Source§impl Pps
impl Pps
Sourcepub fn from_config(cfg: &EncoderConfig) -> Self
pub fn from_config(cfg: &EncoderConfig) -> Self
Derives the PPS from an encoder configuration.
Sourcepub fn write_rbsp(&self, w: &mut BitWriter)
pub fn write_rbsp(&self, w: &mut BitWriter)
Writes the PPS RBSP (without NAL header) including trailing bits.