[FFmpeg-soc] [soc]: r749 - dirac/libavcodec/dirac.c
marco
subversion at mplayerhq.hu
Mon Aug 13 19:59:41 CEST 2007
Author: marco
Date: Mon Aug 13 19:59:41 2007
New Revision: 749
Log:
fix pixel ranges for MC blocks
Modified:
dirac/libavcodec/dirac.c
Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c (original)
+++ dirac/libavcodec/dirac.c Mon Aug 13 19:59:41 2007
@@ -2372,10 +2372,14 @@ static int dirac_motion_compensation(AVC
for (i = 0; i < s->blwidth; i++) {
struct dirac_blockmotion *block = &currblock[i];
- xstart = FFMAX(0, i * s->xbsep - s->xoffset);
- ystart = FFMAX(0, j * s->ybsep - s->yoffset);
+ /* XXX: These calculations do not match those in the
+ Dirac specification, but are correct. */
+ xstart = i * s->xbsep - s->xoffset;
+ ystart = j * s->ybsep - s->yoffset;
xstop = FFMIN(xstart + s->xblen, s->width);
ystop = FFMIN(ystart + s->yblen, s->height);
+ xstart = FFMAX(0, xstart);
+ ystart = FFMAX(0, ystart);
/* Intra */
if (block->use_ref[0] == 0 && block->use_ref[1] == 0)
More information about the FFmpeg-soc
mailing list