- /* don't ask me why they inverted Cb and Cr ! */
- idct_put(s->picture.data[6 - j] + c_offset,
- s->picture.linesize[6 - j], block);
+ if (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) {
+ uint64_t aligned_pixels[64/8];
+ uint8_t *pixels= (uint8_t*)aligned_pixels;
+ uint8_t *c_ptr, *c_ptr1, *ptr, *ptr1;
+ int x, y, linesize;
+ /* NOTE: at end of line, the macroblock is handled as 420 */
+ idct_put(pixels, 8, block);
+ linesize = s->picture.linesize[6 - j];
+ c_ptr = s->picture.data[6 - j] + c_offset;
+ ptr = pixels;
+ for(y = 0;y < (1<<log2_blocksize); y++) {
+ ptr1= ptr + (1<<(log2_blocksize-1));
+ c_ptr1 = c_ptr + (linesize<<log2_blocksize);
+ for(x=0; x < (1<<(log2_blocksize-1)); x++){
+ c_ptr[x]= ptr[x]; c_ptr1[x]= ptr1[x];
+ }
+ c_ptr += linesize;
+ ptr += 8;
+ }
+ } else {
+ /* don't ask me why they inverted Cb and Cr ! */
+ idct_put(s->picture.data[6 - j] + c_offset,
+ s->picture.linesize[6 - j], block);
+ }