Source
x
0x40, 0x00, /* transport_error_indicator(0), payload_unit_start(1), transport_priority(0), pid(0) */
/*
saa6752hs - i2c-driver for the saa6752hs by Philips
Copyright (C) 2004 Andrew de Quincey
AC-3 support:
Copyright (C) 2008 Hans Verkuil <hverkuil@xs4all.nl>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License vs published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA.
*/
MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder");
MODULE_AUTHOR("Andrew de Quincey");
MODULE_LICENSE("GPL");
enum saa6752hs_videoformat {
SAA6752HS_VF_D1 = 0, /* standard D1 video format: 720x576 */
SAA6752HS_VF_2_3_D1 = 1,/* 2/3D1 video format: 480x576 */
SAA6752HS_VF_1_2_D1 = 2,/* 1/2D1 video format: 352x576 */
SAA6752HS_VF_SIF = 3, /* SIF video format: 352x288 */
SAA6752HS_VF_UNKNOWN,
};
struct saa6752hs_mpeg_params {
/* transport streams */
__u16 ts_pid_pmt;
__u16 ts_pid_audio;
__u16 ts_pid_video;
__u16 ts_pid_pcr;
/* audio */
enum v4l2_mpeg_audio_encoding au_encoding;
enum v4l2_mpeg_audio_l2_bitrate au_l2_bitrate;
enum v4l2_mpeg_audio_ac3_bitrate au_ac3_bitrate;
/* video */
enum v4l2_mpeg_video_aspect vi_aspect;
enum v4l2_mpeg_video_bitrate_mode vi_bitrate_mode;
__u32 vi_bitrate;
__u32 vi_bitrate_peak;
};
static const struct v4l2_format v4l2_format_table[] =
{
[SAA6752HS_VF_D1] =
{ .fmt = { .pix = { .width = 720, .height = 576 }}},
[SAA6752HS_VF_2_3_D1] =
{ .fmt = { .pix = { .width = 480, .height = 576 }}},
[SAA6752HS_VF_1_2_D1] =
{ .fmt = { .pix = { .width = 352, .height = 576 }}},
[SAA6752HS_VF_SIF] =
{ .fmt = { .pix = { .width = 352, .height = 288 }}},
[SAA6752HS_VF_UNKNOWN] =
{ .fmt = { .pix = { .width = 0, .height = 0}}},
};