comparison rv10.c @ 712:e55b91623e09 libavcodec

fixing rv10, this isnt the cleanest solution (parsing the packet header in the codec & creating it in the muxer) but it was that way before things broke, and its the simplest solution
author michaelni
date Mon, 30 Sep 2002 21:36:43 +0000
parents f87dc45d921d
children e74a563eb643
comparison
equal deleted inserted replaced
711:dcbcf9676c9f 712:e55b91623e09
221 } 221 }
222 222
223 /* write RV 1.0 compatible frame header */ 223 /* write RV 1.0 compatible frame header */
224 void rv10_encode_picture_header(MpegEncContext *s, int picture_number) 224 void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
225 { 225 {
226 int full_frame= 1; 226 int full_frame= 0;
227 227
228 align_put_bits(&s->pb); 228 align_put_bits(&s->pb);
229
230 if(full_frame){
231 put_bits(&s->pb, 8, 0xc0); /* packet header */
232 put_bits(&s->pb, 16, 0x4000); /* len */
233 put_bits(&s->pb, 16, 0x4000); /* pos */
234 }
235
236 put_bits(&s->pb, 8, picture_number&0xFF);
237 229
238 put_bits(&s->pb, 1, 1); /* marker */ 230 put_bits(&s->pb, 1, 1); /* marker */
239 231
240 put_bits(&s->pb, 1, (s->pict_type == P_TYPE)); 232 put_bits(&s->pb, 1, (s->pict_type == P_TYPE));
241 233
274 static int rv10_decode_picture_header(MpegEncContext *s) 266 static int rv10_decode_picture_header(MpegEncContext *s)
275 { 267 {
276 int mb_count, pb_frame, marker, h, full_frame; 268 int mb_count, pb_frame, marker, h, full_frame;
277 int pic_num, unk; 269 int pic_num, unk;
278 270
271 //XXX/FIXME this should be done in the demuxer not here
279 /* skip packet header */ 272 /* skip packet header */
280 h = get_bits(&s->gb, 8); 273 h = get_bits(&s->gb, 8);
281 if ((h & 0xc0) == 0xc0) { 274 if ((h & 0xc0) == 0xc0) {
282 int len, pos; 275 int len, pos;
283 full_frame = 1; 276 full_frame = 1;