Home | History | Annotate | Download | only in arm
      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 "blockd.h"
     15 #include "pragmas.h"
     16 #include "postproc.h"
     17 #include "dboolhuff.h"
     18 #include "dequantize.h"
     19 #include "onyxd_int.h"
     20 
     21 void vp8_arch_arm_decode_init(VP8D_COMP *pbi)
     22 {
     23 #if CONFIG_RUNTIME_CPU_DETECT
     24     int flags = pbi->common.rtcd.flags;
     25     int has_edsp = flags & HAS_EDSP;
     26     int has_media = flags & HAS_MEDIA;
     27     int has_neon = flags & HAS_NEON;
     28 
     29 #if HAVE_ARMV6
     30     if (has_media)
     31     {
     32         pbi->dequant.block               = vp8_dequantize_b_v6;
     33         pbi->dequant.idct_add            = vp8_dequant_idct_add_v6;
     34         pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_v6;
     35         pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_v6;
     36         pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_v6;
     37         pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_v6;
     38 #if 0 /*For use with RTCD, when implemented*/
     39         pbi->dboolhuff.start             = vp8dx_start_decode_c;
     40         pbi->dboolhuff.fill              = vp8dx_bool_decoder_fill_c;
     41         pbi->dboolhuff.debool            = vp8dx_decode_bool_c;
     42         pbi->dboolhuff.devalue           = vp8dx_decode_value_c;
     43 #endif
     44     }
     45 #endif
     46 
     47 #if HAVE_ARMV7
     48     if (has_neon)
     49     {
     50         pbi->dequant.block               = vp8_dequantize_b_neon;
     51         pbi->dequant.idct_add            = vp8_dequant_idct_add_neon;
     52         /*This is not used: NEON always dequants two blocks at once.
     53         pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_neon;*/
     54         pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_neon;
     55         pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_neon;
     56         pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_neon;
     57 #if 0 /*For use with RTCD, when implemented*/
     58         pbi->dboolhuff.start             = vp8dx_start_decode_c;
     59         pbi->dboolhuff.fill              = vp8dx_bool_decoder_fill_c;
     60         pbi->dboolhuff.debool            = vp8dx_decode_bool_c;
     61         pbi->dboolhuff.devalue           = vp8dx_decode_value_c;
     62 #endif
     63     }
     64 #endif
     65 #endif
     66 }
     67