+/**
+ * Initialize GetBitContext.
+ * @param buffer bitstream buffer, must be AV_INPUT_BUFFER_PADDING_SIZE bytes
+ * larger than the actual read bits because some optimized bitstream
+ * readers read 32 or 64 bit at once and could read over the end
+ * @param bit_size the size of the buffer in bits
+ * @return 0 on success, AVERROR_INVALIDDATA if the buffer_size would overflow.
+ */
+static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
+ int bit_size)
+{
+#ifdef BITSTREAM_READER_LE
+ return init_get_bits_xe(s, buffer, bit_size, 1);
+#else
+ return init_get_bits_xe(s, buffer, bit_size, 0);
+#endif
+}
+