static void decodeplane8(uint8_t *dst, const uint8_t *const buf, int buf_size, int bps, int plane)
{
    GetBitContext gb;
    int i;
    const int b = (buf_size * 8) + bps - 1;
    init_get_bits(&gb, buf, buf_size * 8);
    for(i = 0; i < b; i++) {
        dst[i] |= get_bits1(&gb) << plane;
    }
}
['static void decodeplane8(uint8_t *dst, const uint8_t *const buf, int buf_size, int bps, int plane)\n{\n    GetBitContext gb;\n    int i;\n    const int b = (buf_size * 8) + bps - 1;\n    init_get_bits(&gb, buf, buf_size * 8);\n    for(i = 0; i < b; i++) {\n        dst[i] |= get_bits1(&gb) << plane;\n    }\n}', 'static inline void init_get_bits(GetBitContext *s,\n                   const uint8_t *buffer, int bit_size)\n{\n    int buffer_size= (bit_size+7)>>3;\n    if(buffer_size < 0 || bit_size < 0) {\n        buffer_size = bit_size = 0;\n        buffer = NULL;\n    }\n    s->buffer= buffer;\n    s->size_in_bits= bit_size;\n    s->buffer_end= buffer + buffer_size;\n#ifdef ALT_BITSTREAM_READER\n    s->index=0;\n#elif defined LIBMPEG2_BITSTREAM_READER\n    s->buffer_ptr = (uint8_t*)((intptr_t)buffer&(~1));\n    s->bit_count = 16 + 8*((intptr_t)buffer&1);\n    skip_bits_long(s, 0);\n#elif defined A32_BITSTREAM_READER\n    s->buffer_ptr = (uint32_t*)((intptr_t)buffer&(~3));\n    s->bit_count = 32 + 8*((intptr_t)buffer&3);\n    skip_bits_long(s, 0);\n#endif\n}', 'static inline unsigned int get_bits1(GetBitContext *s){\n#ifdef ALT_BITSTREAM_READER\n    unsigned int index= s->index;\n    uint8_t result= s->buffer[ index>>3 ];\n#ifdef ALT_BITSTREAM_READER_LE\n    result>>= (index&0x07);\n    result&= 1;\n#else\n    result<<= (index&0x07);\n    result>>= 8 - 1;\n#endif\n    index++;\n    s->index= index;\n    return result;\n#else\n    return get_bits(s, 1);\n#endif\n}']