From 53f8d9f83a04227637e4f486b844c10959584fbd Mon Sep 17 00:00:00 2001 From: Marko Viitanen Date: Tue, 12 Jun 2012 17:41:03 +0300 Subject: [PATCH] Context model bugfix --- src/encoder.c | 14 +++++++------- src/encoder.h | 8 ++++---- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/encoder.c b/src/encoder.c index 69f7da58..fd522a91 100644 --- a/src/encoder.c +++ b/src/encoder.c @@ -255,9 +255,9 @@ cabac_ctx g_SplitFlagSCModel[3]; /*QP, INIT_TRANS_SUBDIV_FLAG[SLICE_I][i]); cxt_init(&g_CUSigCoeffGroupSCModel[i], encoder->QP, INIT_SIG_CG_FLAG[SLICE_I][i]); } - for(i = 0; i < 5; i++) + for(i = 0; i < 3; i++) { - cxt_init(&g_QtCbfSCModelY[i], encoder->QP, INIT_QT_CBF[SLICE_I][i+5]); - cxt_init(&g_QtCbfSCModelU[i], encoder->QP, INIT_QT_CBF[SLICE_I][i+5]); - cxt_init(&g_QtCbfSCModelV[i], encoder->QP, INIT_QT_CBF[SLICE_I][i]); + cxt_init(&g_QtCbfSCModelY[i], encoder->QP, INIT_QT_CBF[SLICE_I][i]); + cxt_init(&g_QtCbfSCModelU[i], encoder->QP, INIT_QT_CBF[SLICE_I][i+3]); + //cxt_init(&g_QtCbfSCModelV[i], encoder->QP, INIT_QT_CBF[SLICE_I][i]); } for(i = 0; i < 45; i++) { diff --git a/src/encoder.h b/src/encoder.h index 53e8731d..8c2a5ed8 100644 --- a/src/encoder.h +++ b/src/encoder.h @@ -80,11 +80,11 @@ static const uint8_t INIT_TRANS_SUBDIV_FLAG[3][4] = { CNU, 224, 167, 122 } }; -static const uint8_t INIT_QT_CBF[3][10] = +static const uint8_t INIT_QT_CBF[3][6] = { - { 153, 111, CNU, CNU, CNU, 149, 92, 167, CNU, CNU }, - { 153, 111, CNU, CNU, CNU, 149, 107, 167, CNU, CNU }, - { 111, 141, CNU, CNU, CNU, 94, 138, 182, CNU, CNU } + { 153, 111, CNU, 149, 92, 167 }, + { 153, 111, CNU, 149, 107, 167 }, + { 111, 141, CNU, 94, 138, 182 } }; static const uint8_t INIT_SIG_CG_FLAG[3][4] =