Lines Matching defs:cel
45 * Maximum cost: 138 bits per cel
272 * Initialize cel evaluators and set their source coordinates
495 * Get distortion for all options available to a cel
497 static void gather_data_for_cel(CelEvaluation *cel, RoqEncContext *enc)
502 int index = cel->sourceY * roq->width / 64 + cel->sourceX/8;
508 cel->motion = enc->this_motion8[index];
510 cel->eval_dist[RoQ_ID_FCC] =
511 eval_motion_dist(enc, cel->sourceX, cel->sourceY,
514 cel->eval_dist[RoQ_ID_FCC] = INT_MAX;
517 cel->eval_dist[RoQ_ID_MOT] = block_sse(enc->frame_to_enc->data,
519 cel->sourceX, cel->sourceY,
520 cel->sourceX, cel->sourceY,
524 cel->eval_dist[RoQ_ID_MOT] = INT_MAX;
526 get_frame_mb(enc->frame_to_enc, cel->sourceX, cel->sourceY, mb8, 8);
528 cel->eval_dist[RoQ_ID_SLD] =
530 tempData->codebooks.numCB4, &cel->cbEntry, 8);
532 gather_data_for_subcel(cel->subCels + 0, cel->sourceX+0, cel->sourceY+0, enc);
533 gather_data_for_subcel(cel->subCels + 1, cel->sourceX+4, cel->sourceY+0, enc);
534 gather_data_for_subcel(cel->subCels + 2, cel->sourceX+0, cel->sourceY+4, enc);
535 gather_data_for_subcel(cel->subCels + 3, cel->sourceX+4, cel->sourceY+4, enc);
537 cel->eval_dist[RoQ_ID_CCC] = 0;
540 cel->eval_dist[RoQ_ID_CCC] +=
541 cel->subCels[i].eval_dist[cel->subCels[i].best_coding];
542 divide_bit_use += cel->subCels[i].best_bit_use;
549 if (ROQ_LAMBDA_SCALE*cel->eval_dist[i] + enc->lambda*bitsUsed[i] <
551 cel->best_coding = i;
552 best_dist = ROQ_LAMBDA_SCALE*cel->eval_dist[i] +
556 tempData->used_option[cel->best_coding]++;
557 tempData->mainChunkSize += bitsUsed[cel->best_coding];
559 if (cel->best_coding == RoQ_ID_SLD)
560 tempData->codebooks.usedCB4[cel->cbEntry]++;
562 if (cel->best_coding == RoQ_ID_CCC)
564 if (cel->subCels[i].best_coding == RoQ_ID_SLD)
565 tempData->codebooks.usedCB4[cel->subCels[i].cbEntry]++;
566 else if (cel->subCels[i].best_coding == RoQ_ID_CCC)
568 tempData->codebooks.usedCB2[cel->subCels[i].subCels[j]]++;