Inline cu_info_intra and cu_info_inter into cu_info_t.

This commit is contained in:
Ari Koivula 2015-03-04 13:33:38 +02:00
parent a0767a76d2
commit e5b18cd536
2 changed files with 16 additions and 28 deletions

View file

@ -42,31 +42,6 @@ typedef struct {
int y;
} vector2d_t;
/**
* \brief Struct for CU intra info
*/
typedef struct
{
int8_t mode;
int8_t mode_chroma;
int8_t tr_skip; //!< \brief transform skip flag
} cu_info_intra;
/**
* \brief Struct for CU inter info
*/
typedef struct
{
double cost;
uint32_t bitcost;
int16_t mv[2];
int16_t mvd[2];
uint8_t mv_cand; // \brief selected MV candidate
uint8_t mv_ref; // \brief Index of the encoder_control.ref array.
uint8_t mv_dir; // \brief Probably describes if mv_ref is forward, backward or both. Might not be needed?
int8_t mode;
} cu_info_inter;
typedef struct
{
uint8_t y;
@ -89,8 +64,21 @@ typedef struct
int8_t merge_idx; //!< \brief merge index
cu_cbf_t cbf;
cu_info_intra intra[4];
cu_info_inter inter;
struct {
int8_t mode;
int8_t mode_chroma;
int8_t tr_skip; //!< \brief transform skip flag
} intra[4];
struct {
double cost;
uint32_t bitcost;
int16_t mv[2];
int16_t mvd[2];
uint8_t mv_cand; // \brief selected MV candidate
uint8_t mv_ref; // \brief Index of the encoder_control.ref array.
uint8_t mv_dir; // \brief Probably describes if mv_ref is forward, backward or both. Might not be needed?
int8_t mode;
} inter;
} cu_info_t;
#define CHECKPOINT_CU(prefix_str, cu) CHECKPOINT(prefix_str " type=%d depth=%d part_size=%d tr_depth=%d coded=%d " \

View file

@ -891,7 +891,7 @@ static void lcu_set_inter(lcu_t *lcu, int x_px, int y_px, int depth, cu_info_t *
cu->tr_depth = cur_cu->tr_depth;
cu->merged = cur_cu->merged;
cu->skipped = cur_cu->skipped;
memcpy(&cu->inter, &cur_cu->inter, sizeof(cu_info_inter));
memcpy(&cu->inter, &cur_cu->inter, sizeof(cur_cu->inter));
}
}
}