41 const AVFrame *pict,
int *got_packet)
54 max_pkt_size += width * height * 3 * 4;
56 max_pkt_size += mb_width * mb_height * 3 * 4
88 int left[3], top[3], topleft[3];
91 buffer[0][i]= 1 << (9 - 1);
94 for(y = 0; y <
height; y++) {
95 const int modified_predictor= y ? predictor : 1;
104 top[i]= left[i]= topleft[i]=
buffer[0][i];
106 for(x = 0; x <
width; x++) {
108 buffer[x][1] = ptr[3*x+0] - ptr[3*x+1] + 0x100;
109 buffer[x][2] = ptr[3*x+2] - ptr[3*x+1] + 0x100;
110 buffer[x][0] = (ptr[3*x+0] + 2*ptr[3*x+1] + ptr[3*x+2])>>2;
112 buffer[x][1] = ptr[4*x+0] - ptr[4*x+1] + 0x100;
113 buffer[x][2] = ptr[4*x+2] - ptr[4*x+1] + 0x100;
114 buffer[x][0] = (ptr[4*x+0] + 2*ptr[4*x+1] + ptr[4*x+2])>>2;
120 PREDICT(pred, topleft[i], top[i], left[i], modified_predictor);
127 diff= ((left[i] - pred + 0x100)&0x1FF) - 0x100;
139 for(mb_y = 0; mb_y < mb_height; mb_y++) {
144 for(mb_x = 0; mb_x < mb_width; mb_x++) {
145 if(mb_x==0 || mb_y==0){
148 int x,
y, h,
v, linesize;
157 ptr = p->
data[i] + (linesize * (v * mb_y +
y)) + (h * mb_x + x);
166 pred= ptr[-linesize];
168 PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);
182 int x,
y, h,
v, linesize;
191 ptr = p->
data[i] + (linesize * (v * mb_y +
y)) + (h * mb_x + x);
192 PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor);