From eba43088b2c40dd5054983201a4ad29b57c98937 Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Sun, 24 Feb 2013 16:03:40 +0200 Subject: [PATCH] Intra testing --- src/encoder.c | 14 +++++++------- src/intra.h | 1 + src/nal.c | 4 +++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/encoder.c b/src/encoder.c index 689a9754..5035f809 100644 --- a/src/encoder.c +++ b/src/encoder.c @@ -682,12 +682,12 @@ void encode_coding_tree(encoder_control* encoder,uint16_t xCtb,uint16_t yCtb, ui return; } } - /* - if(border_x && border_y)//yCtb == 20 && xCtb == 20) + + if(/*border_x && border_y)//*/yCtb == 20 && (xCtb >= 20 && xCtb <= 40)) { cur_CU->type = CU_INTRA; } - */ + /* coding_unit( x0, y0, log2CbSize ) */ /* prediction_unit 2Nx2N*/ @@ -759,16 +759,16 @@ void encode_coding_tree(encoder_control* encoder,uint16_t xCtb,uint16_t yCtb, ui Int preds[3] = {-1, -1, -1}; Int predNum = pcCU->getIntraDirLumaPredictor(absPartIdx+partOffset*j, preds); */ - CABAC_BINS_EP(&cabac, predMode, 5, "intraPredMode"); - predMode++; - predMode = predMode % 10; + CABAC_BINS_EP(&cabac, 10, 5, "intraPredMode"); + //predMode++; + //predMode = predMode % 10; if(encoder->in.video_format != FORMAT_400) { cabac.ctx = &g_ChromaPredSCModel[0]; CABAC_BIN(&cabac,1,"IntraPredChroma"); - CABAC_BINS_EP(&cabac, 0, 2, "intraPredModeChroma"); + CABAC_BINS_EP(&cabac, 1, 2, "intraPredModeChroma"); } /* Coeff */ diff --git a/src/intra.h b/src/intra.h index 1dc26fbf..c90eaf5e 100644 --- a/src/intra.h +++ b/src/intra.h @@ -14,4 +14,5 @@ #define __INTRA_H + #endif diff --git a/src/nal.c b/src/nal.c index c4f1a10a..3e7ade0e 100644 --- a/src/nal.c +++ b/src/nal.c @@ -37,10 +37,12 @@ void nal_write(FILE* output, uint8_t* buffer, uint32_t buffer_len, uint8_t nal_r const uint8_t zero = 0x00; /*start_code_prefix_one_3bytes */ + /* if(temporal_id == 0) { fwrite(&zero, 1, 1, output); - } + } + */ fwrite(&zero, 1, 1, output); fwrite(&zero, 1, 1, output); fwrite(&start_code_prefix_one_3bytes, 1, 1, output);