diff options
Diffstat (limited to 'libavcodec/dsputil_template.c')
-rw-r--r-- | libavcodec/dsputil_template.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/libavcodec/dsputil_template.c b/libavcodec/dsputil_template.c index ec7f930..246d6c4 100644 --- a/libavcodec/dsputil_template.c +++ b/libavcodec/dsputil_template.c @@ -5,20 +5,20 @@ * * gmc & q-pel & 32/64 bit based MC by Michael Niedermayer <michaelni@gmx.at> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -31,10 +31,10 @@ /* draw the edges of width 'w' of an image of size width, height */ //FIXME check that this is ok for mpeg4 interlaced -static void FUNCC(draw_edges)(uint8_t *_buf, int _wrap, int width, int height, int w, int h, int sides) +static void FUNCC(draw_edges)(uint8_t *p_buf, int p_wrap, int width, int height, int w, int h, int sides) { - pixel *buf = (pixel*)_buf; - int wrap = _wrap / sizeof(pixel); + pixel *buf = (pixel*)p_buf; + int wrap = p_wrap / sizeof(pixel); pixel *ptr, *last_line; int i; @@ -66,12 +66,12 @@ static void FUNCC(draw_edges)(uint8_t *_buf, int _wrap, int width, int height, i } #define DCTELEM_FUNCS(dctcoef, suffix) \ -static void FUNCC(get_pixels ## suffix)(int16_t *restrict _block, \ +static void FUNCC(get_pixels ## suffix)(int16_t *av_restrict _block, \ const uint8_t *_pixels, \ int line_size) \ { \ const pixel *pixels = (const pixel *) _pixels; \ - dctcoef *restrict block = (dctcoef *) _block; \ + dctcoef *av_restrict block = (dctcoef *) _block; \ int i; \ \ /* read the pixels */ \ @@ -107,7 +107,9 @@ DCTELEM_FUNCS(int16_t, _16) DCTELEM_FUNCS(dctcoef, _32) #endif +#if BIT_DEPTH == 8 #include "hpel_template.c" +#endif #define PIXOP2(OPNAME, OP) \ static inline void FUNC(OPNAME ## _no_rnd_pixels8_l2)(uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int dst_stride, \ @@ -251,7 +253,7 @@ static inline void FUNCC(OPNAME ## _pixels2_xy2)(uint8_t *_block, const uint8_t int i, a0, b0, a1, b1;\ pixel *block = (pixel*)_block;\ const pixel *pixels = (const pixel*)_pixels;\ - line_size /= sizeof(pixel);\ + line_size >>= sizeof(pixel)-1;\ a0= pixels[0];\ b0= pixels[1] + 2;\ a0 += b0;\ @@ -420,16 +422,3 @@ PIXOP2(put, op_put) #endif #undef op_avg #undef op_put - -void FUNCC(ff_put_pixels8x8)(uint8_t *dst, uint8_t *src, int stride) { - FUNCC(put_pixels8)(dst, src, stride, 8); -} -void FUNCC(ff_avg_pixels8x8)(uint8_t *dst, uint8_t *src, int stride) { - FUNCC(avg_pixels8)(dst, src, stride, 8); -} -void FUNCC(ff_put_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) { - FUNCC(put_pixels16)(dst, src, stride, 16); -} -void FUNCC(ff_avg_pixels16x16)(uint8_t *dst, uint8_t *src, int stride) { - FUNCC(avg_pixels16)(dst, src, stride, 16); -} |