Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 219368
b: refs/heads/master
c: 5fa56cc
h: refs/heads/master
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 21, 2010
1 parent 675be9a commit 94ae86a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f91d095c92e8fdcb6bd8cb35e8fa9c87d9c10768
refs/heads/master: 5fa56ccdacc54f5f694141c1a74f781cf77874bb
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/saa7164/saa7164-api.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ int saa7164_api_set_gop_size(struct saa7164_port *port)
dprintk(DBGLVL_ENC, "%s()\n", __func__);

gs.ucRefFrameDist = port->encoder_params.refdist;
gs.ucGOPSize = SAA7164_ENCODER_DEFAULT_GOP_SIZE;
gs.ucGOPSize = port->encoder_params.gop_size;
ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR,
EU_VIDEO_GOP_STRUCTURE_CONTROL,
sizeof(gs), &gs);
Expand Down
13 changes: 10 additions & 3 deletions trunk/drivers/media/video/saa7164/saa7164-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ static const u32 saa7164_v4l2_ctrls[] = {
V4L2_CID_HUE,
V4L2_CID_AUDIO_VOLUME,
V4L2_CID_SHARPNESS,
V4L2_CID_MPEG_STREAM_TYPE,
V4L2_CID_MPEG_VIDEO_ASPECT,
V4L2_CID_MPEG_VIDEO_B_FRAMES,
V4L2_CID_MPEG_VIDEO_GOP_SIZE,
V4L2_CID_MPEG_STREAM_TYPE,
V4L2_CID_MPEG_AUDIO_MUTE,
V4L2_CID_MPEG_VIDEO_BITRATE_MODE,
V4L2_CID_MPEG_VIDEO_BITRATE,
V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
V4L2_CID_MPEG_VIDEO_B_FRAMES,
0
};

Expand Down Expand Up @@ -392,6 +392,9 @@ static int saa7164_get_ctrl(struct saa7164_port *port,
case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK:
ctrl->value = params->bitrate_peak;
break;
case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
ctrl->value = params->gop_size;
break;
default:
return -EINVAL;
}
Expand Down Expand Up @@ -535,6 +538,9 @@ static int saa7164_set_ctrl(struct saa7164_port *port,
case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK:
params->bitrate_peak = ctrl->value;
break;
case V4L2_CID_MPEG_VIDEO_GOP_SIZE:
params->gop_size = ctrl->value;
break;
default:
return -EINVAL;
}
Expand Down Expand Up @@ -1336,11 +1342,12 @@ int saa7164_encoder_register(struct saa7164_port *port)
port->ctl_sharpness = 8;
port->encoder_params.bitrate = ENCODER_DEF_BITRATE;
port->encoder_params.bitrate_peak = ENCODER_DEF_BITRATE;
port->encoder_params.bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR;
port->encoder_params.bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_CBR;
port->encoder_params.stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS;
port->encoder_params.ctl_mute = 0;
port->encoder_params.ctl_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3;
port->encoder_params.refdist = 1;
port->encoder_params.gop_size = SAA7164_ENCODER_DEFAULT_GOP_SIZE;

if (port->encodernorm.id & V4L2_STD_525_60)
port->height = 480;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/saa7164/saa7164.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ struct saa7164_encoder_params {
u32 ctl_mute;
u32 ctl_aspect;
u32 refdist;
u32 gop_size;
};

struct saa7164_port;
Expand Down

0 comments on commit 94ae86a

Please sign in to comment.