Mercurial > libavcodec.hg
comparison smc.c @ 2103:bcc91fa67694 libavcodec
fix for width or height not multiple of 4
author | rtognimp |
---|---|
date | Sun, 27 Jun 2004 11:06:30 +0000 |
parents | d7505fbe66cb |
children | f67b63ed036d |
comparison
equal
deleted
inserted
replaced
2102:6681dcffb5cf | 2103:bcc91fa67694 |
---|---|
123 if (chunk_size != s->size) | 123 if (chunk_size != s->size) |
124 av_log(s->avctx, AV_LOG_INFO, "warning: MOV chunk size != encoded chunk size (%d != %d); using MOV chunk size\n", | 124 av_log(s->avctx, AV_LOG_INFO, "warning: MOV chunk size != encoded chunk size (%d != %d); using MOV chunk size\n", |
125 chunk_size, s->size); | 125 chunk_size, s->size); |
126 | 126 |
127 chunk_size = s->size; | 127 chunk_size = s->size; |
128 total_blocks = (s->avctx->width * s->avctx->height) / (4 * 4); | 128 total_blocks = ((s->avctx->width + 3) / 4) * ((s->avctx->height + 3) / 4); |
129 | 129 |
130 /* traverse through the blocks */ | 130 /* traverse through the blocks */ |
131 while (total_blocks) { | 131 while (total_blocks) { |
132 /* sanity checks */ | 132 /* sanity checks */ |
133 /* make sure stream ptr hasn't gone out of bounds */ | 133 /* make sure stream ptr hasn't gone out of bounds */ |