Home | History | Annotate | Download | only in encoder
      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 #ifndef VP9_ENCODER_VP9_ENCODEMB_H_
     12 #define VP9_ENCODER_VP9_ENCODEMB_H_
     13 
     14 #include "./vpx_config.h"
     15 #include "vp9/encoder/vp9_block.h"
     16 #include "vp9/encoder/vp9_onyx_int.h"
     17 #include "vp9/common/vp9_onyxc_int.h"
     18 
     19 typedef enum {
     20   RD_DC_PRED = DC_PRED,
     21   RD_V_PRED =  V_PRED,
     22   RD_H_PRED = H_PRED,
     23   RD_D45_PRED = D45_PRED,
     24   RD_D135_PRED = D135_PRED,
     25   RD_D117_PRED = D117_PRED,
     26   RD_D153_PRED = D153_PRED,
     27   RD_D207_PRED = D207_PRED,
     28   RD_D63_PRED = D63_PRED,
     29   RD_TM_PRED = TM_PRED,
     30   RD_NEARESTMV = NEARESTMV,
     31   RD_NEARMV = NEARMV,
     32   RD_ZEROMV = ZEROMV,
     33   RD_NEWMV = NEWMV,
     34   RD_I4X4_PRED,
     35   RD_SPLITMV,
     36   RD_MODE_COUNT
     37 } RD_PREDICTION_MODE;
     38 
     39 typedef struct {
     40   RD_PREDICTION_MODE mode;
     41   MV_REFERENCE_FRAME ref_frame;
     42   MV_REFERENCE_FRAME second_ref_frame;
     43 } MODE_DEFINITION;
     44 
     45 struct optimize_ctx {
     46   ENTROPY_CONTEXT ta[MAX_MB_PLANE][16];
     47   ENTROPY_CONTEXT tl[MAX_MB_PLANE][16];
     48 };
     49 
     50 struct encode_b_args {
     51   MACROBLOCK *x;
     52   struct optimize_ctx *ctx;
     53 };
     54 
     55 void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize);
     56 void vp9_encode_sby(MACROBLOCK *x, BLOCK_SIZE bsize);
     57 
     58 void vp9_xform_quant(int plane, int block, BLOCK_SIZE plane_bsize,
     59                      TX_SIZE tx_size, void *arg);
     60 
     61 void vp9_subtract_sby(MACROBLOCK *x, BLOCK_SIZE bsize);
     62 void vp9_subtract_sbuv(MACROBLOCK *x, BLOCK_SIZE bsize);
     63 void vp9_subtract_sb(MACROBLOCK *x, BLOCK_SIZE bsize);
     64 
     65 void vp9_encode_intra_block_y(MACROBLOCK *x, BLOCK_SIZE bsize);
     66 void vp9_encode_intra_block_uv(MACROBLOCK *x, BLOCK_SIZE bsize);
     67 
     68 
     69 #endif  // VP9_ENCODER_VP9_ENCODEMB_H_
     70