Loading drivers/media/platform/msm/vidc/hfi_packetization.c +9 −0 Original line number Diff line number Diff line Loading @@ -1173,12 +1173,21 @@ int create_pkt_cmd_session_set_property( case HAL_CONFIG_VENC_INTRA_PERIOD: { struct hfi_intra_period *hfi; int period = 0; pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD; hfi = (struct hfi_intra_period *) &pkt->rg_property_data[1]; memcpy(hfi, (struct hfi_intra_period *) pdata, sizeof(struct hfi_intra_period)); pkt->size += sizeof(u32) + sizeof(struct hfi_intra_period); period = hfi->pframes + hfi->bframes + 1; if (hfi->bframes) { hfi->pframes = period / (hfi->bframes + 1); hfi->bframes = period - hfi->pframes; } else { hfi->pframes = period - 1; hfi->bframes = 0; } break; } case HAL_CONFIG_VENC_IDR_PERIOD: Loading drivers/media/platform/msm/vidc/msm_venc.c +2 −2 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = { .name = "Intra Period for B frames", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2, .maximum = 3, .default_value = 0, .step = 1, .menu_skip_mask = 0, Loading Loading @@ -1379,7 +1379,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) * Ideally we adjust _NUM_B_FRAMES as well but we'll leave it * alone for now */ if (ctrl->id == V4L2_CID_MPEG_VIDEO_H264_I_PERIOD) { num_p = ctrl->val - 1 - num_b; num_p = ctrl->val; update_ctrl.id = V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES; update_ctrl.val = num_p; } else if (ctrl->id == V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES) { Loading Loading
drivers/media/platform/msm/vidc/hfi_packetization.c +9 −0 Original line number Diff line number Diff line Loading @@ -1173,12 +1173,21 @@ int create_pkt_cmd_session_set_property( case HAL_CONFIG_VENC_INTRA_PERIOD: { struct hfi_intra_period *hfi; int period = 0; pkt->rg_property_data[0] = HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD; hfi = (struct hfi_intra_period *) &pkt->rg_property_data[1]; memcpy(hfi, (struct hfi_intra_period *) pdata, sizeof(struct hfi_intra_period)); pkt->size += sizeof(u32) + sizeof(struct hfi_intra_period); period = hfi->pframes + hfi->bframes + 1; if (hfi->bframes) { hfi->pframes = period / (hfi->bframes + 1); hfi->bframes = period - hfi->pframes; } else { hfi->pframes = period - 1; hfi->bframes = 0; } break; } case HAL_CONFIG_VENC_IDR_PERIOD: Loading
drivers/media/platform/msm/vidc/msm_venc.c +2 −2 Original line number Diff line number Diff line Loading @@ -188,7 +188,7 @@ static struct msm_vidc_ctrl msm_venc_ctrls[] = { .name = "Intra Period for B frames", .type = V4L2_CTRL_TYPE_INTEGER, .minimum = 0, .maximum = 2, .maximum = 3, .default_value = 0, .step = 1, .menu_skip_mask = 0, Loading Loading @@ -1379,7 +1379,7 @@ static int try_set_ctrl(struct msm_vidc_inst *inst, struct v4l2_ctrl *ctrl) * Ideally we adjust _NUM_B_FRAMES as well but we'll leave it * alone for now */ if (ctrl->id == V4L2_CID_MPEG_VIDEO_H264_I_PERIOD) { num_p = ctrl->val - 1 - num_b; num_p = ctrl->val; update_ctrl.id = V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES; update_ctrl.val = num_p; } else if (ctrl->id == V4L2_CID_MPEG_VIDC_VIDEO_NUM_P_FRAMES) { Loading