Mercurial > libavcodec.hg
comparison zmbvenc.c @ 9686:bc32976d6d9d libavcodec
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 | 5680832edb83 |
children | 38cfe222e1a4 |
comparison
equal
deleted
inserted
replaced
9685:ab8b3b2e4d49 | 9686:bc32976d6d9d |
---|---|
282 /* Allocate compression buffer */ | 282 /* Allocate compression buffer */ |
283 if ((c->comp_buf = av_malloc(c->comp_size)) == NULL) { | 283 if ((c->comp_buf = av_malloc(c->comp_size)) == NULL) { |
284 av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n"); | 284 av_log(avctx, AV_LOG_ERROR, "Can't allocate compression buffer.\n"); |
285 return -1; | 285 return -1; |
286 } | 286 } |
287 c->pstride = (avctx->width + 15) & ~15; | 287 c->pstride = FFALIGN(avctx->width, 16); |
288 if ((c->prev = av_malloc(c->pstride * avctx->height)) == NULL) { | 288 if ((c->prev = av_malloc(c->pstride * avctx->height)) == NULL) { |
289 av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n"); | 289 av_log(avctx, AV_LOG_ERROR, "Can't allocate picture.\n"); |
290 return -1; | 290 return -1; |
291 } | 291 } |
292 | 292 |