]> granicus.if.org Git - libvpx/blob - vp8/decoder/generic/dsystemdependent.c
safety check to avoid divide by 0s
[libvpx] / vp8 / decoder / generic / dsystemdependent.c
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 "dequantize.h"
14 #include "onyxd_int.h"
15
16 extern void vp8_arch_x86_decode_init(VP8D_COMP *pbi);
17
18 void vp8_dmachine_specific_config(VP8D_COMP *pbi)
19 {
20     // Pure C:
21 #if CONFIG_RUNTIME_CPU_DETECT
22     pbi->mb.rtcd                     = &pbi->common.rtcd;
23     pbi->dequant.block               = vp8_dequantize_b_c;
24     pbi->dequant.idct_add            = vp8_dequant_idct_add_c;
25     pbi->dequant.dc_idct_add         = vp8_dequant_dc_idct_add_c;
26     pbi->dequant.dc_idct_add_y_block = vp8_dequant_dc_idct_add_y_block_c;
27     pbi->dequant.idct_add_y_block    = vp8_dequant_idct_add_y_block_c;
28     pbi->dequant.idct_add_uv_block   = vp8_dequant_idct_add_uv_block_c;
29     pbi->dboolhuff.start             = vp8dx_start_decode_c;
30     pbi->dboolhuff.fill              = vp8dx_bool_decoder_fill_c;
31 #if 0 //For use with RTCD, when implemented
32     pbi->dboolhuff.debool = vp8dx_decode_bool_c;
33     pbi->dboolhuff.devalue = vp8dx_decode_value_c;
34 #endif
35 #endif
36
37 #if ARCH_X86 || ARCH_X86_64
38     vp8_arch_x86_decode_init(pbi);
39 #endif
40 }