Home | History | Annotate | Download | only in hwdefs
      1 /*
      2  * Copyright (c) 2011 Intel Corporation. All Rights Reserved.
      3  * Copyright (c) Imagination Technologies Limited, UK
      4  *
      5  * Permission is hereby granted, free of charge, to any person obtaining a
      6  * copy of this software and associated documentation files (the
      7  * "Software"), to deal in the Software without restriction, including
      8  * without limitation the rights to use, copy, modify, merge, publish,
      9  * distribute, sub license, and/or sell copies of the Software, and to
     10  * permit persons to whom the Software is furnished to do so, subject to
     11  * the following conditions:
     12  *
     13  * The above copyright notice and this permission notice (including the
     14  * next paragraph) shall be included in all copies or substantial portions
     15  * of the Software.
     16  *
     17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
     18  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     19  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
     20  * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
     21  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
     22  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
     23  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     24  */
     25 
     26 
     27 #define F_MASK(basename)  (MASK_##basename)
     28 #define F_SHIFT(basename) (SHIFT_##basename)
     29 
     30 #define F_ENCODE(val,basename)  (((val)<<(F_SHIFT(basename)))&(F_MASK(basename)))
     31 #define F_ENCODE_MVEA(val,basename)  (((val)<<(F_SHIFT_MVEA(basename)))&(F_MASK_MVEA(basename)))
     32 
     33 #define MVEA_LRB_SEARCH_HEIGHT 112
     34 #define MVEA_LRB_SEARCH_WIDTH  144
     35 #define MVEA_LRB_TOP_OFFSET    (((MVEA_LRB_SEARCH_HEIGHT/2)/16)*16)
     36 
     37 
     38 #define F_MASK_MVEA(basename)  (MASK_MVEA_##basename)   /*      MVEA    */
     39 #define F_SHIFT_MVEA(basename) (SHIFT_MVEA_##basename)   /*     MVEA    */
     40 
     41 
     42 #define MASK_MVEA_CR_IPE_GRID_FINE_SEARCH 0x00000C00
     43 #define SHIFT_MVEA_CR_IPE_GRID_FINE_SEARCH 10
     44 #define REGNUM_MVEA_CR_IPE_GRID_FINE_SEARCH 0x0200
     45 
     46 
     47 #define MASK_MVEA_CR_IPE_GRID_SEARCH_SIZE 0x00000380
     48 #define SHIFT_MVEA_CR_IPE_GRID_SEARCH_SIZE 7
     49 #define REGNUM_MVEA_CR_IPE_GRID_SEARCH_SIZE 0x0200
     50 
     51 
     52 #define MVEA_CR_IPE_CONTROL         0x0200
     53 #define MASK_MVEA_CR_IPE_BLOCKSIZE  0x00000003
     54 #define SHIFT_MVEA_CR_IPE_BLOCKSIZE 0
     55 #define REGNUM_MVEA_CR_IPE_BLOCKSIZE 0x0200
     56 
     57 
     58 
     59 #define MASK_MVEA_CR_IPE_ENCODING_FORMAT 0x00003000
     60 #define SHIFT_MVEA_CR_IPE_ENCODING_FORMAT 12
     61 #define REGNUM_MVEA_CR_IPE_ENCODING_FORMAT 0x0200
     62 
     63 
     64 #define MASK_MVEA_CR_IPE_Y_CANDIDATE_NUM 0x0000003C
     65 #define SHIFT_MVEA_CR_IPE_Y_CANDIDATE_NUM 2
     66 #define REGNUM_MVEA_CR_IPE_Y_CANDIDATE_NUM 0x0200
     67 
     68 
     69 #define MASK_MVEA_CR_IPE_Y_FINE_SEARCH 0x00000040
     70 #define SHIFT_MVEA_CR_IPE_Y_FINE_SEARCH 6
     71 #define REGNUM_MVEA_CR_IPE_Y_FINE_SEARCH 0x0200
     72 
     73 #define MASK_MVEA_CR_JMCOMP_AC_ENABLE 0x00008000
     74 #define SHIFT_MVEA_CR_JMCOMP_AC_ENABLE 15
     75 #define REGNUM_MVEA_CR_JMCOMP_AC_ENABLE 0x0280
     76 
     77 
     78 #define MB_START_OF_SLICE                       (1<<5)
     79 #define MB_END_OF_SLICE                         (1<<4)
     80 #define MB_END_OF_PICTURE                       (1<<6)
     81 #define MB_END_OF_ROW                           (1<<7)
     82 #define PARAMS_ABOVEL_VALID                     (1<<0)
     83 #define PARAMS_ABOVE_VALID                      (1<<1)
     84 #define PARAMS_ABOVER_VALID                     (1<<2)
     85 #define PARAMS_LEFT_VALID                       (1<<3)
     86 #define VECTORS_ABOVE_LEFT_VALID        (1<<0)
     87 #define VECTORS_ABOVE_VALID                     (1<<1)
     88 #define VECTORS_LEFT_VALID                      (1<<2)
     89 #define VECTORS_BELOW_VALID                     (1<<4)
     90 #define VECTORS_2BELOW_VALID            (1<<5)
     91 #define DO_INTRA_PRED                           (1<<6)
     92 
     93 #define VECTORS_ABOVE_LEFT_VALID        (1<<0)
     94 
     95 #define MVEA_CR_JMCOMP_CONTROL      0x0280
     96 #define MASK_MVEA_CR_JMCOMP_MODE    0x00000003
     97 #define SHIFT_MVEA_CR_JMCOMP_MODE   0
     98 #define REGNUM_MVEA_CR_JMCOMP_MODE  0x0280
     99 
    100 #define MASK_TOPAZ_VLC_CR_CODEC     0x00000003
    101 #define SHIFT_TOPAZ_VLC_CR_CODEC    0
    102 
    103 #define MASK_TOPAZ_VLC_CR_SLICE_CODING_TYPE 0x0000000C
    104 #define SHIFT_TOPAZ_VLC_CR_SLICE_CODING_TYPE 2
    105 
    106 #define MVEA_CR_SPE_ZERO_THRESH     0x0370
    107 
    108 #define MVEA_CR_IPE_LAMBDA_TABLE    0x01F0
    109 #define MASK_MVEA_CR_IPE_QPC_OR_DC_SCALE_LUMA_TABLE 0x000000FF
    110 #define SHIFT_MVEA_CR_IPE_QPC_OR_DC_SCALE_LUMA_TABLE 0
    111 
    112 #define MVEA_CR_IPE_MV_BIAS_TABLE   0x01F4
    113 
    114 #define MVEA_CR_SPE_PRED_VECTOR_BIAS_TABLE 0x037C
    115 
    116 #define MVEA_CR_SPE_INTRA16_BIAS_TABLE 0x0374
    117 
    118 #define MVEA_CR_SPE_INTER_BIAS_TABLE 0x0378
    119 
    120 #define MASK_MVEA_CR_IPE_ALPHA_OR_DC_SCALE_CHR_TABLE 0x0000FF00
    121 #define SHIFT_MVEA_CR_IPE_ALPHA_OR_DC_SCALE_CHR_TABLE 8
    122 
    123 
    124 
    125 
    126