xref: /aosp_15_r20/external/libvpx/vp9/encoder/vp9_encodemb.h (revision fb1b10ab9aebc7c7068eedab379b749d7e3900be)
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 VPX_VP9_ENCODER_VP9_ENCODEMB_H_
12 #define VPX_VP9_ENCODER_VP9_ENCODEMB_H_
13 
14 #include "./vpx_config.h"
15 #include "vp9/encoder/vp9_block.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 struct encode_b_args {
22   MACROBLOCK *x;
23   int enable_trellis_opt;
24   double trellis_opt_thresh;
25   int *sse_calc_done;
26   int64_t *sse;
27   ENTROPY_CONTEXT *ta;
28   ENTROPY_CONTEXT *tl;
29   int8_t *skip;
30 #if CONFIG_MISMATCH_DEBUG
31   int mi_row;
32   int mi_col;
33   int output_enabled;
34 #endif
35 };
36 int vp9_optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size,
37                    int ctx);
38 void vp9_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize, int mi_row, int mi_col,
39                    int output_enabled);
40 void vp9_encode_sby_pass1(MACROBLOCK *x, BLOCK_SIZE bsize);
41 void vp9_xform_quant_fp(MACROBLOCK *x, int plane, int block, int row, int col,
42                         BLOCK_SIZE plane_bsize, TX_SIZE tx_size);
43 void vp9_xform_quant_dc(MACROBLOCK *x, int plane, int block, int row, int col,
44                         BLOCK_SIZE plane_bsize, TX_SIZE tx_size);
45 void vp9_xform_quant(MACROBLOCK *x, int plane, int block, int row, int col,
46                      BLOCK_SIZE plane_bsize, TX_SIZE tx_size);
47 
48 void vp9_subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane);
49 
50 void vp9_encode_block_intra(int plane, int block, int row, int col,
51                             BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg);
52 
53 void vp9_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane,
54                                   int enable_trellis_opt);
55 
56 #ifdef __cplusplus
57 }  // extern "C"
58 #endif
59 
60 #endif  // VPX_VP9_ENCODER_VP9_ENCODEMB_H_
61