42 const AVFrame *pict,
int *got_packet)
55 max_pkt_size += width * height * 3 * 4;
57 max_pkt_size += mb_width * mb_height * 3 * 4
86 int left[3], top[3], topleft[3];
89 buffer[0][i]= 1 << (9 - 1);
92 for(y = 0; y <
height; y++) {
93 const int modified_predictor= y ? predictor : 1;
102 top[i]= left[i]= topleft[i]=
buffer[0][i];
104 for(x = 0; x <
width; x++) {
106 buffer[x][1] = ptr[3*x+0] - ptr[3*x+1] + 0x100;
107 buffer[x][2] = ptr[3*x+2] - ptr[3*x+1] + 0x100;
108 buffer[x][0] = (ptr[3*x+0] + 2*ptr[3*x+1] + ptr[3*x+2])>>2;
110 buffer[x][1] = ptr[4*x+0] - ptr[4*x+1] + 0x100;
111 buffer[x][2] = ptr[4*x+2] - ptr[4*x+1] + 0x100;
112 buffer[x][0] = (ptr[4*x+0] + 2*ptr[4*x+1] + ptr[4*x+2])>>2;
118 PREDICT(pred, topleft[i], top[i], left[i], modified_predictor);
125 diff= ((left[i] - pred + 0x100)&0x1FF) - 0x100;
137 for(mb_y = 0; mb_y < mb_height; mb_y++) {
142 for(mb_x = 0; mb_x < mb_width; mb_x++) {
143 if(mb_x==0 || mb_y==0){
146 int x, y, h, v, linesize;
155 ptr = p->
data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x);
164 pred= ptr[-linesize];
166 PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
180 int x, y, h, v, linesize;
189 ptr = p->
data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x);
190 PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);