From bbf0ef57e9d2d7bb2995f664dd74c8229bca25f5 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 21 Jan 2014 15:50:26 -0800 Subject: bfin: Move all assembly declarations only used within one .c file there This is done similarly for all other architectures. --- libavcodec/bfin/dsputil_bfin.c | 33 ++++++++++++++++++++++- libavcodec/bfin/dsputil_bfin.h | 59 ------------------------------------------ libavcodec/bfin/hpeldsp_bfin.c | 8 ++++++ libavcodec/bfin/hpeldsp_bfin.h | 6 ----- libavcodec/bfin/vp3_bfin.c | 5 ++-- libavcodec/bfin/vp3_bfin.h | 27 ------------------- 6 files changed, 43 insertions(+), 95 deletions(-) delete mode 100644 libavcodec/bfin/dsputil_bfin.h delete mode 100644 libavcodec/bfin/vp3_bfin.h (limited to 'libavcodec/bfin') diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c index 72c1081..7a214a3 100644 --- a/libavcodec/bfin/dsputil_bfin.c +++ b/libavcodec/bfin/dsputil_bfin.c @@ -21,10 +21,41 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include + +#include "config.h" #include "libavutil/attributes.h" +#include "libavutil/bfin/attributes.h" #include "libavcodec/avcodec.h" #include "libavcodec/dsputil.h" -#include "dsputil_bfin.h" + +void ff_bfin_idct(int16_t *block) attribute_l1_text; +void ff_bfin_fdct(int16_t *block) attribute_l1_text; + +void ff_bfin_add_pixels_clamped(const int16_t *block, uint8_t *dest, + int line_size) attribute_l1_text; +void ff_bfin_put_pixels_clamped(const int16_t *block, uint8_t *dest, + int line_size) attribute_l1_text; + +void ff_bfin_diff_pixels(int16_t *block, const uint8_t *s1, const uint8_t *s2, + int stride) attribute_l1_text; +void ff_bfin_get_pixels(int16_t *restrict block, const uint8_t *pixels, + int line_size) attribute_l1_text; + +int ff_bfin_pix_norm1(uint8_t *pix, int line_size) attribute_l1_text; +int ff_bfin_pix_sum(uint8_t *p, int stride) attribute_l1_text; + +int ff_bfin_z_sad8x8(uint8_t *blk1, uint8_t *blk2, int dsz, + int line_size, int h) attribute_l1_text; +int ff_bfin_z_sad16x16(uint8_t *blk1, uint8_t *blk2, int dsz, + int line_size, int h) attribute_l1_text; + +int ff_bfin_sse4(void *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) attribute_l1_text; +int ff_bfin_sse8(void *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) attribute_l1_text; +int ff_bfin_sse16(void *v, uint8_t *pix1, uint8_t *pix2, + int line_size, int h) attribute_l1_text; static void bfin_idct_add(uint8_t *dest, int line_size, int16_t *block) { diff --git a/libavcodec/bfin/dsputil_bfin.h b/libavcodec/bfin/dsputil_bfin.h deleted file mode 100644 index 8b51773..0000000 --- a/libavcodec/bfin/dsputil_bfin.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * BlackFin DSPUTILS COMMON OPTIMIZATIONS HEADER - * - * Copyright (C) 2007 Marc Hoffman - * - * This file is part of Libav. - * - * Libav 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, - * 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 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVCODEC_BFIN_DSPUTIL_BFIN_H -#define AVCODEC_BFIN_DSPUTIL_BFIN_H - -#include - -#include "config.h" -#include "libavutil/bfin/attributes.h" - -void ff_bfin_idct(int16_t *block) attribute_l1_text; -void ff_bfin_fdct(int16_t *block) attribute_l1_text; - -void ff_bfin_add_pixels_clamped(const int16_t *block, uint8_t *dest, - int line_size) attribute_l1_text; -void ff_bfin_put_pixels_clamped(const int16_t *block, uint8_t *dest, - int line_size) attribute_l1_text; - -void ff_bfin_diff_pixels(int16_t *block, const uint8_t *s1, const uint8_t *s2, - int stride) attribute_l1_text; -void ff_bfin_get_pixels(int16_t *restrict block, const uint8_t *pixels, - int line_size) attribute_l1_text; - -int ff_bfin_pix_norm1(uint8_t *pix, int line_size) attribute_l1_text; -int ff_bfin_pix_sum(uint8_t *p, int stride) attribute_l1_text; - -int ff_bfin_z_sad8x8(uint8_t *blk1, uint8_t *blk2, int dsz, - int line_size, int h) attribute_l1_text; -int ff_bfin_z_sad16x16(uint8_t *blk1, uint8_t *blk2, int dsz, - int line_size, int h) attribute_l1_text; - -int ff_bfin_sse4(void *v, uint8_t *pix1, uint8_t *pix2, - int line_size, int h) attribute_l1_text; -int ff_bfin_sse8(void *v, uint8_t *pix1, uint8_t *pix2, - int line_size, int h) attribute_l1_text; -int ff_bfin_sse16(void *v, uint8_t *pix1, uint8_t *pix2, - int line_size, int h) attribute_l1_text; - -#endif /* AVCODEC_BFIN_DSPUTIL_BFIN_H */ diff --git a/libavcodec/bfin/hpeldsp_bfin.c b/libavcodec/bfin/hpeldsp_bfin.c index 2dfc4c4..9bed7f3 100644 --- a/libavcodec/bfin/hpeldsp_bfin.c +++ b/libavcodec/bfin/hpeldsp_bfin.c @@ -25,9 +25,17 @@ #include #include "libavutil/attributes.h" +#include "libavutil/bfin/attributes.h" #include "libavcodec/hpeldsp.h" #include "hpeldsp_bfin.h" +void ff_bfin_put_pixels8uc_nornd(uint8_t *block, const uint8_t *s0, + const uint8_t *s1, int line_size, + int h) attribute_l1_text; +void ff_bfin_put_pixels16uc_nornd(uint8_t *block, const uint8_t *s0, + const uint8_t *s1, int line_size, + int h) attribute_l1_text; + static void bfin_put_pixels8(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h) { diff --git a/libavcodec/bfin/hpeldsp_bfin.h b/libavcodec/bfin/hpeldsp_bfin.h index 4908b0f..b02561c 100644 --- a/libavcodec/bfin/hpeldsp_bfin.h +++ b/libavcodec/bfin/hpeldsp_bfin.h @@ -36,11 +36,5 @@ void ff_bfin_put_pixels8uc(uint8_t *block, const uint8_t *s0, void ff_bfin_put_pixels16uc(uint8_t *block, const uint8_t *s0, const uint8_t *s1, int dest_size, int line_size, int h) attribute_l1_text; -void ff_bfin_put_pixels8uc_nornd(uint8_t *block, const uint8_t *s0, - const uint8_t *s1, int line_size, - int h) attribute_l1_text; -void ff_bfin_put_pixels16uc_nornd(uint8_t *block, const uint8_t *s0, - const uint8_t *s1, int line_size, - int h) attribute_l1_text; #endif /* AVCODEC_BFIN_HPELDSP_BFIN_H */ diff --git a/libavcodec/bfin/vp3_bfin.c b/libavcodec/bfin/vp3_bfin.c index 5940583..ae7ce93 100644 --- a/libavcodec/bfin/vp3_bfin.c +++ b/libavcodec/bfin/vp3_bfin.c @@ -18,14 +18,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include #include "libavutil/attributes.h" #include "libavcodec/avcodec.h" #include "libavcodec/vp3dsp.h" #include "libavcodec/dsputil.h" -#include "dsputil_bfin.h" -#include "vp3_bfin.h" + +void ff_bfin_vp3_idct(int16_t *block); /* Intra iDCT offset 128 */ static void bfin_vp3_idct_put(uint8_t *dest, int line_size, int16_t *block) diff --git a/libavcodec/bfin/vp3_bfin.h b/libavcodec/bfin/vp3_bfin.h deleted file mode 100644 index 5a2c5a4..0000000 --- a/libavcodec/bfin/vp3_bfin.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is part of Libav. - * - * Libav 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, - * 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 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#ifndef AVCODEC_BFIN_VP3_BFIN_H -#define AVCODEC_BFIN_VP3_BFIN_H - -#include - -void ff_bfin_vp3_idct(int16_t *block); - -#endif /* AVCODEC_BFIN_VP3_BFIN_H */ -- cgit v1.1