1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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.
This commit is contained in:
Ronald S. Bultje 2012-07-03 20:36:44 -07:00
parent 723b266d72
commit c51838478c
3 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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)

View File

@ -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)