.is_volatile = 1,
.mode = MFC_CTRL_MODE_SFR,
.addr = MFC_REG_E_RC_FRAME_RATE,
- .mask = 0xFFFFFFFF,
+ .mask = 0x0000FFFF,
.shft = 0,
.flag_mode = MFC_CTRL_MODE_SFR,
.flag_addr = MFC_REG_E_PARAM_CHANGE,
buf_ctrl->val);
}
+ /* set frame rate change with delta */
+ if (buf_ctrl->id == V4L2_CID_MPEG_MFC51_VIDEO_FRAME_RATE_CH) {
+ p->rc_frame_delta = FRAME_RATE_RESOLUTION / buf_ctrl->val;
+ value = MFC_READL(buf_ctrl->addr);
+ value &= ~(buf_ctrl->mask << buf_ctrl->shft);
+ value |= ((p->rc_frame_delta & buf_ctrl->mask) << buf_ctrl->shft);
+ MFC_WRITEL(value, buf_ctrl->addr);
+ }
+
/* set drop control */
if (buf_ctrl->id == V4L2_CID_MPEG_VIDEO_DROP_CONTROL) {
if (!ctx->ts_last_interval) {
param_change = 1;
break;
case V4L2_CID_MPEG_MFC51_VIDEO_FRAME_RATE_CH:
+ p->rc_frame_delta = FRAME_RATE_RESOLUTION / buf_ctrl->val;
+ pInStr->RcFrameRate &= ~(0xFFFF << 16);
+ pInStr->RcFrameRate |= (FRAME_RATE_RESOLUTION & 0xFFFF) << 16;
pInStr->RcFrameRate &= ~(buf_ctrl->mask << buf_ctrl->shft);
pInStr->RcFrameRate |=
- (buf_ctrl->val & buf_ctrl->mask) << buf_ctrl->shft;
+ (p->rc_frame_delta & buf_ctrl->mask) << buf_ctrl->shft;
param_change = 1;
break;
case V4L2_CID_MPEG_MFC51_VIDEO_BIT_RATE_CH:
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "H264 Frame rate",
.minimum = 1,
- .maximum = (1 << 16) - 1,
+ .maximum = FRAME_RATE_RESOLUTION,
.step = 1,
.default_value = 1,
},
if (ctx_ctrl->id == ctrl->id) {
ctx_ctrl->has_new = 1;
ctx_ctrl->val = ctrl->value;
- if (ctx_ctrl->id == \
- V4L2_CID_MPEG_MFC51_VIDEO_FRAME_RATE_CH) {
- ctx_ctrl->val &= ~(0xFFFF << 16);
- ctx_ctrl->val |= ctx_ctrl->val << 16;
- ctx_ctrl->val &= ~(0xFFFF);
- ctx_ctrl->val |= p->rc_frame_delta & 0xFFFF;
- }
if ((ctx_ctrl->id == \
V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_CH) ||
(ctx_ctrl->id == \