comparison postprocess.c @ 128:1afabe715e63 libpostproc

Move ALIGN macro to libavutil/common.h and use it in various places
author conrad
date Fri, 22 May 2009 21:32:13 +0000
parents 772a5a88c1bc
children 885c7548fb5e
comparison
equal deleted inserted replaced
127:772a5a88c1bc 128:1afabe715e63
949 949
950 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL }; 950 static const AVClass av_codec_context_class = { "Postproc", context_to_name, NULL };
951 951
952 pp_context *pp_get_context(int width, int height, int cpuCaps){ 952 pp_context *pp_get_context(int width, int height, int cpuCaps){
953 PPContext *c= av_malloc(sizeof(PPContext)); 953 PPContext *c= av_malloc(sizeof(PPContext));
954 int stride= (width+15)&(~15); //assumed / will realloc if needed 954 int stride= FFALIGN(width, 16); //assumed / will realloc if needed
955 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed 955 int qpStride= (width+15)/16 + 2; //assumed / will realloc if needed
956 956
957 memset(c, 0, sizeof(PPContext)); 957 memset(c, 0, sizeof(PPContext));
958 c->av_class = &av_codec_context_class; 958 c->av_class = &av_codec_context_class;
959 c->cpuCaps= cpuCaps; 959 c->cpuCaps= cpuCaps;