Mercurial > libavcodec.hg
comparison i386/h264dsp_mmx.c @ 3029:7a92269a3ccd libavcodec
tweak h264_biweight
author | lorenm |
---|---|
date | Mon, 09 Jan 2006 03:38:37 +0000 |
parents | b52d8ee430f6 |
children | 0b546eab515d |
comparison
equal
deleted
inserted
replaced
3028:1fadd4c26175 | 3029:7a92269a3ccd |
---|---|
969 } | 969 } |
970 dst += 2*stride; | 970 dst += 2*stride; |
971 } | 971 } |
972 } | 972 } |
973 | 973 |
974 static inline void ff_h264_biweight_WxH_mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets, int w, int h) | 974 static inline void ff_h264_biweight_WxH_mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset, int w, int h) |
975 { | 975 { |
976 int x, y; | 976 int x, y; |
977 int offset = ((offsets + offsetd + 1) | 1) << log2_denom; | 977 offset = ((offset + 1) | 1) << log2_denom; |
978 asm volatile( | 978 asm volatile( |
979 "movd %0, %%mm3 \n\t" | 979 "movd %0, %%mm3 \n\t" |
980 "movd %1, %%mm4 \n\t" | 980 "movd %1, %%mm4 \n\t" |
981 "movd %2, %%mm5 \n\t" | 981 "movd %2, %%mm5 \n\t" |
982 "movd %3, %%mm6 \n\t" | 982 "movd %3, %%mm6 \n\t" |
1008 dst += stride; | 1008 dst += stride; |
1009 } | 1009 } |
1010 } | 1010 } |
1011 | 1011 |
1012 #define H264_WEIGHT(W,H) \ | 1012 #define H264_WEIGHT(W,H) \ |
1013 static void ff_h264_biweight_ ## W ## x ## H ## _mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offsetd, int offsets){ \ | 1013 static void ff_h264_biweight_ ## W ## x ## H ## _mmx2(uint8_t *dst, uint8_t *src, int stride, int log2_denom, int weightd, int weights, int offset){ \ |
1014 ff_h264_biweight_WxH_mmx2(dst, src, stride, log2_denom, weightd, weights, offsetd, offsets, W, H); \ | 1014 ff_h264_biweight_WxH_mmx2(dst, src, stride, log2_denom, weightd, weights, offset, W, H); \ |
1015 } \ | 1015 } \ |
1016 static void ff_h264_weight_ ## W ## x ## H ## _mmx2(uint8_t *dst, int stride, int log2_denom, int weight, int offset){ \ | 1016 static void ff_h264_weight_ ## W ## x ## H ## _mmx2(uint8_t *dst, int stride, int log2_denom, int weight, int offset){ \ |
1017 ff_h264_weight_WxH_mmx2(dst, stride, log2_denom, weight, offset, W, H); \ | 1017 ff_h264_weight_WxH_mmx2(dst, stride, log2_denom, weight, offset, W, H); \ |
1018 } | 1018 } |
1019 | 1019 |