aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vp8.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-04 16:10:24 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-04 16:14:30 +0100
commit9a082fec1af547f0e777a55186fdd7887d7dfa0d (patch)
treeee097b0d384b20f6f9fc9ebdf43c031c056baee4 /libavcodec/vp8.c
parentc18cfd1001e012135211630612be6079ba627ace (diff)
parente46ad30a808744ddf3855567e162292a4eaabac7 (diff)
downloadffmpeg-9a082fec1af547f0e777a55186fdd7887d7dfa0d.tar.gz
Merge commit 'e46ad30a808744ddf3855567e162292a4eaabac7'
* commit 'e46ad30a808744ddf3855567e162292a4eaabac7': vp8: use a fixed-size edge emu buffer Conflicts: libavcodec/vp8.c libavcodec/vp8.h See: face578d56c2d1375e40d5e2a28acc122132bc55 Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vp8.c')
-rw-r--r--libavcodec/vp8.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 4c5519407a..cf38a323cf 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -1162,6 +1162,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,
if (AV_RN32A(mv)) {
int src_linesize = linesize;
+
int mx = (mv->x << 1)&7, mx_idx = subpel_idx[0][mx];
int my = (mv->y << 1)&7, my_idx = subpel_idx[0][my];
@@ -1175,12 +1176,12 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst,
y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {
s->vdsp.emulated_edge_mc(td->edge_emu_buffer,
src - my_idx * linesize - mx_idx,
- 32, linesize,
+ EDGE_EMU_LINESIZE, linesize,
block_w + subpel_idx[1][mx],
block_h + subpel_idx[1][my],
x_off - mx_idx, y_off - my_idx, width, height);
- src = td->edge_emu_buffer + mx_idx + 32 * my_idx;
- src_linesize = 32;
+ src = td->edge_emu_buffer + mx_idx + EDGE_EMU_LINESIZE * my_idx;
+ src_linesize = EDGE_EMU_LINESIZE;
}
mc_func[my_idx][mx_idx](dst, linesize, src, src_linesize, block_h, mx, my);
} else {
@@ -1229,21 +1230,21 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, uint8_t *dst
y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) {
s->vdsp.emulated_edge_mc(td->edge_emu_buffer,
src1 - my_idx * linesize - mx_idx,
- 32, linesize,
+ EDGE_EMU_LINESIZE, linesize,
block_w + subpel_idx[1][mx],
block_h + subpel_idx[1][my],
x_off - mx_idx, y_off - my_idx, width, height);
- src1 = td->edge_emu_buffer + mx_idx + 32 * my_idx;
- mc_func[my_idx][mx_idx](dst1, linesize, src1, 32, block_h, mx, my);
+ src1 = td->edge_emu_buffer + mx_idx + EDGE_EMU_LINESIZE * my_idx;
+ mc_func[my_idx][mx_idx](dst1, linesize, src1, EDGE_EMU_LINESIZE, block_h, mx, my);
s->vdsp.emulated_edge_mc(td->edge_emu_buffer,
src2 - my_idx * linesize - mx_idx,
- 32, linesize,
+ EDGE_EMU_LINESIZE, linesize,
block_w + subpel_idx[1][mx],
block_h + subpel_idx[1][my],
x_off - mx_idx, y_off - my_idx, width, height);
- src2 = td->edge_emu_buffer + mx_idx + 32 * my_idx;
- mc_func[my_idx][mx_idx](dst2, linesize, src2, 32, block_h, mx, my);
+ src2 = td->edge_emu_buffer + mx_idx + EDGE_EMU_LINESIZE * my_idx;
+ mc_func[my_idx][mx_idx](dst2, linesize, src2, EDGE_EMU_LINESIZE, block_h, mx, my);
} else {
mc_func[my_idx][mx_idx](dst1, linesize, src1, linesize, block_h, mx, my);
mc_func[my_idx][mx_idx](dst2, linesize, src2, linesize, block_h, mx, my);