int_fast16_t sample_buffer[2][w+6]; int_fast16_t *sample[2]= {sample_buffer[0]+3, sample_buffer[1]+3};
int_fast16_t sample_buffer[3][w+6]; int_fast16_t *sample[3]= {sample_buffer[0]+3, sample_buffer[1]+3, sample_buffer[2]+3};
static void encode_plane(FFV1Context *s, uint8_t *src, int w, int h, int stride, int plane_index){    int x,y;    int_fast16_t sample_buffer[2][w+6];    int_fast16_t *sample[2]= {sample_buffer[0]+3, sample_buffer[1]+3};    s->run_index=0;        memset(sample_buffer, 0, sizeof(sample_buffer));        for(y=0; y<h; y++){        int_fast16_t *temp= sample[0]; //FIXME try a normal buffer        sample[0]= sample[1];        sample[1]= temp;                sample[1][-1]= sample[0][0  ];        sample[0][ w]= sample[0][w-1];//{START_TIMER        for(x=0; x<w; x++){            sample[1][x]= src[x + stride*y];        }        encode_line(s, w, sample, plane_index, 8);//STOP_TIMER("encode line")}    }}