mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
avcodec/dirac_vlc: Fix mixed declaration and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
a337cb7361
commit
9157ac2f9c
@ -167,14 +167,16 @@ static inline void search_for_golomb(DiracGolombLUT *l, residual r, int bits)
|
|||||||
/* Parity LUTs - even and odd bit end positions */
|
/* Parity LUTs - even and odd bit end positions */
|
||||||
static void generate_parity_lut(DiracGolombLUT *lut, int even)
|
static void generate_parity_lut(DiracGolombLUT *lut, int even)
|
||||||
{
|
{
|
||||||
for (int idx = 0; idx < LUT_SIZE; idx++) {
|
int idx;
|
||||||
|
for (idx = 0; idx < LUT_SIZE; idx++) {
|
||||||
DiracGolombLUT *l = &lut[idx];
|
DiracGolombLUT *l = &lut[idx];
|
||||||
int symbol_end_loc = -1;
|
int symbol_end_loc = -1;
|
||||||
uint32_t code;
|
uint32_t code;
|
||||||
|
int i;
|
||||||
|
|
||||||
INIT_RESIDUE(res, idx, LUT_BITS);
|
INIT_RESIDUE(res, idx, LUT_BITS);
|
||||||
|
|
||||||
for (int i = 0; i < LUT_BITS; i++) {
|
for (i = 0; i < LUT_BITS; i++) {
|
||||||
const int cond = even ? (i & 1) : !(i & 1);
|
const int cond = even ? (i & 1) : !(i & 1);
|
||||||
if (((res >> (RSIZE_BITS - i - 1)) & 1) && cond) {
|
if (((res >> (RSIZE_BITS - i - 1)) & 1) && cond) {
|
||||||
symbol_end_loc = i + 2;
|
symbol_end_loc = i + 2;
|
||||||
@ -206,7 +208,8 @@ static void generate_parity_lut(DiracGolombLUT *lut, int even)
|
|||||||
/* Reset (off == 0) and needs-one-more-bit (off == 1) LUTs */
|
/* Reset (off == 0) and needs-one-more-bit (off == 1) LUTs */
|
||||||
static void generate_offset_lut(DiracGolombLUT *lut, int off)
|
static void generate_offset_lut(DiracGolombLUT *lut, int off)
|
||||||
{
|
{
|
||||||
for (int idx = 0; idx < LUT_SIZE; idx++) {
|
int idx;
|
||||||
|
for (idx = 0; idx < LUT_SIZE; idx++) {
|
||||||
DiracGolombLUT *l = &lut[idx];
|
DiracGolombLUT *l = &lut[idx];
|
||||||
|
|
||||||
INIT_RESIDUE(res, idx, LUT_BITS);
|
INIT_RESIDUE(res, idx, LUT_BITS);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user