--- libavcodec/bfin/dsputil_bfin.h | 9 +-------- libavcodec/bfin/hpeldsp_bfin.h | 10 +--------- .../bfin/hpeldsp_bfin.h => libavutil/bfin/attributes.h | 18 ++++-------------- libswscale/bfin/swscale_bfin.c | 13 +++++-------- libswscale/bfin/yuv2rgb_bfin.c | 13 ++++--------- 5 files changed, 15 insertions(+), 48 deletions(-) copy libavcodec/bfin/hpeldsp_bfin.h => libavutil/bfin/attributes.h (50%)
diff --git a/libavcodec/bfin/dsputil_bfin.h b/libavcodec/bfin/dsputil_bfin.h index 2446615..8b51773 100644 --- a/libavcodec/bfin/dsputil_bfin.h +++ b/libavcodec/bfin/dsputil_bfin.h @@ -26,14 +26,7 @@ #include <stdint.h> #include "config.h" - -#if defined(__FDPIC__) && CONFIG_SRAM -#define attribute_l1_text __attribute__((l1_text)) -#define attribute_l1_data_b __attribute__((l1_data_B)) -#else -#define attribute_l1_text -#define attribute_l1_data_b -#endif +#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; diff --git a/libavcodec/bfin/hpeldsp_bfin.h b/libavcodec/bfin/hpeldsp_bfin.h index e99f0b0..c6fc327 100644 --- a/libavcodec/bfin/hpeldsp_bfin.h +++ b/libavcodec/bfin/hpeldsp_bfin.h @@ -23,15 +23,7 @@ #include <stdint.h> -#include "config.h" - -#if defined(__FDPIC__) && CONFIG_SRAM -#define attribute_l1_text __attribute__ ((l1_text)) -#define attribute_l1_data_b __attribute__((l1_data_B)) -#else -#define attribute_l1_text -#define attribute_l1_data_b -#endif +#include "libavutil/bfin/attributes.h" void ff_bfin_z_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text; void ff_bfin_z_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text; diff --git a/libavcodec/bfin/hpeldsp_bfin.h b/libavutil/bfin/attributes.h similarity index 50% copy from libavcodec/bfin/hpeldsp_bfin.h copy to libavutil/bfin/attributes.h index e99f0b0..659f9a9 100644 --- a/libavcodec/bfin/hpeldsp_bfin.h +++ b/libavutil/bfin/attributes.h @@ -18,27 +18,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef AVCODEC_BFIN_HPELDSP_BFIN_H -#define AVCODEC_BFIN_HPELDSP_BFIN_H - -#include <stdint.h> +#ifndef AVUTIL_BFIN_ATTRIBUTES_H +#define AVUTIL_BFIN_ATTRIBUTES_H #include "config.h" #if defined(__FDPIC__) && CONFIG_SRAM -#define attribute_l1_text __attribute__ ((l1_text)) +#define attribute_l1_text __attribute__((l1_text)) #define attribute_l1_data_b __attribute__((l1_data_B)) #else #define attribute_l1_text #define attribute_l1_data_b #endif -void ff_bfin_z_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text; -void ff_bfin_z_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text; - -void ff_bfin_put_pixels8uc (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_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 */ +#endif /* AVUTIL_BFIN_ATTRIBUTES_H */ diff --git a/libswscale/bfin/swscale_bfin.c b/libswscale/bfin/swscale_bfin.c index 43c23b4..97270b8 100644 --- a/libswscale/bfin/swscale_bfin.c +++ b/libswscale/bfin/swscale_bfin.c @@ -24,21 +24,18 @@ #include "config.h" #include "libavutil/attributes.h" +#include "libavutil/bfin/attributes.h" #include "libswscale/swscale_internal.h" -#if defined (__FDPIC__) && CONFIG_SRAM -#define L1CODE __attribute__((l1_text)) -#else -#define L1CODE -#endif - int ff_bfin_uyvytoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, - int lumStride, int chromStride, int srcStride) L1CODE; + int lumStride, int chromStride, + int srcStride) attribute_l1_text; int ff_bfin_yuyvtoyv12(const uint8_t *src, uint8_t *ydst, uint8_t *udst, uint8_t *vdst, int width, int height, - int lumStride, int chromStride, int srcStride) L1CODE; + int lumStride, int chromStride, + int srcStride) attribute_l1_text; static int uyvytoyv12_unscaled(SwsContext *c, const uint8_t *src[], int srcStride[], int srcSliceY, int srcSliceH, diff --git a/libswscale/bfin/yuv2rgb_bfin.c b/libswscale/bfin/yuv2rgb_bfin.c index 603a33a..295dc28 100644 --- a/libswscale/bfin/yuv2rgb_bfin.c +++ b/libswscale/bfin/yuv2rgb_bfin.c @@ -25,25 +25,20 @@ #include "config.h" #include "libavutil/attributes.h" +#include "libavutil/bfin/attributes.h" #include "libswscale/swscale_internal.h" -#if defined(__FDPIC__) && CONFIG_SRAM -#define L1CODE __attribute__((l1_text)) -#else -#define L1CODE -#endif - void ff_bfin_yuv2rgb555_line(const uint8_t *Y, const uint8_t *U, const uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; + int w, uint32_t *coeffs) attribute_l1_text; void ff_bfin_yuv2rgb565_line(const uint8_t *Y, const uint8_t *U, const uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; + int w, uint32_t *coeffs) attribute_l1_text; void ff_bfin_yuv2rgb24_line(const uint8_t *Y, const uint8_t *U, const uint8_t *V, uint8_t *out, - int w, uint32_t *coeffs) L1CODE; + int w, uint32_t *coeffs) attribute_l1_text; typedef void (*ltransform)(const uint8_t *Y, const uint8_t *U, const uint8_t *V, uint8_t *out, int w, uint32_t *coeffs); -- 1.8.3.2 _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel