Lines Matching refs:it
26 static void InitLeft(VP8EncIterator* const it) { in InitLeft() argument
27 const VP8Encoder* const enc = it->enc_; in InitLeft()
29 (it->y_ > 0) ? 129 : 127; in InitLeft()
33 it->left_nz_[8] = 0; in InitLeft()
36 static void InitTop(VP8EncIterator* const it) { in InitTop() argument
37 const VP8Encoder* const enc = it->enc_; in InitTop()
43 void VP8IteratorReset(VP8EncIterator* const it) { in VP8IteratorReset() argument
44 VP8Encoder* const enc = it->enc_; in VP8IteratorReset()
45 it->x_ = 0; in VP8IteratorReset()
46 it->y_ = 0; in VP8IteratorReset()
47 it->y_offset_ = 0; in VP8IteratorReset()
48 it->uv_offset_ = 0; in VP8IteratorReset()
49 it->mb_ = enc->mb_info_; in VP8IteratorReset()
50 it->preds_ = enc->preds_; in VP8IteratorReset()
51 it->nz_ = enc->nz_; in VP8IteratorReset()
52 it->bw_ = &enc->parts_[0]; in VP8IteratorReset()
53 it->done_ = enc->mb_w_* enc->mb_h_; in VP8IteratorReset()
54 InitTop(it); in VP8IteratorReset()
55 InitLeft(it); in VP8IteratorReset()
56 memset(it->bit_count_, 0, sizeof(it->bit_count_)); in VP8IteratorReset()
57 it->do_trellis_ = 0; in VP8IteratorReset()
60 void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it) { in VP8IteratorInit() argument
61 it->enc_ = enc; in VP8IteratorInit()
62 it->y_stride_ = enc->pic_->y_stride; in VP8IteratorInit()
63 it->uv_stride_ = enc->pic_->uv_stride; in VP8IteratorInit()
65 it->yuv_in_ = enc->yuv_in_; in VP8IteratorInit()
66 it->yuv_out_ = enc->yuv_out_; in VP8IteratorInit()
67 it->yuv_out2_ = enc->yuv_out2_; in VP8IteratorInit()
68 it->yuv_p_ = enc->yuv_p_; in VP8IteratorInit()
69 it->lf_stats_ = enc->lf_stats_; in VP8IteratorInit()
70 it->percent0_ = enc->percent_; in VP8IteratorInit()
71 VP8IteratorReset(it); in VP8IteratorInit()
74 int VP8IteratorProgress(const VP8EncIterator* const it, int delta) { in VP8IteratorProgress() argument
75 VP8Encoder* const enc = it->enc_; in VP8IteratorProgress()
78 ? it->percent0_ in VP8IteratorProgress()
79 : it->percent0_ + delta * it->y_ / (enc->mb_h_ - 1); in VP8IteratorProgress()
106 void VP8IteratorImport(const VP8EncIterator* const it) { in VP8IteratorImport() argument
107 const VP8Encoder* const enc = it->enc_; in VP8IteratorImport()
108 const int x = it->x_, y = it->y_; in VP8IteratorImport()
113 uint8_t* const ydst = it->yuv_in_ + Y_OFF; in VP8IteratorImport()
114 uint8_t* const udst = it->yuv_in_ + U_OFF; in VP8IteratorImport()
115 uint8_t* const vdst = it->yuv_in_ + V_OFF; in VP8IteratorImport()
145 void VP8IteratorExport(const VP8EncIterator* const it) { in VP8IteratorExport() argument
146 const VP8Encoder* const enc = it->enc_; in VP8IteratorExport()
148 const int x = it->x_, y = it->y_; in VP8IteratorExport()
149 const uint8_t* const ysrc = it->yuv_out_ + Y_OFF; in VP8IteratorExport()
150 const uint8_t* const usrc = it->yuv_out_ + U_OFF; in VP8IteratorExport()
151 const uint8_t* const vsrc = it->yuv_out_ + V_OFF; in VP8IteratorExport()
191 void VP8IteratorNzToBytes(VP8EncIterator* const it) { in VP8IteratorNzToBytes() argument
192 const int tnz = it->nz_[0], lnz = it->nz_[-1]; in VP8IteratorNzToBytes()
193 int* const top_nz = it->top_nz_; in VP8IteratorNzToBytes()
194 int* const left_nz = it->left_nz_; in VP8IteratorNzToBytes()
224 void VP8IteratorBytesToNz(VP8EncIterator* const it) { in VP8IteratorBytesToNz() argument
226 const int* const top_nz = it->top_nz_; in VP8IteratorBytesToNz()
227 const int* const left_nz = it->left_nz_; in VP8IteratorBytesToNz()
239 *it->nz_ = nz; in VP8IteratorBytesToNz()
247 int VP8IteratorNext(VP8EncIterator* const it, in VP8IteratorNext() argument
249 VP8Encoder* const enc = it->enc_; in VP8IteratorNext()
251 const int x = it->x_, y = it->y_; in VP8IteratorNext()
274 it->mb_++; in VP8IteratorNext()
275 it->preds_ += 4; in VP8IteratorNext()
276 it->nz_++; in VP8IteratorNext()
277 it->x_++; in VP8IteratorNext()
278 if (it->x_ == enc->mb_w_) { in VP8IteratorNext()
279 it->x_ = 0; in VP8IteratorNext()
280 it->y_++; in VP8IteratorNext()
281 it->bw_ = &enc->parts_[it->y_ & (enc->num_parts_ - 1)]; in VP8IteratorNext()
282 it->preds_ = enc->preds_ + it->y_ * 4 * enc->preds_w_; in VP8IteratorNext()
283 it->nz_ = enc->nz_; in VP8IteratorNext()
284 InitLeft(it); in VP8IteratorNext()
286 return (0 < --it->done_); in VP8IteratorNext()
292 void VP8SetIntra16Mode(const VP8EncIterator* const it, int mode) { in VP8SetIntra16Mode() argument
293 uint8_t* preds = it->preds_; in VP8SetIntra16Mode()
297 preds += it->enc_->preds_w_; in VP8SetIntra16Mode()
299 it->mb_->type_ = 1; in VP8SetIntra16Mode()
302 void VP8SetIntra4Mode(const VP8EncIterator* const it, const uint8_t* modes) { in VP8SetIntra4Mode() argument
303 uint8_t* preds = it->preds_; in VP8SetIntra4Mode()
307 preds += it->enc_->preds_w_; in VP8SetIntra4Mode()
310 it->mb_->type_ = 0; in VP8SetIntra4Mode()
313 void VP8SetIntraUVMode(const VP8EncIterator* const it, int mode) { in VP8SetIntraUVMode() argument
314 it->mb_->uv_mode_ = mode; in VP8SetIntraUVMode()
317 void VP8SetSkip(const VP8EncIterator* const it, int skip) { in VP8SetSkip() argument
318 it->mb_->skip_ = skip; in VP8SetSkip()
321 void VP8SetSegment(const VP8EncIterator* const it, int segment) { in VP8SetSegment() argument
322 it->mb_->segment_ = segment; in VP8SetSegment()
364 void VP8IteratorStartI4(VP8EncIterator* const it) { in VP8IteratorStartI4() argument
365 const VP8Encoder* const enc = it->enc_; in VP8IteratorStartI4()
368 it->i4_ = 0; // first 4x4 sub-block in VP8IteratorStartI4()
369 it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[0]; in VP8IteratorStartI4()
373 it->i4_boundary_[i] = enc->y_left_[15 - i]; in VP8IteratorStartI4()
376 it->i4_boundary_[17 + i] = enc->y_top_[it->x_ * 16 + i]; in VP8IteratorStartI4()
379 if (it->x_ < enc->mb_w_ - 1) { in VP8IteratorStartI4()
381 it->i4_boundary_[17 + i] = enc->y_top_[it->x_ * 16 + i]; in VP8IteratorStartI4()
385 it->i4_boundary_[17 + i] = it->i4_boundary_[17 + 15]; in VP8IteratorStartI4()
388 VP8IteratorNzToBytes(it); // import the non-zero context in VP8IteratorStartI4()
391 int VP8IteratorRotateI4(VP8EncIterator* const it, in VP8IteratorRotateI4() argument
393 const uint8_t* const blk = yuv_out + VP8Scan[it->i4_]; in VP8IteratorRotateI4()
394 uint8_t* const top = it->i4_top_; in VP8IteratorRotateI4()
401 if ((it->i4_ & 3) != 3) { // if not on the right sub-blocks #3, #7, #11, #15 in VP8IteratorRotateI4()
411 ++it->i4_; in VP8IteratorRotateI4()
412 if (it->i4_ == 16) { // we're done in VP8IteratorRotateI4()
416 it->i4_top_ = it->i4_boundary_ + VP8TopLeftI4[it->i4_]; in VP8IteratorRotateI4()