1 #ifndef ENCODE_CODING_TREE_H_
2 #define ENCODE_CODING_TREE_H_
3 
4 /*****************************************************************************
5  * This file is part of Kvazaar HEVC encoder.
6  *
7  * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors
8  * All rights reserved.
9  *
10  * Redistribution and use in source and binary forms, with or without modification,
11  * are permitted provided that the following conditions are met:
12  *
13  * * Redistributions of source code must retain the above copyright notice, this
14  *   list of conditions and the following disclaimer.
15  *
16  * * Redistributions in binary form must reproduce the above copyright notice, this
17  *   list of conditions and the following disclaimer in the documentation and/or
18  *   other materials provided with the distribution.
19  *
20  * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its
21  *   contributors may be used to endorse or promote products derived from
22  *   this software without specific prior written permission.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
25  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
28  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29  * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
31  * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33  * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
34  ****************************************************************************/
35 
36 /**
37  * \file
38  * Functions for writing the coding quadtree and related syntax.
39  */
40 
41 #include "encoderstate.h"
42 #include "global.h"
43 
44 void kvz_encode_coding_tree(encoder_state_t * const state,
45                             uint16_t x_ctb,
46                             uint16_t y_ctb,
47                             uint8_t depth);
48 
49 void kvz_encode_mvd(encoder_state_t * const state,
50                     cabac_data_t *cabac,
51                     int32_t mvd_hor,
52                     int32_t mvd_ver);
53 
54 void kvz_encode_last_significant_xy(cabac_data_t * const cabac,
55                                     uint8_t lastpos_x, uint8_t lastpos_y,
56                                     uint8_t width, uint8_t height,
57                                     uint8_t type, uint8_t scan);
58 
59 #endif // ENCODE_CODING_TREE_H_
60