comparison vcr1.c @ 1375:c93d893f6d2b libavcodec

fix
author michaelni
date Thu, 24 Jul 2003 21:52:41 +0000
parents f9b088451fb3
children a7a9df478e46
comparison
equal deleted inserted replaced
1374:f9b088451fb3 1375:c93d893f6d2b
77 uint8_t *cr= &a->picture.data[2][ (y>>2)*a->picture.linesize[2] ]; 77 uint8_t *cr= &a->picture.data[2][ (y>>2)*a->picture.linesize[2] ];
78 78
79 for(i=0; i<4; i++) 79 for(i=0; i<4; i++)
80 a->offset[i]= *(bytestream++); 80 a->offset[i]= *(bytestream++);
81 81
82 offset= a->offset[0]; 82 offset= a->offset[0] - a->delta[ bytestream[2]&0xF ];
83 for(x=0; x<avctx->width; x+=4){ 83 for(x=0; x<avctx->width; x+=4){
84 luma[0]=( offset += a->delta[ bytestream[2]&0xF ]); 84 luma[0]=( offset += a->delta[ bytestream[2]&0xF ]);
85 luma[1]=( offset += a->delta[ bytestream[2]>>4 ]); 85 luma[1]=( offset += a->delta[ bytestream[2]>>4 ]);
86 luma[2]=( offset += a->delta[ bytestream[0]&0xF ]); 86 luma[2]=( offset += a->delta[ bytestream[0]&0xF ]);
87 luma[3]=( offset += a->delta[ bytestream[0]>>4 ]); 87 luma[3]=( offset += a->delta[ bytestream[0]>>4 ]);
88 luma += 4; 88 luma += 4;
89 89
90 *(cb++) = bytestream[1]; 90 *(cb++) = bytestream[3];
91 *(cr++) = bytestream[3]; 91 *(cr++) = bytestream[1];
92 92
93 bytestream+= 4; 93 bytestream+= 4;
94 } 94 }
95 }else{ 95 }else{
96 offset= a->offset[y&3]; 96 offset= a->offset[y&3] - a->delta[ bytestream[2]&0xF ];
97 97
98 for(x=0; x<avctx->width; x+=8){ 98 for(x=0; x<avctx->width; x+=8){
99 luma[0]=( offset += a->delta[ bytestream[2]&0xF ]); 99 luma[0]=( offset += a->delta[ bytestream[2]&0xF ]);
100 luma[1]=( offset += a->delta[ bytestream[2]>>4 ]); 100 luma[1]=( offset += a->delta[ bytestream[2]>>4 ]);
101 luma[2]=( offset += a->delta[ bytestream[3]&0xF ]); 101 luma[2]=( offset += a->delta[ bytestream[3]&0xF ]);