Re: [PATCH v7 3/6] media: qcom: iris: Add B frames support for encoder
From: Wangao Wang
Date: Wed May 13 2026 - 23:02:08 EST
On 2026/5/13 19:00, Dmitry Baryshkov wrote:
+int iris_set_intra_period(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id)
+{
+ const struct iris_hfi_session_ops *hfi_ops = inst->hfi_session_ops;
+ u32 gop_size = inst->fw_caps[GOP_SIZE].value;
+ u32 b_frame = inst->fw_caps[B_FRAME].value;
+ u32 hfi_id = inst->fw_caps[cap_id].hfi_id;
+ struct hfi_intra_period intra_period;
+
+ if (!gop_size || b_frame >= gop_size)
+ return -EINVAL;
The same comment. Maybe I misunderstand something, please correct me if
I'm wrong. The definition of the GOP_SIZE capability allows 0 as a valid
value. Here you are declining it. Why?
+
GOP_SIZE
- Value 0: Behavior depends on the firmware implementation.In most cases, the firmware will treat it as an invalid value or fall back to a default value.
- Value 1: Explicitly means all I-frames.
The gen1 firmware does not support passing GOP size directly — it is determined by the number of P-frames and B-frames between I-frames. If the client passes a value of 0, it will cause the subsequent gop_size - 1 calculation to produce a negative value.
--
Best Regards,
Wangao