diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-21 20:18:43 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-21 20:18:43 +0400 |
commit | a41bf09d9c56215448f14fb086c9f882eb41ecac (patch) | |
tree | 541da01619d95763ff0ee46ae0df50125505b3c4 /libavcodec/mpegvideo_motion.c | |
parent | fb3f28ee289b9ea5106d5a7fa00a1018eb379e65 (diff) | |
parent | 6906b19346ae8a330bfaa1c16ce535be10789723 (diff) |
Merge commit '6906b19346ae8a330bfaa1c16ce535be10789723'
* commit '6906b19346ae8a330bfaa1c16ce535be10789723':
lavc: add missing files for arm
lavc: introduce VideoDSPContext
Conflicts:
configure
libavcodec/arm/dsputil_init_armv5te.c
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/dsputil_template.c
libavcodec/h264.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_enc.c
libavcodec/x86/dsputil_mmx.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpegvideo_motion.c')
-rw-r--r-- | libavcodec/mpegvideo_motion.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libavcodec/mpegvideo_motion.c b/libavcodec/mpegvideo_motion.c index 18e6428888..22381dea27 100644 --- a/libavcodec/mpegvideo_motion.c +++ b/libavcodec/mpegvideo_motion.c @@ -60,7 +60,7 @@ static void gmc1_motion(MpegEncContext *s, if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x >= FFMAX(s->h_edge_pos - 17, 0) || (unsigned)src_y >= FFMAX(s->v_edge_pos - 17, 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, linesize, 17, 17, src_x, src_y, s->h_edge_pos, s->v_edge_pos); + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, linesize, 17, 17, src_x, src_y, s->h_edge_pos, s->v_edge_pos); ptr= s->edge_emu_buffer; } } @@ -99,7 +99,7 @@ static void gmc1_motion(MpegEncContext *s, if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x >= FFMAX((s->h_edge_pos>>1) - 9, 0) || (unsigned)src_y >= FFMAX((s->v_edge_pos>>1) - 9, 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); ptr= s->edge_emu_buffer; emu=1; } @@ -108,7 +108,7 @@ static void gmc1_motion(MpegEncContext *s, ptr = ref_picture[2] + offset; if(emu){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); ptr= s->edge_emu_buffer; } s->dsp.gmc1(dest_cr, ptr, uvlinesize, 8, motion_x&15, motion_y&15, 128 - s->no_rounding); @@ -196,7 +196,7 @@ static inline int hpel_motion(MpegEncContext *s, if(s->unrestricted_mv && (s->flags&CODEC_FLAG_EMU_EDGE)){ if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&1) - 8, 0) || (unsigned)src_y > FFMAX(s->v_edge_pos - (motion_y&1) - 8, 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, 9, 9, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, src, s->linesize, 9, 9, src_x, src_y, s->h_edge_pos, s->v_edge_pos); src= s->edge_emu_buffer; emu=1; @@ -286,19 +286,19 @@ if(s->quarter_sample) "MPEG motion vector out of boundary (%d %d)\n", src_x, src_y); return; } - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based, src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos); ptr_y = s->edge_emu_buffer; if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ uint8_t *uvbuf= s->edge_emu_buffer+18*s->linesize; - s->dsp.emulated_edge_mc(uvbuf , + s->vdsp.emulated_edge_mc(uvbuf , ptr_cb, s->uvlinesize, 9, 9+field_based, uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1); - s->dsp.emulated_edge_mc(uvbuf+16, + s->vdsp.emulated_edge_mc(uvbuf+16, ptr_cr, s->uvlinesize, 9, 9+field_based, uvsrc_x, uvsrc_y<<field_based, @@ -499,17 +499,17 @@ static inline void qpel_motion(MpegEncContext *s, if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&3) - 16, 0) || (unsigned)src_y > FFMAX( v_edge_pos - (motion_y&3) - h , 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr_y, s->linesize, 17, 17+field_based, src_x, src_y<<field_based, s->h_edge_pos, s->v_edge_pos); ptr_y= s->edge_emu_buffer; if(!CONFIG_GRAY || !(s->flags&CODEC_FLAG_GRAY)){ uint8_t *uvbuf= s->edge_emu_buffer + 18*s->linesize; - s->dsp.emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize, + s->vdsp.emulated_edge_mc(uvbuf, ptr_cb, s->uvlinesize, 9, 9 + field_based, uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1); - s->dsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize, + s->vdsp.emulated_edge_mc(uvbuf + 16, ptr_cr, s->uvlinesize, 9, 9 + field_based, uvsrc_x, uvsrc_y<<field_based, s->h_edge_pos>>1, s->v_edge_pos>>1); @@ -578,7 +578,7 @@ static void chroma_4mv_motion(MpegEncContext *s, if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x > FFMAX((s->h_edge_pos>>1) - (dxy &1) - 8, 0) || (unsigned)src_y > FFMAX((s->v_edge_pos>>1) - (dxy>>1) - 8, 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); ptr= s->edge_emu_buffer; @@ -589,7 +589,7 @@ static void chroma_4mv_motion(MpegEncContext *s, ptr = ref_picture[2] + offset; if(emu){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->uvlinesize, 9, 9, src_x, src_y, s->h_edge_pos>>1, s->v_edge_pos>>1); ptr= s->edge_emu_buffer; @@ -604,9 +604,9 @@ static inline void prefetch_motion(MpegEncContext *s, uint8_t **pix, int dir){ const int mx= (s->mv[dir][0][0]>>shift) + 16*s->mb_x + 8; const int my= (s->mv[dir][0][1]>>shift) + 16*s->mb_y; int off= mx + (my + (s->mb_x&3)*4)*s->linesize + 64; - s->dsp.prefetch(pix[0]+off, s->linesize, 4); + s->vdsp.prefetch(pix[0]+off, s->linesize, 4); off= (mx>>1) + ((my>>1) + (s->mb_x&7))*s->uvlinesize + 64; - s->dsp.prefetch(pix[1]+off, pix[2]-pix[1], 2); + s->vdsp.prefetch(pix[1]+off, pix[2]-pix[1], 2); } /** @@ -758,7 +758,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, if(s->flags&CODEC_FLAG_EMU_EDGE){ if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&3) - 8, 0) || (unsigned)src_y > FFMAX(s->v_edge_pos - (motion_y&3) - 8, 0)){ - s->dsp.emulated_edge_mc(s->edge_emu_buffer, ptr, + s->vdsp.emulated_edge_mc(s->edge_emu_buffer, ptr, s->linesize, 9, 9, src_x, src_y, s->h_edge_pos, s->v_edge_pos); |