comparison rv10.c @ 2979:bfabfdf9ce55 libavcodec

COSMETICS: tabs --> spaces, some prettyprinting
author diego
date Thu, 22 Dec 2005 01:10:11 +0000
parents ef2149182f1c
children 0b546eab515d
comparison
equal deleted inserted replaced
2978:403183bbb505 2979:bfabfdf9ce55
234 { 234 {
235 int full_frame= 0; 235 int full_frame= 0;
236 236
237 align_put_bits(&s->pb); 237 align_put_bits(&s->pb);
238 238
239 put_bits(&s->pb, 1, 1); /* marker */ 239 put_bits(&s->pb, 1, 1); /* marker */
240 240
241 put_bits(&s->pb, 1, (s->pict_type == P_TYPE)); 241 put_bits(&s->pb, 1, (s->pict_type == P_TYPE));
242 242
243 put_bits(&s->pb, 1, 0); /* not PB frame */ 243 put_bits(&s->pb, 1, 0); /* not PB frame */
244 244
245 put_bits(&s->pb, 5, s->qscale); 245 put_bits(&s->pb, 5, s->qscale);
246 246
247 if (s->pict_type == I_TYPE) { 247 if (s->pict_type == I_TYPE) {
248 /* specific MPEG like DC coding not used */ 248 /* specific MPEG like DC coding not used */
249 } 249 }
250 /* if multiple packets per frame are sent, the position at which 250 /* if multiple packets per frame are sent, the position at which
251 to display the macro blocks is coded here */ 251 to display the macro blocks is coded here */
252 if(!full_frame){ 252 if(!full_frame){
253 put_bits(&s->pb, 6, 0); /* mb_x */ 253 put_bits(&s->pb, 6, 0); /* mb_x */
254 put_bits(&s->pb, 6, 0); /* mb_y */ 254 put_bits(&s->pb, 6, 0); /* mb_y */
255 put_bits(&s->pb, 12, s->mb_width * s->mb_height); 255 put_bits(&s->pb, 12, s->mb_width * s->mb_height);
256 } 256 }
257 257
258 put_bits(&s->pb, 3, 0); /* ignored */ 258 put_bits(&s->pb, 3, 0); /* ignored */
259 } 259 }
260 260
261 void rv20_encode_picture_header(MpegEncContext *s, int picture_number){ 261 void rv20_encode_picture_header(MpegEncContext *s, int picture_number){
262 put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ? 262 put_bits(&s->pb, 2, s->pict_type); //I 0 vs. 1 ?
263 put_bits(&s->pb, 1, 0); /* unknown bit */ 263 put_bits(&s->pb, 1, 0); /* unknown bit */
264 put_bits(&s->pb, 5, s->qscale); 264 put_bits(&s->pb, 5, s->qscale);
265 265
266 put_bits(&s->pb, 8, picture_number&0xFF); //FIXME wrong, but correct is not known 266 put_bits(&s->pb, 8, picture_number&0xFF); //FIXME wrong, but correct is not known
267 s->mb_x= s->mb_y= 0; 267 s->mb_x= s->mb_y= 0;
268 ff_h263_encode_mba(s); 268 ff_h263_encode_mba(s);
352 /* if multiple packets per frame are sent, the position at which 352 /* if multiple packets per frame are sent, the position at which
353 to display the macro blocks is coded here */ 353 to display the macro blocks is coded here */
354 354
355 mb_xy= s->mb_x + s->mb_y*s->mb_width; 355 mb_xy= s->mb_x + s->mb_y*s->mb_width;
356 if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){ 356 if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){
357 s->mb_x = get_bits(&s->gb, 6); /* mb_x */ 357 s->mb_x = get_bits(&s->gb, 6); /* mb_x */
358 s->mb_y = get_bits(&s->gb, 6); /* mb_y */ 358 s->mb_y = get_bits(&s->gb, 6); /* mb_y */
359 mb_count = get_bits(&s->gb, 12); 359 mb_count = get_bits(&s->gb, 12);
360 } else { 360 } else {
361 s->mb_x = 0; 361 s->mb_x = 0;
362 s->mb_y = 0; 362 s->mb_y = 0;
363 mb_count = s->mb_width * s->mb_height; 363 mb_count = s->mb_width * s->mb_height;
364 } 364 }
365 unk= get_bits(&s->gb, 3); /* ignored */ 365 unk= get_bits(&s->gb, 3); /* ignored */
366 //printf("%d\n", unk); 366 //printf("%d\n", unk);
367 s->f_code = 1; 367 s->f_code = 1;
368 s->unrestricted_mv = 1; 368 s->unrestricted_mv = 1;
369 369
370 return mb_count; 370 return mb_count;