Mercurial > libavcodec.hg
comparison huffyuv.c @ 10419:71760101783e libavcodec
Huffyuv: Remove unnecessary allocation in alloc_temp().
RGB only needs one temp array.
author | astrange |
---|---|
date | Fri, 16 Oct 2009 22:55:34 +0000 |
parents | 84d50ce146f7 |
children | 95f3daa991a2 |
comparison
equal
deleted
inserted
replaced
10418:84d50ce146f7 | 10419:71760101783e |
---|---|
404 if(s->bitstream_bpp<24){ | 404 if(s->bitstream_bpp<24){ |
405 for(i=0; i<3; i++){ | 405 for(i=0; i<3; i++){ |
406 s->temp[i]= av_malloc(s->width + 16); | 406 s->temp[i]= av_malloc(s->width + 16); |
407 } | 407 } |
408 }else{ | 408 }else{ |
409 for(i=0; i<2; i++){ | 409 s->temp[0]= av_malloc(4*s->width + 16); |
410 s->temp[i]= av_malloc(4*s->width + 16); | |
411 } | |
412 } | 410 } |
413 } | 411 } |
414 | 412 |
415 static av_cold int common_init(AVCodecContext *avctx){ | 413 static av_cold int common_init(AVCodecContext *avctx){ |
416 HYuvContext *s = avctx->priv_data; | 414 HYuvContext *s = avctx->priv_data; |