mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 11:24:05 +00:00
Bug fixes, this version produces bit-perfect output
This commit is contained in:
parent
58ba4b306c
commit
e8f04b32f1
|
@ -1080,7 +1080,7 @@ void encode_transform_tree(encoder_control* encoder,transform_info* ti,uint8_t d
|
|||
{
|
||||
int16_t val = block[i++]+pred[x+y*pred_stride];
|
||||
//ToDo: support 10+bits
|
||||
recbase[x+y*recbase_stride] = (uint8_t)(val&0xff);//CLIP(0,255,val);
|
||||
recbase[x+y*recbase_stride] = (uint8_t)/*(val&0xff);//*/CLIP(0,255,val);
|
||||
}
|
||||
}
|
||||
/* END RECONTRUCTION */
|
||||
|
|
|
@ -567,8 +567,8 @@ void intra_getAngularPred(int16_t* pSrc, int32_t srcStride, int16_t* rpDst, int3
|
|||
{
|
||||
for (k=0;k<blkSize;k++)
|
||||
{
|
||||
pDst[k*dstStride] = (pDst[k*dstStride] + (( refSide[k+1] - refSide[0] ) >> 1)) & (1<<g_bitDepth)-1;
|
||||
//CLIP(0, (1<<g_bitDepth)-1, pDst[k*dstStride] + (( refSide[k+1] - refSide[0] ) >> 1) );
|
||||
pDst[k*dstStride] = //(pDst[k*dstStride] + (( refSide[k+1] - refSide[0] ) >> 1)) & (1<<g_bitDepth)-1;
|
||||
CLIP(0, (1<<g_bitDepth)-1, pDst[k*dstStride] + (( refSide[k+1] - refSide[0] ) >> 1) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ void search_tree(encoder_control* encoder,uint16_t xCtb,uint16_t yCtb, uint8_t d
|
|||
CU_info *cur_CU = &encoder->in.cur_pic.CU[depth][xCtb+yCtb*(encoder->in.width_in_LCU<<MAX_DEPTH)];
|
||||
|
||||
cur_CU->intra.cost = 0xffffffff;
|
||||
cur_CU->inter.cost = 0xffffffff;
|
||||
|
||||
/* Force split on border */
|
||||
if(depth != MAX_DEPTH)
|
||||
|
@ -218,7 +219,7 @@ uint32_t search_best_mode(encoder_control* encoder,uint16_t xCtb,uint16_t yCtb,
|
|||
CU_info *cur_CU = &encoder->in.cur_pic.CU[depth][xCtb+yCtb*(encoder->in.width_in_LCU<<MAX_DEPTH)];
|
||||
uint32_t bestCost = cur_CU->intra.cost;
|
||||
uint32_t cost = 0;
|
||||
uint32_t lambdaCost = 4*g_lambda_cost[encoder->QP]<<8;
|
||||
uint32_t lambdaCost = 4*g_lambda_cost[encoder->QP]<<5;
|
||||
|
||||
/* Split and search to max_depth */
|
||||
if(depth != MAX_SEARCH_DEPTH)
|
||||
|
|
Loading…
Reference in a new issue