comparison flashsvenc.c @ 4377:75942fdfd1a1 libavcodec

Add flashsv encoder to changelog and fix the encoder so it actually works.
author banan
date Sun, 21 Jan 2007 21:24:05 +0000
parents 65bb4ce33467
children d15d3cd71df2
comparison
equal deleted inserted replaced
4376:682b2e1ff76a 4377:75942fdfd1a1
209 209
210 size = s->zstream.total_out; 210 size = s->zstream.total_out;
211 //av_log(avctx, AV_LOG_INFO, "compressed blocks: %d\n", size); 211 //av_log(avctx, AV_LOG_INFO, "compressed blocks: %d\n", size);
212 */ 212 */
213 bytestream_put_be16(&ptr,(unsigned int)zsize); 213 bytestream_put_be16(&ptr,(unsigned int)zsize);
214 buf_pos += zsize; 214 buf_pos += zsize+2;
215 //av_log(avctx, AV_LOG_ERROR, "buf_pos = %d\n", buf_pos); 215 //av_log(avctx, AV_LOG_ERROR, "buf_pos = %d\n", buf_pos);
216 } else { 216 } else {
217 pred_blocks++; 217 pred_blocks++;
218 bytestream_put_be16(&ptr,0); 218 bytestream_put_be16(&ptr,0);
219 buf_pos += 2;
219 } 220 }
220 } 221 }
221 } 222 }
222 223
223 if (pred_blocks) 224 if (pred_blocks)
291 return -1; 292 return -1;
292 } 293 }
293 294
294 res = encode_bitstream(s, p, buf, buf_size, opt_w*16, opt_h*16, s->previous_frame, &I_frame); 295 res = encode_bitstream(s, p, buf, buf_size, opt_w*16, opt_h*16, s->previous_frame, &I_frame);
295 #endif 296 #endif
296 297 av_log(avctx, AV_LOG_ERROR, "res %d\n", res);
297 //save the current frame 298 //save the current frame
298 memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]*3); 299 memcpy(s->previous_frame, p->data[0], s->image_height*p->linesize[0]*3);
299 300
300 //mark the frame type so the muxer can mux it correctly 301 //mark the frame type so the muxer can mux it correctly
301 if (I_frame) { 302 if (I_frame) {