Mercurial > libavcodec.hg
comparison roqvideo.c @ 5188:c2a475157299 libavcodec
add width and height in context and use them
patch by Vitor: [vitor1001 gmail com]
author | benoit |
---|---|
date | Tue, 26 Jun 2007 20:10:26 +0000 |
parents | 3adfa650c7ad |
children | ab669ac706dc |
comparison
equal
deleted
inserted
replaced
5187:9968f39d03aa | 5188:c2a475157299 |
---|---|
100 | 100 |
101 mx = x + deltax; | 101 mx = x + deltax; |
102 my = y + deltay; | 102 my = y + deltay; |
103 | 103 |
104 /* check MV against frame boundaries */ | 104 /* check MV against frame boundaries */ |
105 if ((mx < 0) || (mx > ri->avctx->width - sz) || | 105 if ((mx < 0) || (mx > ri->width - sz) || |
106 (my < 0) || (my > ri->avctx->height - sz)) { | 106 (my < 0) || (my > ri->height - sz)) { |
107 av_log(ri->avctx, AV_LOG_ERROR, "motion vector out of bounds: MV = (%d, %d), boundaries = (0, 0, %d, %d)\n", | 107 av_log(ri->avctx, AV_LOG_ERROR, "motion vector out of bounds: MV = (%d, %d), boundaries = (0, 0, %d, %d)\n", |
108 mx, my, ri->avctx->width, ri->avctx->height); | 108 mx, my, ri->width, ri->height); |
109 return; | 109 return; |
110 } | 110 } |
111 | 111 |
112 for(cp = 0; cp < 3; cp++) | 112 for(cp = 0; cp < 3; cp++) |
113 block_copy(ri->current_frame->data[cp] + (y * ri->y_stride) + x, | 113 block_copy(ri->current_frame->data[cp] + (y * ri->y_stride) + x, |