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:
parent
723b266d72
commit
c51838478c
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user