[debug] Add debug.c/.h to visual studio project and some debugging options

This commit is contained in:
Marko Viitanen 2021-12-13 16:01:52 +02:00
parent dce5c2b293
commit 2cdeff75cb
4 changed files with 8 additions and 3 deletions

View file

@ -146,7 +146,8 @@ void kvz_dbg_yuview_init(const encoder_control_t* const encoder, char* filename,
fprintf(yuview_output, "%%;scaleToBlockSize;1\r\n");
fprintf(yuview_output, "%%;type;18;TR-Skip;range\r\n");
fprintf(yuview_output, "%%;defaultRange;0;2;heat\r\n");
fprintf(yuview_output, "%%;type;19;MRL;range\r\n");
fprintf(yuview_output, "%%;defaultRange;0;2;autumn\r\n");
}
static int yuview_check_allocated_memory(int poc, int type) {

View file

@ -54,7 +54,8 @@ enum {
DBG_YUVIEW_NUM_SIG_COEFF_U = 16,
DBG_YUVIEW_NUM_SIG_COEFF_V = 17,
DBG_YUVIEW_TR_SKIP = 18,
DBG_YUVIEW_NUM_ITEMS = 19,
DBG_YUVIEW_MRL = 19,
DBG_YUVIEW_NUM_ITEMS = 20,
};

View file

@ -858,6 +858,9 @@ static void encode_intra_coding_unit(encoder_state_t * const state,
bool enable_mrl = state->encoder_control->cfg.mrl;
int multi_ref_idx = enable_mrl ? cur_cu->intra.multi_ref_idx : 0;
#ifdef KVZ_DEBUG_PRINT_YUVIEW_CSV
if(multi_ref_idx) DBG_YUVIEW_VALUE(state->frame->poc, DBG_YUVIEW_MRL, x, y, width, width, multi_ref_idx);
#endif
if (cur_cu->type == CU_INTRA && (y % LCU_WIDTH) != 0 && !cur_cu->bdpcmMode && enable_mrl) {
if (MAX_REF_LINE_IDX > 1) {

View file

@ -131,7 +131,7 @@ typedef int16_t mv_t;
//#define KVZ_DEBUG 1
//#define KVZ_DEBUG_PRINT_YUVIEW_CSV 1
//#define KVZ_DEBUG_PRINT_MV_INFO 1
/* CONFIG VARIABLES */
//spec: references to variables defined in Rec. ITU-T H.265 (04/2013)