comparison a64multienc.c @ 12416:87e6af0a6a5a libavcodec

cleanup a bit in a64multi_encode_frame()
author bindhammer
date Wed, 25 Aug 2010 11:47:50 +0000
parents 04b85031bf00
children 1b8f44e2754e
comparison
equal deleted inserted replaced
12415:04b85031bf00 12416:87e6af0a6a5a
269 } 269 }
270 } 270 }
271 271
272 /* lifetime reached so now convert X frames at once */ 272 /* lifetime reached so now convert X frames at once */
273 if (c->mc_frame_counter == c->mc_lifetime) { 273 if (c->mc_frame_counter == c->mc_lifetime) {
274 req_size = 0;
274 /* any frames to encode? */ 275 /* any frames to encode? */
275 if(c->mc_lifetime) { 276 if(c->mc_lifetime) {
276 /* calc optimal new charset + charmaps */ 277 /* calc optimal new charset + charmaps */
277 ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx); 278 ff_init_elbg(meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
278 ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx); 279 ff_do_elbg (meta, 32, 1000 * c->mc_lifetime, best_cb, CHARSET_CHARS, 50, charmap, &c->randctx);
279 280
280 /* create colorram map and a c64 readable charset */ 281 /* create colorram map and a c64 readable charset */
281 render_charset(avctx, charset, colram); 282 render_charset(avctx, charset, colram);
282 }
283
284 req_size = 0;
285 283
286 /* copy charset to buf */ 284 /* copy charset to buf */
287 //XXX this all should maybe move to the muxer? as well as teh chunked/not chunked thing?
288 /* either write charset as a whole (more comfy when playing from mem) */
289 /* copy charset chunk if exists */
290 if(c->mc_lifetime) {
291 memcpy(buf,charset,0x800*(INTERLACED+1)); 285 memcpy(buf,charset,0x800*(INTERLACED+1));
292 286
293 /* advance pointers */ 287 /* advance pointers */
294 buf += 0x800*(INTERLACED+1); 288 buf += 0x800*(INTERLACED+1);
295 charset += 0x800*(INTERLACED+1); 289 charset += 0x800*(INTERLACED+1);