Commit c5183847 authored by Ronald S. Bultje's avatar Ronald S. Bultje

amr: remove shift out of the AMR_BIT() macro.

MSVC doesn't like the offsetof(..) >> 1 construct, it interprets it as
a non-literal, thus causing use of this in static tables to fail
compilation.
parent 723b266d
......@@ -61,7 +61,7 @@ static inline void ff_amr_bit_reorder(uint16_t *out, int size,
field <<= 1;
field |= data[bit >> 3] >> (bit & 7) & 1;
}
out[field_offset] = field;
out[field_offset >> 1] = field;
}
}
......
......@@ -71,7 +71,7 @@ typedef struct {
} AMRNBFrame;
/** The index of a frame parameter */
#define AMR_BIT(field) (offsetof(AMRNBFrame, field) >> 1)
#define AMR_BIT(field) (offsetof(AMRNBFrame, field))
/** The index of a subframe-specific parameter */
#define AMR_OF(frame_num, variable) AMR_BIT(subframe[frame_num].variable)
......
......@@ -82,7 +82,7 @@ typedef struct {
} AMRWBFrame;
/** The index of a frame parameter */
#define AMR_BIT(field) (offsetof(AMRWBFrame, field) >> 1)
#define AMR_BIT(field) (offsetof(AMRWBFrame, field))
/** The index of a subframe-specific parameter */
#define AMR_OF(frame_num, variable) AMR_BIT(subframe[frame_num].variable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment