No subject
bogus at does.not.exist.com
bogus at does.not.exist.com
Mon Jul 5 15:10:54 CEST 2010
66 typedef struct {
67 uint_fast8_t floor_type;
68 vorbis_floor_decode_func decode;
69 union vorbis_floor_u {
70 struct vorbis_floor0_s {
71 uint_fast8_t order;
72 uint_fast16_t rate;
73 uint_fast16_t bark_map_size;
74 int_fast32_t *map[2];
75 uint_fast32_t map_size[2];
76 uint_fast8_t amplitude_bits;
77 uint_fast8_t amplitude_offset;
78 uint_fast8_t num_books;
79 uint_fast8_t *book_list;
80 float *lsp;
81 } t0;
82 struct vorbis_floor1_s {
83 uint_fast8_t partitions;
84 uint_fast8_t partition_class[32];
85 uint_fast8_t class_dimensions[16];
86 uint_fast8_t class_subclasses[16];
87 uint_fast8_t class_masterbook[16];
88 int_fast16_t subclass_books[16][8];
89 uint_fast8_t multiplier;
90 uint_fast16_t x_list_dim;
91 vorbis_floor1_entry *list;
92 } t1;
93 } data;
94 } vorbis_floor;
476 if (floor_setup->floor_type =3D=3D 1) {
477 int maximum_class =3D -1;
This had been uint_fast8_t
478 uint_fast8_t rangebits;
479 uint_fast16_t floor1_values =3D 2;
480
481 floor_setup->decode =3D vorbis_floor1_decode;
482
483 floor_setup->data.t1.partitions =3D get_bits(gb, 5);
484
485 AV_DEBUG(" %d.floor: %d partitions \n", i,
floor_setup->data.t1.partitions);
486
487 for (j =3D 0; j < floor_setup->data.t1.partitions; ++j) {
488 floor_setup->data.t1.partition_class[j] =3D get_bits(g=
b, 4);
489 if (floor_setup->data.t1.partition_class[j] >
maximum_class)
So if uint_fast8_t is uint8_t or uint16_t then partition_class[j] gets
promoted to int
If uint_fast8_t is uint32_t then maximum_class gets promoted to
uint32_t and this condition becomes always false...
maximum_class remains unchanged from its initial -1
Hooray for (u)int_fast##_t types
490 maximum_class =3D
floor_setup->data.t1.partition_class[j];
491
492 AV_DEBUG(" %d. floor %d partition class %d \n",
i, j, floor_setup->data.t1.partition_class[j]);
493
494 }
More information about the ffmpeg-devel
mailing list