- return 0; //should not occur
-}
-
-/** Function used to do motion compensation with bicubic interpolation
- */
-#define VC1_MSPEL_MC(OP, OPNAME)\
-static void OPNAME ## vc1_mspel_mc(uint8_t *dst, const uint8_t *src, int stride, int hmode, int vmode, int rnd)\
-{\
- int i, j;\
-\
- if (vmode) { /* Horizontal filter to apply */\
- int r;\
-\
- if (hmode) { /* Vertical filter to apply, output to tmp */\
- static const int shift_value[] = { 0, 5, 1, 5 };\
- int shift = (shift_value[hmode]+shift_value[vmode])>>1;\
- int16_t tmp[11*8], *tptr = tmp;\
-\
- r = (1<<(shift-1)) + rnd-1;\
-\
- src -= 1;\
- for(j = 0; j < 8; j++) {\
- for(i = 0; i < 11; i++)\
- tptr[i] = (vc1_mspel_ver_filter_16bits(src + i, stride, vmode)+r)>>shift;\
- src += stride;\
- tptr += 11;\
- }\
-\
- r = 64-rnd;\
- tptr = tmp+1;\
- for(j = 0; j < 8; j++) {\
- for(i = 0; i < 8; i++)\
- OP(dst[i], (vc1_mspel_hor_filter_16bits(tptr + i, 1, hmode)+r)>>7);\
- dst += stride;\
- tptr += 11;\
- }\
-\
- return;\
- }\
- else { /* No horizontal filter, output 8 lines to dst */\
- r = 1-rnd;\
-\
- for(j = 0; j < 8; j++) {\
- for(i = 0; i < 8; i++)\
- OP(dst[i], vc1_mspel_filter(src + i, stride, vmode, r));\
- src += stride;\
- dst += stride;\
- }\
- return;\
- }\
- }\
-\
- /* Horizontal mode with no vertical mode */\
- for(j = 0; j < 8; j++) {\
- for(i = 0; i < 8; i++)\
- OP(dst[i], vc1_mspel_filter(src + i, 1, hmode, rnd));\
- dst += stride;\
- src += stride;\
- }\
+ return 0; // should not occur
+}
+
+/* Function used to do motion compensation with bicubic interpolation */
+#define VC1_MSPEL_MC(OP, OPNAME) \
+static av_always_inline void OPNAME ## vc1_mspel_mc(uint8_t *dst, \
+ const uint8_t *src, \
+ int stride, \
+ int hmode, \
+ int vmode, \
+ int rnd) \
+{ \
+ int i, j; \
+ \
+ if (vmode) { /* Horizontal filter to apply */ \
+ int r; \
+ \
+ if (hmode) { /* Vertical filter to apply, output to tmp */ \
+ static const int shift_value[] = { 0, 5, 1, 5 }; \
+ int shift = (shift_value[hmode] + shift_value[vmode]) >> 1; \
+ int16_t tmp[11 * 8], *tptr = tmp; \
+ \
+ r = (1 << (shift - 1)) + rnd - 1; \
+ \
+ src -= 1; \
+ for (j = 0; j < 8; j++) { \
+ for (i = 0; i < 11; i++) \
+ tptr[i] = (vc1_mspel_ver_filter_16bits(src + i, stride, vmode) + r) >> shift; \
+ src += stride; \
+ tptr += 11; \
+ } \
+ \
+ r = 64 - rnd; \
+ tptr = tmp + 1; \
+ for (j = 0; j < 8; j++) { \
+ for (i = 0; i < 8; i++) \
+ OP(dst[i], (vc1_mspel_hor_filter_16bits(tptr + i, 1, hmode) + r) >> 7); \
+ dst += stride; \
+ tptr += 11; \
+ } \
+ \
+ return; \
+ } else { /* No horizontal filter, output 8 lines to dst */ \
+ r = 1 - rnd; \
+ \
+ for (j = 0; j < 8; j++) { \
+ for (i = 0; i < 8; i++) \
+ OP(dst[i], vc1_mspel_filter(src + i, stride, vmode, r)); \
+ src += stride; \
+ dst += stride; \
+ } \
+ return; \
+ } \
+ } \
+ \
+ /* Horizontal mode with no vertical mode */ \
+ for (j = 0; j < 8; j++) { \
+ for (i = 0; i < 8; i++) \
+ OP(dst[i], vc1_mspel_filter(src + i, 1, hmode, rnd)); \
+ dst += stride; \
+ src += stride; \
+ } \