mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
move vars decls where vars are used
Originally committed as revision 12957 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
8cd92bb915
commit
47e1d7efce
@ -648,18 +648,9 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
int entries, frames_per_sample;
|
int entries, frames_per_sample;
|
||||||
uint32_t format;
|
uint32_t format;
|
||||||
uint8_t codec_name[32];
|
uint8_t codec_name[32];
|
||||||
|
|
||||||
/* for palette traversal */
|
|
||||||
unsigned int color_depth;
|
unsigned int color_depth;
|
||||||
unsigned int color_start;
|
|
||||||
unsigned int color_count;
|
|
||||||
unsigned int color_end;
|
|
||||||
int color_index;
|
|
||||||
int color_dec;
|
|
||||||
int color_greyscale;
|
int color_greyscale;
|
||||||
const uint8_t *color_table;
|
|
||||||
int j, pseudo_stream_id;
|
int j, pseudo_stream_id;
|
||||||
unsigned char r, g, b;
|
|
||||||
|
|
||||||
get_byte(pb); /* version */
|
get_byte(pb); /* version */
|
||||||
get_be24(pb); /* flags */
|
get_be24(pb); /* flags */
|
||||||
@ -752,7 +743,12 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
/* if the depth is 2, 4, or 8 bpp, file is palettized */
|
/* if the depth is 2, 4, or 8 bpp, file is palettized */
|
||||||
if ((color_depth == 2) || (color_depth == 4) ||
|
if ((color_depth == 2) || (color_depth == 4) ||
|
||||||
(color_depth == 8)) {
|
(color_depth == 8)) {
|
||||||
|
/* for palette traversal */
|
||||||
|
unsigned int color_start, color_count, color_end;
|
||||||
|
unsigned char r, g, b;
|
||||||
|
|
||||||
if (color_greyscale) {
|
if (color_greyscale) {
|
||||||
|
int color_index, color_dec;
|
||||||
/* compute the greyscale palette */
|
/* compute the greyscale palette */
|
||||||
st->codec->bits_per_sample = color_depth;
|
st->codec->bits_per_sample = color_depth;
|
||||||
color_count = 1 << color_depth;
|
color_count = 1 << color_depth;
|
||||||
@ -767,6 +763,7 @@ static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
|
|||||||
color_index = 0;
|
color_index = 0;
|
||||||
}
|
}
|
||||||
} else if (st->codec->color_table_id) {
|
} else if (st->codec->color_table_id) {
|
||||||
|
const uint8_t *color_table;
|
||||||
/* if flag bit 3 is set, use the default palette */
|
/* if flag bit 3 is set, use the default palette */
|
||||||
color_count = 1 << color_depth;
|
color_count = 1 << color_depth;
|
||||||
if (color_depth == 2)
|
if (color_depth == 2)
|
||||||
|
Loading…
Reference in New Issue
Block a user