TUT HEVC Encoder
Loading...
Searching...
No Matches
cu.h
Go to the documentation of this file.
1#ifndef CU_H_
2#define CU_H_
3/*****************************************************************************
4 * This file is part of Kvazaar HEVC encoder.
5 *
6 * Copyright (c) 2021, Tampere University, ITU/ISO/IEC, project contributors
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without modification,
10 * are permitted provided that the following conditions are met:
11 *
12 * * Redistributions of source code must retain the above copyright notice, this
13 * list of conditions and the following disclaimer.
14 *
15 * * Redistributions in binary form must reproduce the above copyright notice, this
16 * list of conditions and the following disclaimer in the documentation and/or
17 * other materials provided with the distribution.
18 *
19 * * Neither the name of the Tampere University or ITU/ISO/IEC nor the names of its
20 * contributors may be used to endorse or promote products derived from
21 * this software without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED AND ON
30 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 * INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN ANY WAY OUT OF THE USE OF THIS
33 ****************************************************************************/
34
41#include "global.h" // IWYU pragma: keep
42#include "image.h"
43#include "kvazaar.h"
44
45
46//Cu stuff
48// CONSTANTS
49
50typedef enum {
54 CU_PCM = 3,
55} cu_type_t;
56
67
68extern const uint8_t kvz_part_mode_num_parts[];
69extern const uint8_t kvz_part_mode_offsets[][4][2];
70extern const uint8_t kvz_part_mode_sizes[][4][2];
71
81#define PU_GET_X(part_mode, cu_width, cu_x, i) \
82 ((cu_x) + kvz_part_mode_offsets[(part_mode)][(i)][0] * (cu_width) / 4)
83
93#define PU_GET_Y(part_mode, cu_width, cu_y, i) \
94 ((cu_y) + kvz_part_mode_offsets[(part_mode)][(i)][1] * (cu_width) / 4)
95
104#define PU_GET_W(part_mode, cu_width, i) \
105 (kvz_part_mode_sizes[(part_mode)][(i)][0] * (cu_width) / 4)
106
115#define PU_GET_H(part_mode, cu_width, i) \
116 (kvz_part_mode_sizes[(part_mode)][(i)][1] * (cu_width) / 4)
117
119// TYPES
120
121typedef struct {
122 int x;
123 int y;
124} vector2d_t;
125
129typedef struct
130{
131 uint8_t type : 2;
132 uint8_t depth : 3;
133 uint8_t part_size : 3;
134 uint8_t tr_depth : 3;
135 uint8_t skipped : 1;
136 uint8_t merged : 1;
137 uint8_t merge_idx : 3;
138 uint8_t tr_skip : 1;
139
140 uint16_t cbf;
141
147 uint8_t qp;
148
149 union {
150 struct {
151 int8_t mode;
153#if KVZ_SEL_ENCRYPTION
154 int8_t mode_encry;
155#endif
156 } intra;
157 struct {
158 int16_t mv[2][2]; // \brief Motion vectors for L0 and L1
159 uint8_t mv_ref[2]; // \brief Index of the L0 and L1 array.
160 uint8_t mv_cand0 : 3; // \brief selected MV candidate
161 uint8_t mv_cand1 : 3; // \brief selected MV candidate
162 uint8_t mv_dir : 2; // \brief Probably describes if mv_ref is L0, L1 or both (bi-pred)
163 } inter;
164 };
165} cu_info_t;
166
167#define CU_GET_MV_CAND(cu_info_ptr, reflist) \
168 (((reflist) == 0) ? (cu_info_ptr)->inter.mv_cand0 : (cu_info_ptr)->inter.mv_cand1)
169
170#define CU_SET_MV_CAND(cu_info_ptr, reflist, value) \
171 do { \
172 if ((reflist) == 0) { \
173 (cu_info_ptr)->inter.mv_cand0 = (value); \
174 } else { \
175 (cu_info_ptr)->inter.mv_cand1 = (value); \
176 } \
177 } while (0)
178
179#define CHECKPOINT_CU(prefix_str, cu) CHECKPOINT(prefix_str " type=%d depth=%d part_size=%d tr_depth=%d coded=%d " \
180 "skipped=%d merged=%d merge_idx=%d cbf.y=%d cbf.u=%d cbf.v=%d " \
181 "intra[0].cost=%u intra[0].bitcost=%u intra[0].mode=%d intra[0].mode_chroma=%d intra[0].tr_skip=%d " \
182 "intra[1].cost=%u intra[1].bitcost=%u intra[1].mode=%d intra[1].mode_chroma=%d intra[1].tr_skip=%d " \
183 "intra[2].cost=%u intra[2].bitcost=%u intra[2].mode=%d intra[2].mode_chroma=%d intra[2].tr_skip=%d " \
184 "intra[3].cost=%u intra[3].bitcost=%u intra[3].mode=%d intra[3].mode_chroma=%d intra[3].tr_skip=%d " \
185 "inter.cost=%u inter.bitcost=%u inter.mv[0]=%d inter.mv[1]=%d inter.mvd[0]=%d inter.mvd[1]=%d " \
186 "inter.mv_cand=%d inter.mv_ref=%d inter.mv_dir=%d inter.mode=%d" \
187 , (cu).type, (cu).depth, (cu).part_size, (cu).tr_depth, (cu).coded, \
188 (cu).skipped, (cu).merged, (cu).merge_idx, (cu).cbf.y, (cu).cbf.u, (cu).cbf.v, \
189 (cu).intra[0].cost, (cu).intra[0].bitcost, (cu).intra[0].mode, (cu).intra[0].mode_chroma, (cu).intra[0].tr_skip, \
190 (cu).intra[1].cost, (cu).intra[1].bitcost, (cu).intra[1].mode, (cu).intra[1].mode_chroma, (cu).intra[1].tr_skip, \
191 (cu).intra[2].cost, (cu).intra[2].bitcost, (cu).intra[2].mode, (cu).intra[2].mode_chroma, (cu).intra[2].tr_skip, \
192 (cu).intra[3].cost, (cu).intra[3].bitcost, (cu).intra[3].mode, (cu).intra[3].mode_chroma, (cu).intra[3].tr_skip, \
193 (cu).inter.cost, (cu).inter.bitcost, (cu).inter.mv[0], (cu).inter.mv[1], (cu).inter.mvd[0], (cu).inter.mvd[1], \
194 (cu).inter.mv_cand, (cu).inter.mv_ref, (cu).inter.mv_dir, (cu).inter.mode)
195
196typedef struct cu_array_t {
197 struct cu_array_t *base;
199 int32_t width;
200 int32_t height;
201 int32_t stride;
202 int32_t refcount;
204
205cu_info_t* kvz_cu_array_at(cu_array_t *cua, unsigned x_px, unsigned y_px);
206const cu_info_t* kvz_cu_array_at_const(const cu_array_t *cua, unsigned x_px, unsigned y_px);
207
208cu_array_t * kvz_cu_array_alloc(const int width, const int height);
210 const unsigned x_offset,
211 const unsigned y_offset,
212 const unsigned width,
213 const unsigned height);
214void kvz_cu_array_free(cu_array_t **cua_ptr);
216
217
224#define SUB_SCU(xy) ((xy) & (LCU_WIDTH - 1))
225
226#define LCU_CU_WIDTH 16
227#define LCU_T_CU_WIDTH (LCU_CU_WIDTH + 1)
228#define LCU_CU_OFFSET (LCU_T_CU_WIDTH + 1)
229#define SCU_WIDTH (LCU_WIDTH / LCU_CU_WIDTH)
230
231// Width from top left of the LCU, so +1 for ref buffer size.
232#define LCU_REF_PX_WIDTH (LCU_WIDTH + LCU_WIDTH / 2)
233
244
297
298
338
339void kvz_cu_array_copy_from_lcu(cu_array_t* dst, int dst_x, int dst_y, const lcu_t *src);
340
344#define LCU_GET_TOP_RIGHT_CU(lcu) \
345 (&(lcu)->cu[LCU_T_CU_WIDTH * LCU_T_CU_WIDTH])
346
355#define LCU_GET_CU_AT_PX(lcu, x_px, y_px) \
356 (&(lcu)->cu[LCU_CU_OFFSET + ((x_px) >> 2) + ((y_px) >> 2) * LCU_T_CU_WIDTH])
357
358
366static INLINE void copy_coeffs(const coeff_t *__restrict src,
367 coeff_t *__restrict dest,
368 size_t width)
369{
370 memcpy(dest, src, width * width * sizeof(coeff_t));
371}
372
373
385static INLINE unsigned xy_to_zorder(unsigned width, unsigned x, unsigned y)
386{
387 assert(width % 4 == 0 && width >= 4 && width <= 64);
388 assert(x % 4 == 0 && x < width);
389 assert(y % 4 == 0 && y < width);
390
391 unsigned result = 0;
392
393 switch (width) {
394 case 64:
395 result += x / 32 * (32*32);
396 result += y / 32 * (64*32);
397 x %= 32;
398 y %= 32;
399 // fallthrough
400 case 32:
401 result += x / 16 * (16*16);
402 result += y / 16 * (32*16);
403 x %= 16;
404 y %= 16;
405 // fallthrough
406 case 16:
407 result += x / 8 * ( 8*8);
408 result += y / 8 * (16*8);
409 x %= 8;
410 y %= 8;
411 // fallthrough
412 case 8:
413 result += x / 4 * (4*4);
414 result += y / 4 * (8*4);
415 // fallthrough
416 case 4:
417 break;
418 }
419
420 return result;
421}
422
423
424#define CHECKPOINT_LCU(prefix_str, lcu) do { \
425 CHECKPOINT_CU(prefix_str " cu[0]", (lcu).cu[0]); \
426 CHECKPOINT_CU(prefix_str " cu[1]", (lcu).cu[1]); \
427 CHECKPOINT_CU(prefix_str " cu[2]", (lcu).cu[2]); \
428 CHECKPOINT_CU(prefix_str " cu[3]", (lcu).cu[3]); \
429 CHECKPOINT_CU(prefix_str " cu[4]", (lcu).cu[4]); \
430 CHECKPOINT_CU(prefix_str " cu[5]", (lcu).cu[5]); \
431 CHECKPOINT_CU(prefix_str " cu[6]", (lcu).cu[6]); \
432 CHECKPOINT_CU(prefix_str " cu[7]", (lcu).cu[7]); \
433 CHECKPOINT_CU(prefix_str " cu[8]", (lcu).cu[8]); \
434 CHECKPOINT_CU(prefix_str " cu[9]", (lcu).cu[9]); \
435 CHECKPOINT_CU(prefix_str " cu[10]", (lcu).cu[10]); \
436 CHECKPOINT_CU(prefix_str " cu[11]", (lcu).cu[11]); \
437 CHECKPOINT_CU(prefix_str " cu[12]", (lcu).cu[12]); \
438 CHECKPOINT_CU(prefix_str " cu[13]", (lcu).cu[13]); \
439 CHECKPOINT_CU(prefix_str " cu[14]", (lcu).cu[14]); \
440 CHECKPOINT_CU(prefix_str " cu[15]", (lcu).cu[15]); \
441 CHECKPOINT_CU(prefix_str " cu[16]", (lcu).cu[16]); \
442 CHECKPOINT_CU(prefix_str " cu[17]", (lcu).cu[17]); \
443 CHECKPOINT_CU(prefix_str " cu[18]", (lcu).cu[18]); \
444 CHECKPOINT_CU(prefix_str " cu[19]", (lcu).cu[19]); \
445 CHECKPOINT_CU(prefix_str " cu[20]", (lcu).cu[20]); \
446 CHECKPOINT_CU(prefix_str " cu[21]", (lcu).cu[21]); \
447 CHECKPOINT_CU(prefix_str " cu[22]", (lcu).cu[22]); \
448 CHECKPOINT_CU(prefix_str " cu[23]", (lcu).cu[23]); \
449 CHECKPOINT_CU(prefix_str " cu[24]", (lcu).cu[24]); \
450 CHECKPOINT_CU(prefix_str " cu[25]", (lcu).cu[25]); \
451 CHECKPOINT_CU(prefix_str " cu[26]", (lcu).cu[26]); \
452 CHECKPOINT_CU(prefix_str " cu[27]", (lcu).cu[27]); \
453 CHECKPOINT_CU(prefix_str " cu[28]", (lcu).cu[28]); \
454 CHECKPOINT_CU(prefix_str " cu[29]", (lcu).cu[29]); \
455 CHECKPOINT_CU(prefix_str " cu[30]", (lcu).cu[30]); \
456 CHECKPOINT_CU(prefix_str " cu[31]", (lcu).cu[31]); \
457 CHECKPOINT_CU(prefix_str " cu[32]", (lcu).cu[32]); \
458 CHECKPOINT_CU(prefix_str " cu[33]", (lcu).cu[33]); \
459 CHECKPOINT_CU(prefix_str " cu[34]", (lcu).cu[34]); \
460 CHECKPOINT_CU(prefix_str " cu[35]", (lcu).cu[35]); \
461 CHECKPOINT_CU(prefix_str " cu[36]", (lcu).cu[36]); \
462 CHECKPOINT_CU(prefix_str " cu[37]", (lcu).cu[37]); \
463 CHECKPOINT_CU(prefix_str " cu[38]", (lcu).cu[38]); \
464 CHECKPOINT_CU(prefix_str " cu[39]", (lcu).cu[39]); \
465 CHECKPOINT_CU(prefix_str " cu[40]", (lcu).cu[40]); \
466 CHECKPOINT_CU(prefix_str " cu[41]", (lcu).cu[41]); \
467 CHECKPOINT_CU(prefix_str " cu[42]", (lcu).cu[42]); \
468 CHECKPOINT_CU(prefix_str " cu[43]", (lcu).cu[43]); \
469 CHECKPOINT_CU(prefix_str " cu[44]", (lcu).cu[44]); \
470 CHECKPOINT_CU(prefix_str " cu[45]", (lcu).cu[45]); \
471 CHECKPOINT_CU(prefix_str " cu[46]", (lcu).cu[46]); \
472 CHECKPOINT_CU(prefix_str " cu[47]", (lcu).cu[47]); \
473 CHECKPOINT_CU(prefix_str " cu[48]", (lcu).cu[48]); \
474 CHECKPOINT_CU(prefix_str " cu[49]", (lcu).cu[49]); \
475 CHECKPOINT_CU(prefix_str " cu[50]", (lcu).cu[50]); \
476 CHECKPOINT_CU(prefix_str " cu[51]", (lcu).cu[51]); \
477 CHECKPOINT_CU(prefix_str " cu[52]", (lcu).cu[52]); \
478 CHECKPOINT_CU(prefix_str " cu[53]", (lcu).cu[53]); \
479 CHECKPOINT_CU(prefix_str " cu[54]", (lcu).cu[54]); \
480 CHECKPOINT_CU(prefix_str " cu[55]", (lcu).cu[55]); \
481 CHECKPOINT_CU(prefix_str " cu[56]", (lcu).cu[56]); \
482 CHECKPOINT_CU(prefix_str " cu[57]", (lcu).cu[57]); \
483 CHECKPOINT_CU(prefix_str " cu[58]", (lcu).cu[58]); \
484 CHECKPOINT_CU(prefix_str " cu[59]", (lcu).cu[59]); \
485 CHECKPOINT_CU(prefix_str " cu[60]", (lcu).cu[60]); \
486 CHECKPOINT_CU(prefix_str " cu[61]", (lcu).cu[61]); \
487 CHECKPOINT_CU(prefix_str " cu[62]", (lcu).cu[62]); \
488 CHECKPOINT_CU(prefix_str " cu[63]", (lcu).cu[63]); \
489 CHECKPOINT_CU(prefix_str " cu[64]", (lcu).cu[64]); \
490 CHECKPOINT_CU(prefix_str " cu[65]", (lcu).cu[65]); \
491 CHECKPOINT_CU(prefix_str " cu[66]", (lcu).cu[66]); \
492 CHECKPOINT_CU(prefix_str " cu[67]", (lcu).cu[67]); \
493 CHECKPOINT_CU(prefix_str " cu[68]", (lcu).cu[68]); \
494 CHECKPOINT_CU(prefix_str " cu[69]", (lcu).cu[69]); \
495 CHECKPOINT_CU(prefix_str " cu[70]", (lcu).cu[70]); \
496 CHECKPOINT_CU(prefix_str " cu[71]", (lcu).cu[71]); \
497 CHECKPOINT_CU(prefix_str " cu[72]", (lcu).cu[72]); \
498 CHECKPOINT_CU(prefix_str " cu[73]", (lcu).cu[73]); \
499 CHECKPOINT_CU(prefix_str " cu[74]", (lcu).cu[74]); \
500 CHECKPOINT_CU(prefix_str " cu[75]", (lcu).cu[75]); \
501 CHECKPOINT_CU(prefix_str " cu[76]", (lcu).cu[76]); \
502 CHECKPOINT_CU(prefix_str " cu[77]", (lcu).cu[77]); \
503 CHECKPOINT_CU(prefix_str " cu[78]", (lcu).cu[78]); \
504 CHECKPOINT_CU(prefix_str " cu[79]", (lcu).cu[79]); \
505 CHECKPOINT_CU(prefix_str " cu[80]", (lcu).cu[80]); \
506 CHECKPOINT_CU(prefix_str " cu[81]", (lcu).cu[81]); \
507} while(0)
508
509
510#define NUM_CBF_DEPTHS 5
511static const uint16_t cbf_masks[NUM_CBF_DEPTHS] = { 0x1f, 0x0f, 0x07, 0x03, 0x1 };
512
516static INLINE int cbf_is_set(uint16_t cbf, int depth, color_t plane)
517{
518 return (cbf & (cbf_masks[depth] << (NUM_CBF_DEPTHS * plane))) != 0;
519}
520
524static INLINE int cbf_is_set_any(uint16_t cbf, int depth)
525{
526 return cbf_is_set(cbf, depth, COLOR_Y) ||
527 cbf_is_set(cbf, depth, COLOR_U) ||
528 cbf_is_set(cbf, depth, COLOR_V);
529}
530
534static INLINE void cbf_set(uint16_t *cbf, int depth, color_t plane)
535{
536 // Return value of the bit corresponding to the level.
537 *cbf |= (0x10 >> depth) << (NUM_CBF_DEPTHS * plane);
538}
539
544static INLINE void cbf_set_conditionally(uint16_t *cbf, uint16_t child_cbfs[3], int depth, color_t plane)
545{
546 bool child_cbf_set = cbf_is_set(child_cbfs[0], depth + 1, plane) ||
547 cbf_is_set(child_cbfs[1], depth + 1, plane) ||
548 cbf_is_set(child_cbfs[2], depth + 1, plane);
549 if (child_cbf_set) {
550 cbf_set(cbf, depth, plane);
551 }
552}
553
557static INLINE void cbf_clear(uint16_t *cbf, int depth, color_t plane)
558{
559 *cbf &= ~(cbf_masks[depth] << (NUM_CBF_DEPTHS * plane));
560}
561
565static INLINE void cbf_copy(uint16_t *cbf, uint16_t src, color_t plane)
566{
567 cbf_clear(cbf, 0, plane);
568 *cbf |= src & (cbf_masks[0] << (NUM_CBF_DEPTHS * plane));
569}
570
571#define GET_SPLITDATA(CU,curDepth) ((CU)->depth > curDepth)
572#define SET_SPLITDATA(CU,flag) { (CU)->split=(flag); }
573
574#endif
const uint8_t kvz_part_mode_sizes[][4][2]
PU sizes.
Definition cu.c:81
struct cu_array_t cu_array_t
#define LCU_T_CU_WIDTH
Definition cu.h:227
#define NUM_CBF_DEPTHS
Definition cu.h:510
static void cbf_copy(uint16_t *cbf, uint16_t src, color_t plane)
Copy cbf flags.
Definition cu.h:565
cu_type_t
Definition cu.h:50
@ CU_INTRA
Definition cu.h:52
@ CU_INTER
Definition cu.h:53
@ CU_PCM
Definition cu.h:54
@ CU_NOTSET
Definition cu.h:51
cu_array_t * kvz_cu_array_alloc(const int width, const int height)
Allocate a CU array.
Definition cu.c:113
const cu_info_t * kvz_cu_array_at_const(const cu_array_t *cua, unsigned x_px, unsigned y_px)
Definition cu.c:99
static unsigned xy_to_zorder(unsigned width, unsigned x, unsigned y)
Convert (x, y) coordinates to z-order index.
Definition cu.h:385
cu_array_t * kvz_cu_array_copy_ref(cu_array_t *cua)
Get a new pointer to a cu array.
Definition cu.c:197
void kvz_cu_array_free(cu_array_t **cua_ptr)
Definition cu.c:167
static const uint16_t cbf_masks[5]
Definition cu.h:511
static int cbf_is_set_any(uint16_t cbf, int depth)
Check if CBF in a given level >= depth is true.
Definition cu.h:524
static void cbf_set(uint16_t *cbf, int depth, color_t plane)
Set CBF in a level to true.
Definition cu.h:534
static void cbf_set_conditionally(uint16_t *cbf, uint16_t child_cbfs[3], int depth, color_t plane)
Set CBF in a level to true if it is set at a lower level in any of the child_cbfs.
Definition cu.h:544
const uint8_t kvz_part_mode_offsets[][4][2]
PU offsets.
Definition cu.c:63
void kvz_cu_array_copy_from_lcu(cu_array_t *dst, int dst_x, int dst_y, const lcu_t *src)
Copy an lcu to a cu array.
Definition cu.c:217
#define LCU_REF_PX_WIDTH
Definition cu.h:232
lcu_coeff_t
Definition cu.h:296
static void copy_coeffs(const coeff_t *__restrict src, coeff_t *__restrict dest, size_t width)
Copy a part of a coeff_t array to another.
Definition cu.h:366
static void cbf_clear(uint16_t *cbf, int depth, color_t plane)
Set CBF in a levels <= depth to false.
Definition cu.h:557
const uint8_t kvz_part_mode_num_parts[]
Number of PUs in a CU.
Definition cu.c:45
part_mode_t
Definition cu.h:57
@ SIZE_2NxN
Definition cu.h:59
@ SIZE_Nx2N
Definition cu.h:60
@ SIZE_2NxnD
Definition cu.h:63
@ SIZE_nLx2N
Definition cu.h:64
@ SIZE_nRx2N
Definition cu.h:65
@ SIZE_2NxnU
Definition cu.h:62
@ SIZE_2Nx2N
Definition cu.h:58
@ SIZE_NxN
Definition cu.h:61
cu_array_t * kvz_cu_subarray(cu_array_t *base, const unsigned x_offset, const unsigned y_offset, const unsigned width, const unsigned height)
Definition cu.c:133
static int cbf_is_set(uint16_t cbf, int depth, color_t plane)
Check if CBF in a given level >= depth is true.
Definition cu.h:516
cu_info_t * kvz_cu_array_at(cu_array_t *cua, unsigned x_px, unsigned y_px)
Definition cu.c:93
Header that is included in every other header.
color_t
Definition global.h:309
@ COLOR_V
Definition global.h:309
@ COLOR_Y
Definition global.h:309
@ COLOR_U
Definition global.h:309
#define INLINE
Definition global.h:240
#define LCU_LUMA_SIZE
Definition global.h:168
#define ALIGNED(alignment)
Definition global.h:251
#define LCU_CHROMA_SIZE
Definition global.h:169
int16_t coeff_t
Definition global.h:115
A reference counted YUV pixel buffer.
This file defines the public API of Kvazaar when used as a library.
uint8_t kvz_pixel
Definition kvazaar.h:95
Definition cu.h:196
cu_info_t * data
cu array
Definition cu.h:198
int32_t width
width of the array in pixels
Definition cu.h:199
int32_t height
height of the array in pixels
Definition cu.h:200
struct cu_array_t * base
base cu array or NULL
Definition cu.h:197
int32_t refcount
number of references to this cu_array
Definition cu.h:202
int32_t stride
stride of the array in pixels
Definition cu.h:201
Struct for CU info.
Definition cu.h:130
uint16_t cbf
Definition cu.h:140
uint8_t merge_idx
merge index
Definition cu.h:137
uint8_t part_size
partition mode, one of part_mode_t values
Definition cu.h:133
uint8_t qp
QP used for the CU.
Definition cu.h:147
uint8_t tr_skip
transform skip flag
Definition cu.h:138
uint8_t tr_depth
transform depth
Definition cu.h:134
uint8_t mv_cand0
Definition cu.h:160
uint8_t type
block type, one of cu_type_t values
Definition cu.h:131
int8_t mode
Definition cu.h:151
uint8_t mv_dir
Definition cu.h:162
uint8_t mv_cand1
Definition cu.h:161
uint8_t depth
depth / size of this block
Definition cu.h:132
int8_t mode_chroma
Definition cu.h:152
uint8_t skipped
flag to indicate this block is skipped
Definition cu.h:135
uint8_t merged
flag to indicate this block is merged
Definition cu.h:136
Top and left intra reference pixels for LCU.
Definition cu.h:239
Definition cu.h:299
lcu_ref_px_t left_ref
Reference pixels from adjacent LCUs.
Definition cu.h:301
lcu_coeff_t coeff
We get the coefficients as a byproduct of doing reconstruction during the search.
Definition cu.h:309
lcu_yuv_t rec
LCU reconstructed pixels.
Definition cu.h:303
lcu_ref_px_t top_ref
Reference pixels from adjacent LCUs.
Definition cu.h:300
lcu_yuv_t ref
LCU reference pixels.
Definition cu.h:302
Definition image.h:47
Definition cu.h:121
int y
Definition cu.h:123
int x
Definition cu.h:122