diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-08-08 21:47:20 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-09-22 09:47:52 +0200 |
commit | eea9857bfd6925d0c34382c00b971ee6df12ad44 (patch) | |
tree | 3c0ecc889c05a71709aca367a51ca4b75d8aa277 | |
parent | 340f12f71207513672b5165d810cb6c8622c6b21 (diff) | |
download | ffmpeg-eea9857bfd6925d0c34382c00b971ee6df12ad44.tar.gz |
blockdsp: drop the high_bit_depth parameter
It has no effect, since the code is supposed to operate the same way for
any bit depth.
-rw-r--r-- | libavcodec/arm/blockdsp_arm.h | 2 | ||||
-rw-r--r-- | libavcodec/arm/blockdsp_init_arm.c | 4 | ||||
-rw-r--r-- | libavcodec/arm/blockdsp_init_neon.c | 8 | ||||
-rw-r--r-- | libavcodec/blockdsp.c | 10 | ||||
-rw-r--r-- | libavcodec/blockdsp.h | 8 | ||||
-rw-r--r-- | libavcodec/ppc/blockdsp.c | 25 | ||||
-rw-r--r-- | libavcodec/x86/blockdsp.c | 20 |
7 files changed, 34 insertions, 43 deletions
diff --git a/libavcodec/arm/blockdsp_arm.h b/libavcodec/arm/blockdsp_arm.h index 6d9c2c3ed2..d26630e102 100644 --- a/libavcodec/arm/blockdsp_arm.h +++ b/libavcodec/arm/blockdsp_arm.h @@ -21,6 +21,6 @@ #include "libavcodec/blockdsp.h" -void ff_blockdsp_init_neon(BlockDSPContext *c, unsigned high_bit_depth); +void ff_blockdsp_init_neon(BlockDSPContext *c); #endif /* AVCODEC_ARM_BLOCKDSP_ARM_H */ diff --git a/libavcodec/arm/blockdsp_init_arm.c b/libavcodec/arm/blockdsp_init_arm.c index a0c03674d7..a5db201705 100644 --- a/libavcodec/arm/blockdsp_init_arm.c +++ b/libavcodec/arm/blockdsp_init_arm.c @@ -24,10 +24,10 @@ #include "libavcodec/blockdsp.h" #include "blockdsp_arm.h" -av_cold void ff_blockdsp_init_arm(BlockDSPContext *c, unsigned high_bit_depth) +av_cold void ff_blockdsp_init_arm(BlockDSPContext *c) { int cpu_flags = av_get_cpu_flags(); if (have_neon(cpu_flags)) - ff_blockdsp_init_neon(c, high_bit_depth); + ff_blockdsp_init_neon(c); } diff --git a/libavcodec/arm/blockdsp_init_neon.c b/libavcodec/arm/blockdsp_init_neon.c index 5081cf0cdf..e2857508f2 100644 --- a/libavcodec/arm/blockdsp_init_neon.c +++ b/libavcodec/arm/blockdsp_init_neon.c @@ -28,10 +28,8 @@ void ff_clear_block_neon(int16_t *block); void ff_clear_blocks_neon(int16_t *blocks); -av_cold void ff_blockdsp_init_neon(BlockDSPContext *c, unsigned high_bit_depth) +av_cold void ff_blockdsp_init_neon(BlockDSPContext *c) { - if (!high_bit_depth) { - c->clear_block = ff_clear_block_neon; - c->clear_blocks = ff_clear_blocks_neon; - } + c->clear_block = ff_clear_block_neon; + c->clear_blocks = ff_clear_blocks_neon; } diff --git a/libavcodec/blockdsp.c b/libavcodec/blockdsp.c index e3d2ca1fdc..a35df8c7b1 100644 --- a/libavcodec/blockdsp.c +++ b/libavcodec/blockdsp.c @@ -57,8 +57,6 @@ static void fill_block8_c(uint8_t *block, uint8_t value, int line_size, int h) av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx) { - const unsigned high_bit_depth = avctx->bits_per_raw_sample > 8; - c->clear_block = clear_block_8_c; c->clear_blocks = clear_blocks_8_c; @@ -66,13 +64,13 @@ av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx) c->fill_block_tab[1] = fill_block8_c; if (ARCH_ARM) - ff_blockdsp_init_arm(c, high_bit_depth); + ff_blockdsp_init_arm(c); if (ARCH_PPC) - ff_blockdsp_init_ppc(c, high_bit_depth); + ff_blockdsp_init_ppc(c); if (ARCH_X86) #if FF_API_XVMC - ff_blockdsp_init_x86(c, high_bit_depth, avctx); + ff_blockdsp_init_x86(c, avctx); #else - ff_blockdsp_init_x86(c, high_bit_depth); + ff_blockdsp_init_x86(c); #endif /* FF_API_XVMC */ } diff --git a/libavcodec/blockdsp.h b/libavcodec/blockdsp.h index 32c671cf5a..5b5639f5a6 100644 --- a/libavcodec/blockdsp.h +++ b/libavcodec/blockdsp.h @@ -40,13 +40,13 @@ typedef struct BlockDSPContext { void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx); -void ff_blockdsp_init_arm(BlockDSPContext *c, unsigned high_bit_depth); -void ff_blockdsp_init_ppc(BlockDSPContext *c, unsigned high_bit_depth); +void ff_blockdsp_init_arm(BlockDSPContext *c); +void ff_blockdsp_init_ppc(BlockDSPContext *c); #if FF_API_XVMC -void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth, +void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx); #else -void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth); +void ff_blockdsp_init_x86(BlockDSPContext *c); #endif /* FF_API_XVMC */ #endif /* AVCODEC_BLOCKDSP_H */ diff --git a/libavcodec/ppc/blockdsp.c b/libavcodec/ppc/blockdsp.c index 679bc0454f..d2c1d0e766 100644 --- a/libavcodec/ppc/blockdsp.c +++ b/libavcodec/ppc/blockdsp.c @@ -143,27 +143,24 @@ static void clear_block_altivec(int16_t *block) } #endif /* HAVE_ALTIVEC */ -av_cold void ff_blockdsp_init_ppc(BlockDSPContext *c, unsigned high_bit_depth) +av_cold void ff_blockdsp_init_ppc(BlockDSPContext *c) { // common optimizations whether AltiVec is available or not - if (!high_bit_depth) { - switch (check_dcbzl_effect()) { - case 32: - c->clear_blocks = clear_blocks_dcbz32_ppc; - break; - case 128: - c->clear_blocks = clear_blocks_dcbz128_ppc; - break; - default: - break; - } + switch (check_dcbzl_effect()) { + case 32: + c->clear_blocks = clear_blocks_dcbz32_ppc; + break; + case 128: + c->clear_blocks = clear_blocks_dcbz128_ppc; + break; + default: + break; } #if HAVE_ALTIVEC if (!PPC_ALTIVEC(av_get_cpu_flags())) return; - if (!high_bit_depth) - c->clear_block = clear_block_altivec; + c->clear_block = clear_block_altivec; #endif /* HAVE_ALTIVEC */ } diff --git a/libavcodec/x86/blockdsp.c b/libavcodec/x86/blockdsp.c index f14bb1f9ad..9bb5185b89 100644 --- a/libavcodec/x86/blockdsp.c +++ b/libavcodec/x86/blockdsp.c @@ -88,20 +88,19 @@ static void clear_blocks_sse(int16_t *blocks) #endif /* HAVE_INLINE_ASM */ #if FF_API_XVMC -av_cold void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth, +av_cold void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx) #else -av_cold void ff_blockdsp_init_x86(BlockDSPContext *c, unsigned high_bit_depth) +av_cold void ff_blockdsp_init_x86(BlockDSPContext *c) #endif /* FF_API_XVMC */ { #if HAVE_INLINE_ASM int cpu_flags = av_get_cpu_flags(); - if (!high_bit_depth) { - if (INLINE_MMX(cpu_flags)) { - c->clear_block = clear_block_mmx; - c->clear_blocks = clear_blocks_mmx; - } + if (INLINE_MMX(cpu_flags)) { + c->clear_block = clear_block_mmx; + c->clear_blocks = clear_blocks_mmx; + } #if FF_API_XVMC FF_DISABLE_DEPRECATION_WARNINGS @@ -111,10 +110,9 @@ FF_DISABLE_DEPRECATION_WARNINGS FF_ENABLE_DEPRECATION_WARNINGS #endif /* FF_API_XVMC */ - if (INLINE_SSE(cpu_flags)) { - c->clear_block = clear_block_sse; - c->clear_blocks = clear_blocks_sse; - } + if (INLINE_SSE(cpu_flags)) { + c->clear_block = clear_block_sse; + c->clear_blocks = clear_blocks_sse; } #endif /* HAVE_INLINE_ASM */ } |