diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-07-31 14:51:30 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 07:54:43 -0200 |
commit | 2600d71cc535907e5d95cd31751c587afc370065 (patch) | |
tree | 9c87d5125c15355f3c4b39c4b059cf58ce33d2da /drivers/media/video/saa7164/saa7164-api.c | |
parent | 076031310b182ce89cea861982ff49ed6799767a (diff) | |
download | lwn-2600d71cc535907e5d95cd31751c587afc370065.tar.gz lwn-2600d71cc535907e5d95cd31751c587afc370065.zip |
[media] saa7164: add support for encoder CBR and VBR optionally
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-api.c')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-api.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-api.c b/drivers/media/video/saa7164/saa7164-api.c index 5dcdf7bb12cd..fec5138737e0 100644 --- a/drivers/media/video/saa7164/saa7164-api.c +++ b/drivers/media/video/saa7164/saa7164-api.c @@ -59,7 +59,10 @@ int saa7164_api_set_encoder(struct saa7164_port *port) printk(KERN_ERR "%s() error, ret = 0x%x\n", __func__, ret); /* Establish video bitrates */ - vb.ucVideoBitRateMode = 0; + if (port->encoder_params.bitrate_mode == V4L2_MPEG_VIDEO_BITRATE_MODE_CBR) + vb.ucVideoBitRateMode = EU_VIDEO_BIT_RATE_MODE_CONSTANT; + else + vb.ucVideoBitRateMode = EU_VIDEO_BIT_RATE_MODE_VARIABLE_PEAK; vb.dwVideoBitRate = port->encoder_params.bitrate; vb.dwVideoBitRatePeak = vb.dwVideoBitRate; ret = saa7164_cmd_send(port->dev, port->hwcfg.sourceid, SET_CUR, |