提交 c5df599b 编写于 作者: C Catalin Climov 提交者: Linus Torvalds

[PATCH] v4l: 649: fixed gcc 4 0 compile warnings by moving var declarations to...

[PATCH] v4l: 649: fixed gcc 4 0 compile warnings by moving var declarations to the top of the function or block

- Fixed gcc 4.0 compile warnings by moving var declarations to the top of
  the function or block.
Signed-off-by: NCatalin Climov <catalin@climov.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@brturbo.com.br>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b1706b91
...@@ -781,6 +781,7 @@ static const int BITRATES_SIZE = ARRAY_SIZE(mpeg_audio_bitrates); ...@@ -781,6 +781,7 @@ static const int BITRATES_SIZE = ARRAY_SIZE(mpeg_audio_bitrates);
static void blackbird_set_default_params(struct cx8802_dev *dev) static void blackbird_set_default_params(struct cx8802_dev *dev)
{ {
struct v4l2_mpeg_compression *params = &dev->params; struct v4l2_mpeg_compression *params = &dev->params;
u32 au_params;
/* assign stream type */ /* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) ) if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
...@@ -827,7 +828,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev) ...@@ -827,7 +828,7 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
/* assign audio properties */ /* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */ /* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO | au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */ /* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE | BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF | BLACKBIRD_AUDIO_BITS_CRC_OFF |
...@@ -861,12 +862,14 @@ static void blackbird_set_default_params(struct cx8802_dev *dev) ...@@ -861,12 +862,14 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
} }
if( params->au_bitrate.mode ) if( params->au_bitrate.mode )
{ {
int layer;
if( params->au_bitrate.mode == V4L2_BITRATE_CBR ) if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target; params->au_bitrate.max = params->vi_bitrate.target;
else else
params->au_bitrate.target = params->vi_bitrate.max; params->au_bitrate.target = params->vi_bitrate.max;
int layer = params->au_type; layer = params->au_type;
if( params->au_bitrate.target == 0 ) if( params->au_bitrate.target == 0 )
{ {
/* TODO: use the minimum possible bitrate instead of 0 ? */ /* TODO: use the minimum possible bitrate instead of 0 ? */
...@@ -946,6 +949,8 @@ static void blackbird_set_default_params(struct cx8802_dev *dev) ...@@ -946,6 +949,8 @@ static void blackbird_set_default_params(struct cx8802_dev *dev)
#define UPDATE_PARAM( name ) dev->params.name = params->name #define UPDATE_PARAM( name ) dev->params.name = params->name
void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *params) void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *params)
{ {
u32 au_params;
/* assign stream type */ /* assign stream type */
if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) ) if( params->st_type >= ARRAY_SIZE(mpeg_stream_types) )
params->st_type = V4L2_MPEG_PS_2; params->st_type = V4L2_MPEG_PS_2;
...@@ -1015,7 +1020,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression * ...@@ -1015,7 +1020,7 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
/* assign audio properties */ /* assign audio properties */
/* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */ /* note: it's not necessary to set the samplerate, the mpeg encoder seems to autodetect/adjust */
u32 au_params = BLACKBIRD_AUDIO_BITS_STEREO | au_params = BLACKBIRD_AUDIO_BITS_STEREO |
/* BLACKBIRD_AUDIO_BITS_BOUND_4 | */ /* BLACKBIRD_AUDIO_BITS_BOUND_4 | */
BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE | BLACKBIRD_AUDIO_BITS_EMPHASIS_NONE |
BLACKBIRD_AUDIO_BITS_CRC_OFF | BLACKBIRD_AUDIO_BITS_CRC_OFF |
...@@ -1049,12 +1054,14 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression * ...@@ -1049,12 +1054,14 @@ void blackbird_set_params(struct cx8802_dev *dev, struct v4l2_mpeg_compression *
} }
if( params->au_bitrate.mode ) if( params->au_bitrate.mode )
{ {
int layer;
if( params->au_bitrate.mode == V4L2_BITRATE_CBR ) if( params->au_bitrate.mode == V4L2_BITRATE_CBR )
params->au_bitrate.max = params->vi_bitrate.target; params->au_bitrate.max = params->vi_bitrate.target;
else else
params->au_bitrate.target = params->vi_bitrate.max; params->au_bitrate.target = params->vi_bitrate.max;
int layer = params->au_type; layer = params->au_type;
if( params->au_bitrate.target == 0 ) if( params->au_bitrate.target == 0 )
{ {
/* TODO: use the minimum possible bitrate instead of 0 ? */ /* TODO: use the minimum possible bitrate instead of 0 ? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册