mirror of https://git.ffmpeg.org/ffmpeg.git
use the right stride
patch by Vitor: [vitor1001 gmail com] Originally committed as revision 9446 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7cbf432db1
commit
a7ae617fbd
|
@ -52,6 +52,7 @@ void ff_apply_vector_2x2(RoqContext *ri, int x, int y, roq_cell *cell)
|
||||||
bptr[stride ] = cell->y[2];
|
bptr[stride ] = cell->y[2];
|
||||||
bptr[stride+1] = cell->y[3];
|
bptr[stride+1] = cell->y[3];
|
||||||
|
|
||||||
|
stride = ri->c_stride;
|
||||||
bptr = ri->current_frame->data[1] + boffs;
|
bptr = ri->current_frame->data[1] + boffs;
|
||||||
bptr[0 ] =
|
bptr[0 ] =
|
||||||
bptr[1 ] =
|
bptr[1 ] =
|
||||||
|
@ -79,6 +80,7 @@ void ff_apply_vector_4x4(RoqContext *ri, int x, int y, roq_cell *cell)
|
||||||
bptr[stride*2 ] = bptr[stride*2+1] = bptr[stride*3 ] = bptr[stride*3+1] = cell->y[2];
|
bptr[stride*2 ] = bptr[stride*2+1] = bptr[stride*3 ] = bptr[stride*3+1] = cell->y[2];
|
||||||
bptr[stride*2+2] = bptr[stride*2+3] = bptr[stride*3+2] = bptr[stride*3+3] = cell->y[3];
|
bptr[stride*2+2] = bptr[stride*2+3] = bptr[stride*3+2] = bptr[stride*3+3] = cell->y[3];
|
||||||
|
|
||||||
|
stride = ri->c_stride;
|
||||||
bptr = ri->current_frame->data[1] + boffs;
|
bptr = ri->current_frame->data[1] + boffs;
|
||||||
bptr[ 0] = bptr[ 1] = bptr[stride ] = bptr[stride +1] =
|
bptr[ 0] = bptr[ 1] = bptr[stride ] = bptr[stride +1] =
|
||||||
bptr[ 2] = bptr[ 3] = bptr[stride +2] = bptr[stride +3] =
|
bptr[ 2] = bptr[ 3] = bptr[stride +2] = bptr[stride +3] =
|
||||||
|
@ -109,10 +111,13 @@ static inline void apply_motion_generic(RoqContext *ri, int x, int y, int deltax
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(cp = 0; cp < 3; cp++)
|
for(cp = 0; cp < 3; cp++) {
|
||||||
block_copy(ri->current_frame->data[cp] + (y * ri->y_stride) + x,
|
int stride = ri->current_frame->linesize[cp];
|
||||||
ri->last_frame->data[cp] + (my * ri->y_stride) + mx,
|
block_copy(ri->current_frame->data[cp] + (y*stride) + x,
|
||||||
ri->y_stride, ri->y_stride, sz);
|
ri->last_frame->data[cp] + (my*stride) + mx,
|
||||||
|
stride, stride, sz);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue