summaryrefslogtreecommitdiff
path: root/libavcodec/rv34.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2008-11-20 14:03:35 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2008-11-20 14:03:35 +0000
commit7690351cf353ff8d8c07e884da89352294e3bfea (patch)
tree108f0e9a3efe44bc042f185075d895fee630a7f8 /libavcodec/rv34.c
parentc260b59603ee4bef42e0f2c4e1c5ec9b76f5e99b (diff)
Use wider margins for edge emulation in RV30/40
Originally committed as revision 15889 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r--libavcodec/rv34.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 937c23b812..f10ded94bf 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -664,12 +664,12 @@ static inline void rv34_mc(RV34DecContext *r, const int block_type,
srcY += src_y * s->linesize + src_x;
srcU += uvsrc_y * s->uvlinesize + uvsrc_x;
srcV += uvsrc_y * s->uvlinesize + uvsrc_x;
- if( (unsigned)(src_x - !!lx*2) > s->h_edge_pos - !!lx*2 - (width <<3) - 3
- || (unsigned)(src_y - !!ly*2) > s->v_edge_pos - !!ly*2 - (height<<3) - 3){
- uint8_t *uvbuf= s->edge_emu_buffer + 20 * s->linesize;
+ if( (unsigned)(src_x - !!lx*2) > s->h_edge_pos - !!lx*2 - (width <<3) - 4
+ || (unsigned)(src_y - !!ly*2) > s->v_edge_pos - !!ly*2 - (height<<3) - 4){
+ uint8_t *uvbuf= s->edge_emu_buffer + 22 * s->linesize;
srcY -= 2 + 2*s->linesize;
- ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, (width<<3)+4, (height<<3)+4,
+ ff_emulated_edge_mc(s->edge_emu_buffer, srcY, s->linesize, (width<<3)+6, (height<<3)+6,
src_x - 2, src_y - 2, s->h_edge_pos, s->v_edge_pos);
srcY = s->edge_emu_buffer + 2 + 2*s->linesize;
ff_emulated_edge_mc(uvbuf , srcU, s->uvlinesize, (width<<2)+1, (height<<2)+1,