• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3  *
4  *  Use of this source code is governed by a BSD-style license
5  *  that can be found in the LICENSE file in the root of the source
6  *  tree. An additional intellectual property rights grant can be found
7  *  in the file PATENTS.  All contributing project authors may
8  *  be found in the AUTHORS file in the root of the source tree.
9  */
10 
11 
12 #include "vpx_ports/config.h"
13 #include "vpx_ports/arm.h"
14 #include "vp8/common/blockd.h"
15 #include "vp8/common/pragmas.h"
16 #include "vp8/common/postproc.h"
17 #include "vp8/decoder/dequantize.h"
18 #include "vp8/decoder/onyxd_int.h"
19 
vp8_arch_arm_decode_init(VP8D_COMP * pbi)20 void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
21 {
22 #if CONFIG_RUNTIME_CPU_DETECT
23     int flags = pbi->common.rtcd.flags;
24     int has_edsp = flags & HAS_EDSP;
25     int has_media = flags & HAS_MEDIA;
26     int has_neon = flags & HAS_NEON;
27 
28 #if HAVE_ARMV6
29     if (has_media)
30     {
31         pbi->dequant.block               = vp8_dequantize_b_v6;
32         pbi->dequant.idct_add            = vp8_dequant_idct_add_v6;
33         pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_v6;
34         pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_v6;
35         pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_v6;
36         pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_v6;
37     }
38 #endif
39 
40 #if HAVE_ARMV7
41     if (has_neon)
42     {
43         pbi->dequant.block               = vp8_dequantize_b_neon;
44         pbi->dequant.idct_add            = vp8_dequant_idct_add_neon;
45         /*This is not used: NEON always dequants two blocks at once.
46         pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_neon;*/
47         pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_neon;
48         pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_neon;
49         pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_neon;
50     }
51 #endif
52 #endif
53 }
54