00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <limits.h>
00019
00020 #include "global.h"
00021
00022 #include "image.h"
00023 #include "macroblock.h"
00024 #include "mb_access.h"
00025 #include "rdopt_coding_state.h"
00026 #include "mode_decision.h"
00027 #include "rdopt.h"
00028 #include "rd_intra_jm.h"
00029 #include "q_around.h"
00030 #include "intra4x4.h"
00031 #include "intra8x8.h"
00032 #include "md_common.h"
00033 #include "transform8x8.h"
00034 #include "md_distortion.h"
00035 #include "elements.h"
00036 #include "symbol.h"
00037
00038 extern int MBType2Value (Macroblock* currMB);
00039
00040
00041
00042
00043
00044
00045
00046 int Mode_Decision_for_4x4IntraBlocks_JM_High (Macroblock *currMB, int b8, int b4, double lambda, double* min_cost)
00047 {
00048 ImageParameters *p_Img = currMB->p_Img;
00049 InputParameters *p_Inp = currMB->p_Inp;
00050 Slice *currSlice = currMB->p_slice;
00051 RDOPTStructure *p_RDO = currSlice->p_RDO;
00052
00053 int ipmode, best_ipmode = 0, y;
00054 int c_nz, nonzero = 0;
00055 int* ACLevel = currSlice->cofAC[b8][b4][0];
00056 int* ACRun = currSlice->cofAC[b8][b4][1];
00057
00058 double rdcost = 0.0;
00059 int block_x = ((b8 & 0x01) << 3) + ((b4 & 0x01) << 2);
00060 int block_y = ((b8 >> 1) << 3) + ((b4 >> 1) << 2);
00061 int pic_pix_x = currMB->pix_x + block_x;
00062 int pic_pix_y = currMB->pix_y + block_y;
00063 int pic_opix_x = currMB->pix_x + block_x;
00064 int pic_opix_y = currMB->opix_y + block_y;
00065 int pic_block_x = pic_pix_x >> 2;
00066 int pic_block_y = pic_pix_y >> 2;
00067 double min_rdcost = 1e30;
00068
00069 int left_available, up_available, all_available;
00070 int *mb_size = p_Img->mb_size[IS_LUMA];
00071
00072 char upMode, leftMode;
00073 int mostProbableMode;
00074
00075 PixelPos left_block, top_block;
00076
00077 int lrec4x4[4][4];
00078 int best_nz_coeff = 0;
00079 int block_x4 = block_x>>2;
00080 int block_y4 = block_y>>2;
00081
00082 #ifdef BEST_NZ_COEFF
00083 int best_coded_block_flag = 0;
00084 int bit_pos = 1 + ((((b8>>1)<<1)+(b4>>1))<<2) + (((b8&1)<<1)+(b4&1));
00085 int64 cbp_bits;
00086
00087 if (b8==0 && b4==0)
00088 cbp_bits = 0;
00089 #endif
00090
00091 get4x4Neighbour(currMB, block_x - 1, block_y , mb_size, &left_block);
00092 get4x4Neighbour(currMB, block_x, block_y - 1, mb_size, &top_block );
00093
00094
00095 if (p_Inp->UseConstrainedIntraPred)
00096 {
00097 left_block.available = left_block.available ? p_Img->intra_block[left_block.mb_addr] : 0;
00098 top_block.available = top_block.available ? p_Img->intra_block[top_block.mb_addr] : 0;
00099 }
00100
00101 upMode = top_block.available ? p_Img->ipredmode[top_block.pos_y ][top_block.pos_x ] : -1;
00102 leftMode = left_block.available ? p_Img->ipredmode[left_block.pos_y][left_block.pos_x] : -1;
00103
00104 mostProbableMode = (upMode < 0 || leftMode < 0) ? DC_PRED : upMode < leftMode ? upMode : leftMode;
00105
00106 *min_cost = INT_MAX;
00107
00108 currMB->ipmode_DPCM = NO_INTRA_PMODE;
00109
00110
00111
00112 set_intrapred_4x4(currMB, PLANE_Y, pic_pix_x, pic_pix_y, &left_available, &up_available, &all_available);
00113
00114
00115 for (ipmode = 0; ipmode < NO_INTRA_PMODE; ipmode++)
00116 {
00117 int available_mode = (all_available) || (ipmode==DC_PRED) ||
00118 (up_available && (ipmode==VERT_PRED||ipmode==VERT_LEFT_PRED||ipmode==DIAG_DOWN_LEFT_PRED)) ||
00119 (left_available && (ipmode==HOR_PRED||ipmode==HOR_UP_PRED));
00120
00121 if (valid_intra_mode(currSlice, ipmode) == 0)
00122 continue;
00123
00124 if( available_mode)
00125 {
00126
00127 get_intrapred_4x4(currMB, PLANE_Y, ipmode, block_x, block_y, left_available, up_available);
00128
00129
00130 generate_pred_error_4x4(&p_Img->pCurImg[pic_opix_y], currSlice->mpr_4x4[0][ipmode], &currSlice->mb_pred[0][block_y], &currSlice->mb_ores[0][block_y], pic_opix_x, block_x);
00131
00132
00133 #ifdef BEST_NZ_COEFF
00134 currMB->cbp_bits[0] = cbp_bits;
00135 #endif
00136
00137 if ((rdcost = currSlice->rdcost_for_4x4_intra_blocks (currMB, &c_nz, b8, b4, ipmode, lambda, mostProbableMode, min_rdcost)) < min_rdcost)
00138 {
00139
00140 memcpy(p_RDO->cofAC4x4[0], ACLevel, 18 * sizeof(int));
00141 memcpy(p_RDO->cofAC4x4[1], ACRun, 18 * sizeof(int));
00142
00143
00144 copy_4x4block(p_RDO->rec4x4[PLANE_Y], &p_Img->enc_picture->imgY[pic_pix_y], 0, pic_pix_x);
00145
00146
00147 if(currSlice->slice_type == SP_SLICE &&(!currSlice->si_frame_indicator && !currSlice->sp2_frame_indicator))
00148 {
00149 for (y=0; y<4; y++)
00150 {
00151 memcpy(lrec4x4[y],&p_Img->lrec[pic_pix_y+y][pic_pix_x], BLOCK_SIZE * sizeof(int));
00152 }
00153 }
00154
00155
00156 nonzero = c_nz;
00157
00158
00159 *min_cost = rdcost;
00160 min_rdcost = rdcost;
00161 best_ipmode = ipmode;
00162
00163 best_nz_coeff = p_Img->nz_coeff [p_Img->current_mb_nr][block_x4][block_y4];
00164 #ifdef BEST_NZ_COEFF
00165 best_coded_block_flag = (int)((currMB->cbp_bits[0] >> bit_pos)&(int64)(1));
00166 #endif
00167 if (p_Img->AdaptiveRounding)
00168 {
00169 store_adaptive_rounding_4x4 (p_Img, p_Img->ARCofAdj4x4, I4MB, block_y, block_x);
00170 }
00171
00172 }
00173 }
00174 }
00175 #if INTRA_RDCOSTCALC_NNZ
00176 p_Img->nz_coeff [p_Img->current_mb_nr][block_x4][block_y4] = best_nz_coeff;
00177 #endif
00178 #ifdef BEST_NZ_COEFF
00179 cbp_bits &= (~(int64)(1<<bit_pos));
00180 cbp_bits |= (int64)(best_coded_block_flag<<bit_pos);
00181 #endif
00182
00183
00184 p_Img->ipredmode[pic_block_y][pic_block_x] = (char) best_ipmode;
00185 currMB->intra_pred_modes[4*b8+b4] =
00186 (char) (mostProbableMode == best_ipmode ? -1 : (best_ipmode < mostProbableMode ? best_ipmode : best_ipmode-1));
00187
00188
00189 memcpy (ACLevel, p_RDO->cofAC4x4[0], 18 * sizeof(int));
00190 memcpy (ACRun, p_RDO->cofAC4x4[1], 18 * sizeof(int));
00191
00192
00193 copy_4x4block(&p_Img->enc_picture->imgY[pic_pix_y], p_RDO->rec4x4[PLANE_Y], pic_pix_x, 0);
00194 copy_4x4block(&currSlice->mb_pred[0][block_y], currSlice->mpr_4x4[0][best_ipmode], block_x, 0);
00195
00196
00197 if(currSlice->slice_type == SP_SLICE &&(!p_Img->si_frame_indicator && !p_Img->sp2_frame_indicator))
00198 {
00199 for (y=0; y<BLOCK_SIZE; y++)
00200 {
00201 memcpy (&p_Img->lrec[pic_pix_y+y][pic_pix_x], lrec4x4[y], BLOCK_SIZE * sizeof(int));
00202 }
00203 }
00204
00205 if (p_Img->AdaptiveRounding)
00206 {
00207 update_adaptive_rounding_4x4 (p_Img,p_Img->ARCofAdj4x4, I4MB, block_y, block_x);
00208 }
00209
00210
00211 return nonzero;
00212 }
00213
00214
00215
00216
00217
00218
00219
00220 int Mode_Decision_for_8x8IntraBlocks_JM_High (Macroblock *currMB, int b8, double lambda, double *min_cost)
00221 {
00222 ImageParameters *p_Img = currMB->p_Img;
00223 InputParameters *p_Inp = currMB->p_Inp;
00224 Slice *currSlice = currMB->p_slice;
00225 RDOPTStructure *p_RDO = currSlice->p_RDO;
00226
00227 int ipmode, best_ipmode = 0, j;
00228 int c_nz, nonzero = 0;
00229 double rdcost = 0.0;
00230 int block_x = (b8 & 0x01) << 3;
00231 int block_y = (b8 >> 1) << 3;
00232 int pic_pix_x = currMB->pix_x + block_x;
00233 int pic_pix_y = currMB->pix_y + block_y;
00234 int pic_opix_x = currMB->pix_x + block_x;
00235 int pic_opix_y = currMB->opix_y + block_y;
00236 int pic_block_x = pic_pix_x >> 2;
00237 int pic_block_y = pic_pix_y >> 2;
00238 int mb_block_y = (currMB->block_y) + ((b8 >> 1) << 1);
00239 int mb_block_x = (currMB->block_x) + ((b8 & 0x01) << 1);
00240 int *p_AC8x8 = p_RDO->coefAC8x8intra[b8][0][0][0];
00241 int *cofAC = currSlice->cofAC[b8][0][0];
00242
00243 double min_rdcost = 1e30;
00244 int left_available, up_available, all_available;
00245 int **mb_ores = currSlice->mb_ores[0];
00246 imgpel **mb_pred = currSlice->mb_pred[0];
00247
00248 char upMode, leftMode;
00249 int mostProbableMode;
00250
00251 PixelPos left_block, top_block;
00252
00253 int *mb_size = p_Img->mb_size[IS_LUMA];
00254
00255 get4x4Neighbour(currMB, block_x - 1, block_y , mb_size, &left_block);
00256 get4x4Neighbour(currMB, block_x, block_y - 1, mb_size, &top_block );
00257
00258
00259 if (p_Inp->UseConstrainedIntraPred)
00260 {
00261 left_block.available = left_block.available ? p_Img->intra_block [left_block.mb_addr] : 0;
00262 top_block.available = top_block.available ? p_Img->intra_block [top_block.mb_addr ] : 0;
00263 }
00264
00265 if(b8 >> 1)
00266 upMode = top_block.available ? p_Img->ipredmode8x8[top_block.pos_y ][top_block.pos_x ] : -1;
00267 else
00268 upMode = top_block.available ? p_Img->ipredmode [top_block.pos_y ][top_block.pos_x ] : -1;
00269
00270 if(b8 & 0x01)
00271 leftMode = left_block.available ? p_Img->ipredmode8x8[left_block.pos_y][left_block.pos_x] : -1;
00272 else
00273 leftMode = left_block.available ? p_Img->ipredmode[left_block.pos_y][left_block.pos_x] : -1;
00274
00275 mostProbableMode = (upMode < 0 || leftMode < 0) ? DC_PRED : upMode < leftMode ? upMode : leftMode;
00276
00277 *min_cost = INT_MAX;
00278
00279 currMB->ipmode_DPCM = NO_INTRA_PMODE;
00280
00281
00282 set_intrapred_8x8(currMB, PLANE_Y, pic_pix_x, pic_pix_y, &left_available, &up_available, &all_available);
00283
00284
00285 for (ipmode = 0; ipmode < NO_INTRA_PMODE; ipmode++)
00286 {
00287 if( (ipmode==DC_PRED) ||
00288 ((ipmode==VERT_PRED||ipmode==VERT_LEFT_PRED||ipmode==DIAG_DOWN_LEFT_PRED) && up_available ) ||
00289 ((ipmode==HOR_PRED||ipmode==HOR_UP_PRED) && left_available ) ||
00290 (all_available) )
00291 {
00292 get_intrapred_8x8(currMB, PLANE_Y, ipmode, left_available, up_available);
00293
00294 generate_pred_error_8x8(&p_Img->pCurImg[pic_opix_y], currSlice->mpr_8x8[0][ipmode], &mb_pred[block_y], &mb_ores[block_y], pic_opix_x, block_x);
00295
00296 currMB->ipmode_DPCM = (short) ipmode;
00297
00298
00299
00300 if ((rdcost = currSlice->rdcost_for_8x8_intra_blocks (currMB, &c_nz, b8, ipmode, lambda, min_rdcost, mostProbableMode)) < min_rdcost)
00301 {
00302
00303 memcpy(p_AC8x8, cofAC, 4 * 2 * 65 * sizeof(int));
00304
00305
00306 copy_image_data_8x8(p_RDO->rec8x8[PLANE_Y], &p_Img->enc_picture->imgY[pic_pix_y], 0, pic_pix_x);
00307
00308 if (p_Img->AdaptiveRounding)
00309 {
00310 for (j = block_y; j < block_y + 8; j++)
00311 memcpy(&p_Img->ARCofAdj8x8[0][DUMMY][j][block_x],&p_Img->ARCofAdj8x8[0][I8MB][j][block_x], 8 * sizeof(int));
00312 }
00313
00314
00315 nonzero = c_nz;
00316
00317
00318 *min_cost = rdcost;
00319 min_rdcost = rdcost;
00320 best_ipmode = ipmode;
00321 }
00322 }
00323 }
00324
00325
00326 p_Img->ipredmode8x8[pic_block_y][pic_block_x] = (char) best_ipmode;
00327 currMB->ipmode_DPCM = (short) best_ipmode;
00328
00329 currMB->intra_pred_modes8x8[4*b8] = (char) ((mostProbableMode == best_ipmode)
00330 ? -1
00331 : (best_ipmode < mostProbableMode ? best_ipmode : best_ipmode-1));
00332
00333 memset(&p_Img->ipredmode8x8[mb_block_y ][mb_block_x], best_ipmode, 2 * sizeof(char));
00334 memset(&p_Img->ipredmode8x8[mb_block_y + 1][mb_block_x], best_ipmode, 2 * sizeof(char));
00335
00336
00337 memcpy(cofAC, p_AC8x8, 4 * 2 * 65 * sizeof(int));
00338
00339 if (p_Img->AdaptiveRounding)
00340 {
00341 for (j=block_y; j< block_y + 8; j++)
00342 memcpy(&p_Img->ARCofAdj8x8[0][I8MB][j][block_x], &p_Img->ARCofAdj8x8[0][DUMMY][j][block_x], 8 * sizeof(int));
00343 }
00344
00345
00346 copy_image_data_8x8(&p_Img->enc_picture->imgY[pic_pix_y], p_RDO->rec8x8[0], pic_pix_x, 0);
00347 copy_image_data_8x8(&mb_pred[block_y], currSlice->mpr_8x8[0][best_ipmode], block_x, 0);
00348
00349 return nonzero;
00350 }
00351
00352
00353
00354
00355
00356
00357
00358 int Mode_Decision_for_IntraSubMBlocks(Macroblock *currMB, int b8,double lambda, double *cost, int non_zero[3])
00359 {
00360 Slice *currSlice = currMB->p_slice;
00361 int b4;
00362 double cost4x4;
00363 currMB->cr_cbp[0] = 0;
00364 currMB->cr_cbp[1] = 0;
00365 currMB->cr_cbp[2] = 0;
00366
00367 memset(non_zero, 0, 3 * sizeof(int));
00368
00369 *cost = (int)floor(6.0 * lambda + 0.4999);
00370
00371 for (b4=0; b4<4; b4++)
00372 {
00373 non_zero[0] |= currSlice->Mode_Decision_for_4x4IntraBlocks (currMB, b8, b4, lambda, &cost4x4);
00374 non_zero[1] |= currMB->cr_cbp[1];
00375 non_zero[2] |= currMB->cr_cbp[2];
00376 *cost += cost4x4;
00377 }
00378
00379 return non_zero[0];
00380 }
00381
00382
00383
00384
00385
00386
00387
00388 int Mode_Decision_for_Intra4x4Macroblock (Macroblock *currMB, double lambda, double* cost)
00389 {
00390 Slice *currSlice = currMB->p_slice;
00391 int cbp=0, b8;
00392 double cost8x8;
00393 int non_zero[3] = {0, 0, 0};
00394
00395 currSlice->cmp_cbp[1] = currSlice->cmp_cbp[2] = 0;
00396
00397 for (*cost=0, b8=0; b8<4; b8++)
00398 {
00399 if (Mode_Decision_for_IntraSubMBlocks (currMB, b8, lambda, &cost8x8, non_zero))
00400 {
00401 cbp |= (1<<b8);
00402 }
00403 *cost += cost8x8;
00404 if (non_zero[1])
00405 {
00406 currSlice->cmp_cbp[1] |= (1<<b8);
00407 cbp |= currSlice->cmp_cbp[1];
00408 currSlice->cmp_cbp[1] = cbp;
00409 currSlice->cmp_cbp[2] = cbp;
00410 }
00411 if (non_zero[2])
00412 {
00413 currSlice->cmp_cbp[2] |= (1<<b8);
00414 cbp |= currSlice->cmp_cbp[2];
00415 currSlice->cmp_cbp[1] = cbp;
00416 currSlice->cmp_cbp[2] = cbp;
00417 }
00418 }
00419 return cbp;
00420 }
00421
00422
00423
00424
00425
00426
00427
00428
00429 void Intra16x16_Mode_Decision_SAD (Macroblock* currMB)
00430 {
00431 Slice *currSlice = currMB->p_slice;
00432
00433 intrapred_16x16 (currMB, PLANE_Y);
00434 currSlice->find_sad_16x16 (currMB);
00435 currMB->cbp = currMB->trans_16x16 (currMB, PLANE_Y);
00436 }
00437
00438
00439
00440
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450 double min_rdcost_16x16(Macroblock *currMB, double lambda)
00451 {
00452 ImageParameters *p_Img = currMB->p_Img;
00453 InputParameters *p_Inp = currMB->p_Inp;
00454 Slice *currSlice = currMB->p_slice;
00455
00456 SyntaxElement se;
00457 const int* partMap = assignSE2partition[currSlice->partition_mode];
00458 DataPartition* dataPart = &(currSlice->partArr[partMap[SE_MBTYPE]]);
00459
00460 double min_rdcost = 1e30, rdcost;
00461 int64 distortionY;
00462 int rate;
00463 int i,k;
00464 int b8, b4;
00465
00466 PixelPos up;
00467 PixelPos left[17];
00468
00469 int up_avail, left_avail, left_up_avail;
00470
00471 int best_mode = 0, best_cbp = 0;
00472 int bestCofAC[4][4][2][65];
00473 int bestCofDC[2][18];
00474 imgpel bestRec[MB_BLOCK_SIZE][MB_BLOCK_SIZE];
00475
00476 for (i=0;i<17;i++)
00477 {
00478 p_Img->getNeighbour(currMB, -1 , i - 1 , p_Img->mb_size[IS_LUMA], &left[i]);
00479 }
00480
00481 p_Img->getNeighbour(currMB, 0 , -1 , p_Img->mb_size[IS_LUMA], &up);
00482
00483 if (!(p_Inp->UseConstrainedIntraPred))
00484 {
00485 up_avail = up.available;
00486 left_avail = left[1].available;
00487 left_up_avail = left[0].available;
00488 }
00489 else
00490 {
00491 up_avail = up.available ? p_Img->intra_block[up.mb_addr] : 0;
00492 for (i = 1, left_avail = 1; i < 17;i++)
00493 left_avail &= left[i].available ? p_Img->intra_block[left[i].mb_addr]: 0;
00494 left_up_avail = left[0].available ? p_Img->intra_block[left[0].mb_addr]: 0;
00495 }
00496
00497 currMB->mb_type = I16MB;
00498
00499 for (k = 0;k < 4; k++)
00500 {
00501 if (p_Inp->IntraDisableInterOnly == 0 || currSlice->slice_type != I_SLICE)
00502 {
00503 if (p_Inp->Intra16x16ParDisable && (k==VERT_PRED_16||k==HOR_PRED_16))
00504 continue;
00505
00506 if (p_Inp->Intra16x16PlaneDisable && k==PLANE_16)
00507 continue;
00508 }
00509 if ((k==0 && !up_avail) || (k==1 && !left_avail) || (k==3 && (!left_avail || !up_avail || !left_up_avail)))
00510 continue;
00511
00512 currMB->i16mode = (char) k;
00513 currMB->cbp = currMB->trans_16x16(currMB, PLANE_Y);
00514
00515 distortionY = compute_SSE16x16(&p_Img->pCurImg[currMB->opix_y], &p_Img->enc_picture->p_curr_img[currMB->pix_y], currMB->pix_x, currMB->pix_x);
00516
00517 currSlice->store_coding_state (currMB, currSlice->p_RDO->cs_tmp);
00518 currMB->i16offset = I16Offset (currMB->cbp, currMB->i16mode);
00519
00520 rate = 0;
00521 {
00522 se.value1 = MBType2Value (currMB);
00523 se.value2 = 0;
00524 se.type = SE_MBTYPE;
00525
00526 currSlice->writeMB_typeInfo (currMB, &se, dataPart);
00527
00528 rate += se.len;
00529 }
00530 rate += currSlice->writeCoeff16x16 (currMB, PLANE_Y);
00531 currSlice->reset_coding_state (currMB, currSlice->p_RDO->cs_tmp);
00532
00533 rdcost = distortionY + lambda*rate;
00534
00535 if(rdcost < min_rdcost)
00536 {
00537 min_rdcost = rdcost;
00538 best_mode = k;
00539 best_cbp = currMB->cbp;
00540 for(b8 = 0; b8 < 4; b8++)
00541 {
00542 for(b4 = 0; b4 < 4; b4++)
00543 {
00544 memcpy(bestCofAC[b8][b4][0], currSlice->cofAC[b8][b4][0], sizeof(int) * 65);
00545 memcpy(bestCofAC[b8][b4][1], currSlice->cofAC[b8][b4][1], sizeof(int) * 65);
00546 }
00547 }
00548
00549 memcpy(bestCofDC[0], currSlice->cofDC[0][0], sizeof(int)*18);
00550 memcpy(bestCofDC[1], currSlice->cofDC[0][1], sizeof(int)*18);
00551
00552 for(i = 0; i < MB_BLOCK_SIZE; i++)
00553 memcpy(bestRec[i], &p_Img->enc_picture->p_curr_img[currMB->pix_y + i][currMB->pix_x], sizeof(imgpel)*MB_BLOCK_SIZE);
00554 }
00555 }
00556
00557 currMB->i16mode = (char) best_mode;
00558 currMB->cbp = best_cbp;
00559 currMB->i16offset = I16Offset (currMB->cbp, currMB->i16mode);
00560
00561 for(b8 = 0; b8 < 4; b8++)
00562 {
00563 for(b4 = 0; b4 < 4; b4++)
00564 {
00565 memcpy(currSlice->cofAC[b8][b4][0], bestCofAC[b8][b4][0], sizeof(int)*65);
00566 memcpy(currSlice->cofAC[b8][b4][1], bestCofAC[b8][b4][1], sizeof(int)*65);
00567 }
00568 }
00569
00570 memcpy(currSlice->cofDC[0][0], bestCofDC[0], sizeof(int)*18);
00571 memcpy(currSlice->cofDC[0][1], bestCofDC[1], sizeof(int)*18);
00572
00573 for(i = 0; i < MB_BLOCK_SIZE; i++)
00574 {
00575 memcpy(&p_Img->enc_picture->p_curr_img[currMB->pix_y+i][currMB->pix_x], bestRec[i], MB_BLOCK_SIZE*sizeof(imgpel));
00576 }
00577
00578 return min_rdcost;
00579 }
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589 void Intra16x16_Mode_Decision_RDopt (Macroblock* currMB, double lambda)
00590 {
00591
00592 intrapred_16x16 (currMB, PLANE_Y);
00593 min_rdcost_16x16 (currMB, lambda);
00594 }
00595
00596