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.
pull/244/merge
Anton Khirnov 8 years ago
parent 340f12f712
commit eea9857bfd
  1. 2
      libavcodec/arm/blockdsp_arm.h
  2. 4
      libavcodec/arm/blockdsp_init_arm.c
  3. 8
      libavcodec/arm/blockdsp_init_neon.c
  4. 10
      libavcodec/blockdsp.c
  5. 8
      libavcodec/blockdsp.h
  6. 25
      libavcodec/ppc/blockdsp.c
  7. 20
      libavcodec/x86/blockdsp.c

@ -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 */

@ -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);
}

@ -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;
}

@ -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 */
}

@ -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 */

@ -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 */
}

@ -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 */
}

Loading…
Cancel
Save