Move ALIGN macro to libavutil/common.h and use it in various places

Originally committed as revision 18898 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
David Conrad
2009-05-22 21:32:13 +00:00
parent 4969cc0bd8
commit ef516f7377
7 changed files with 13 additions and 18 deletions

View File

@ -951,7 +951,7 @@ static const AVClass av_codec_context_class = { "Postproc", context_to_name, NUL
pp_context *pp_get_context(int width, int height, int cpuCaps){
PPContext *c= av_malloc(sizeof(PPContext));
int stride= (width+15)&(~15); //assumed / will realloc if needed
int stride= FFALIGN(width, 16); //assumed / will realloc if needed
int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
memset(c, 0, sizeof(PPContext));