• Home
  • Raw
  • Download

Lines Matching refs:it

255 int VP8GetCostLuma4(VP8EncIterator* const it, const int16_t levels[16]) {  in VP8GetCostLuma4()  argument
256 const int x = (it->i4_ & 3), y = (it->i4_ >> 2); in VP8GetCostLuma4()
261 InitResidual(0, 3, it->enc_, &res); in VP8GetCostLuma4()
262 ctx = it->top_nz_[x] + it->left_nz_[y]; in VP8GetCostLuma4()
268 int VP8GetCostLuma16(VP8EncIterator* const it, const VP8ModeScore* const rd) { in VP8GetCostLuma16() argument
273 VP8IteratorNzToBytes(it); // re-import the non-zero context in VP8GetCostLuma16()
276 InitResidual(0, 1, it->enc_, &res); in VP8GetCostLuma16()
278 R += GetResidualCost(it->top_nz_[8] + it->left_nz_[8], &res); in VP8GetCostLuma16()
281 InitResidual(1, 0, it->enc_, &res); in VP8GetCostLuma16()
284 const int ctx = it->top_nz_[x] + it->left_nz_[y]; in VP8GetCostLuma16()
287 it->top_nz_[x] = it->left_nz_[y] = (res.last >= 0); in VP8GetCostLuma16()
293 int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd) { in VP8GetCostUV() argument
298 VP8IteratorNzToBytes(it); // re-import the non-zero context in VP8GetCostUV()
300 InitResidual(0, 2, it->enc_, &res); in VP8GetCostUV()
304 const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; in VP8GetCostUV()
307 it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = (res.last >= 0); in VP8GetCostUV()
389 VP8EncIterator* const it, in CodeResiduals() argument
394 const int i16 = (it->mb_->type_ == 1); in CodeResiduals()
395 const int segment = it->mb_->segment_; in CodeResiduals()
397 VP8IteratorNzToBytes(it); in CodeResiduals()
401 InitResidual(0, 1, it->enc_, &res); in CodeResiduals()
403 it->top_nz_[8] = it->left_nz_[8] = in CodeResiduals()
404 PutCoeffs(bw, it->top_nz_[8] + it->left_nz_[8], &res); in CodeResiduals()
405 InitResidual(1, 0, it->enc_, &res); in CodeResiduals()
407 InitResidual(0, 3, it->enc_, &res); in CodeResiduals()
413 const int ctx = it->top_nz_[x] + it->left_nz_[y]; in CodeResiduals()
415 it->top_nz_[x] = it->left_nz_[y] = PutCoeffs(bw, ctx, &res); in CodeResiduals()
421 InitResidual(0, 2, it->enc_, &res); in CodeResiduals()
425 const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; in CodeResiduals()
427 it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = in CodeResiduals()
433 it->luma_bits_ = pos2 - pos1; in CodeResiduals()
434 it->uv_bits_ = pos3 - pos2; in CodeResiduals()
435 it->bit_count_[segment][i16] += it->luma_bits_; in CodeResiduals()
436 it->bit_count_[segment][2] += it->uv_bits_; in CodeResiduals()
437 VP8IteratorBytesToNz(it); in CodeResiduals()
442 static void RecordResiduals(VP8EncIterator* const it, in RecordResiduals() argument
447 VP8IteratorNzToBytes(it); in RecordResiduals()
449 if (it->mb_->type_ == 1) { // i16x16 in RecordResiduals()
450 InitResidual(0, 1, it->enc_, &res); in RecordResiduals()
452 it->top_nz_[8] = it->left_nz_[8] = in RecordResiduals()
453 RecordCoeffs(it->top_nz_[8] + it->left_nz_[8], &res); in RecordResiduals()
454 InitResidual(1, 0, it->enc_, &res); in RecordResiduals()
456 InitResidual(0, 3, it->enc_, &res); in RecordResiduals()
462 const int ctx = it->top_nz_[x] + it->left_nz_[y]; in RecordResiduals()
464 it->top_nz_[x] = it->left_nz_[y] = RecordCoeffs(ctx, &res); in RecordResiduals()
469 InitResidual(0, 2, it->enc_, &res); in RecordResiduals()
473 const int ctx = it->top_nz_[4 + ch + x] + it->left_nz_[4 + ch + y]; in RecordResiduals()
475 it->top_nz_[4 + ch + x] = it->left_nz_[4 + ch + y] = in RecordResiduals()
481 VP8IteratorBytesToNz(it); in RecordResiduals()
502 static void StoreSSE(const VP8EncIterator* const it) { in StoreSSE() argument
503 VP8Encoder* const enc = it->enc_; in StoreSSE()
504 const uint8_t* const in = it->yuv_in_; in StoreSSE()
505 const uint8_t* const out = it->yuv_out_; in StoreSSE()
513 static void StoreSideInfo(const VP8EncIterator* const it) { in StoreSideInfo() argument
514 VP8Encoder* const enc = it->enc_; in StoreSideInfo()
515 const VP8MBInfo* const mb = it->mb_; in StoreSideInfo()
519 StoreSSE(it); in StoreSideInfo()
526 uint8_t* const info = &pic->extra_info[it->x_ + it->y_ * enc->mb_w_]; in StoreSideInfo()
531 case 4: *info = (mb->type_ == 1) ? it->preds_[0] : 0xff; break; in StoreSideInfo()
534 const int b = (int)((it->luma_bits_ + it->uv_bits_ + 7) >> 3); in StoreSideInfo()
541 SetBlock(it->yuv_out_ + Y_OFF, mb->segment_ * 64, 16); in StoreSideInfo()
542 SetBlock(it->yuv_out_ + U_OFF, it->preds_[0] * 64, 8); in StoreSideInfo()
543 SetBlock(it->yuv_out_ + V_OFF, mb->uv_mode_ * 64, 8); in StoreSideInfo()
552 static void ResetAfterSkip(VP8EncIterator* const it) { in ResetAfterSkip() argument
553 if (it->mb_->type_ == 1) { in ResetAfterSkip()
554 *it->nz_ = 0; // reset all predictors in ResetAfterSkip()
555 it->left_nz_[8] = 0; in ResetAfterSkip()
557 *it->nz_ &= (1 << 24); // preserve the dc_nz bit in ResetAfterSkip()
563 VP8EncIterator it; in VP8EncLoop() local
579 VP8IteratorInit(enc, &it); in VP8EncLoop()
580 VP8InitFilter(&it); in VP8EncLoop()
582 VP8IteratorImport(&it); in VP8EncLoop()
585 if (!VP8Decimate(&it, &info, rd_opt) || dont_use_skip) { in VP8EncLoop()
586 CodeResiduals(it.bw_, &it, &info); in VP8EncLoop()
588 ResetAfterSkip(&it); in VP8EncLoop()
592 VP8EncCodeAlphaBlock(&it); in VP8EncLoop()
595 VP8EncCodeLayerBlock(&it); in VP8EncLoop()
598 StoreSideInfo(&it); in VP8EncLoop()
599 VP8StoreFilterStats(&it); in VP8EncLoop()
600 VP8IteratorExport(&it); in VP8EncLoop()
601 } while (VP8IteratorNext(&it, it.yuv_out_)); in VP8EncLoop()
602 VP8AdjustFilterStrength(&it); in VP8EncLoop()
612 enc->residual_bytes_[i][s] = (int)((it.bit_count_[s][i] + 7) >> 3); in VP8EncLoop()
629 VP8EncIterator it; in OneStatPass() local
646 VP8IteratorInit(enc, &it); in OneStatPass()
649 VP8IteratorImport(&it); in OneStatPass()
650 if (VP8Decimate(&it, &info, rd_opt)) { in OneStatPass()
654 RecordResiduals(&it, &info); in OneStatPass()
657 } while (VP8IteratorNext(&it, it.yuv_out_) && --nb_mbs > 0); in OneStatPass()