Also infer them when not coded in the bitstream.
Reviewed-by: jkqxz
Signed-off-by: James Almer <jamrial@gmail.com>
start_pos = get_bits_count(&gbc);
if (obu->header.obu_extension_flag) {
- priv->temporal_id = obu->header.temporal_id;
- priv->spatial_id = obu->header.spatial_id;
-
if (obu->header.obu_type != AV1_OBU_SEQUENCE_HEADER &&
obu->header.obu_type != AV1_OBU_TEMPORAL_DELIMITER &&
priv->operating_point_idc) {
// Decoding will drop this OBU at this operating point.
}
}
- } else {
- priv->temporal_id = 0;
- priv->spatial_id = 0;
}
switch (obu->header.obu_type) {
static int FUNC(obu_header)(CodedBitstreamContext *ctx, RWContext *rw,
AV1RawOBUHeader *current)
{
+ CodedBitstreamAV1Context *priv = ctx->priv_data;
int err;
HEADER("OBU header");
fb(3, temporal_id);
fb(2, spatial_id);
fc(3, extension_header_reserved_3bits, 0, 0);
+ } else {
+ infer(temporal_id, 0);
+ infer(spatial_id, 0);
}
+ priv->temporal_id = current->temporal_id;
+ priv->spatial_id = current->spatial_id;
+
return 0;
}