Lines Matching refs:bw

187 static void PutSegmentHeader(VP8BitWriter* const bw,  in PutSegmentHeader()  argument
191 if (VP8PutBitUniform(bw, (hdr->num_segments_ > 1))) { in PutSegmentHeader()
195 VP8PutBitUniform(bw, hdr->update_map_); in PutSegmentHeader()
196 if (VP8PutBitUniform(bw, update_data)) { in PutSegmentHeader()
198 VP8PutBitUniform(bw, 1); // (segment_feature_mode = 1. Paragraph 9.3.) in PutSegmentHeader()
200 VP8PutSignedBits(bw, enc->dqm_[s].quant_, 7); in PutSegmentHeader()
203 VP8PutSignedBits(bw, enc->dqm_[s].fstrength_, 6); in PutSegmentHeader()
208 if (VP8PutBitUniform(bw, (proba->segments_[s] != 255u))) { in PutSegmentHeader()
209 VP8PutBits(bw, proba->segments_[s], 8); in PutSegmentHeader()
217 static void PutFilterHeader(VP8BitWriter* const bw, in PutFilterHeader() argument
220 VP8PutBitUniform(bw, hdr->simple_); in PutFilterHeader()
221 VP8PutBits(bw, hdr->level_, 6); in PutFilterHeader()
222 VP8PutBits(bw, hdr->sharpness_, 3); in PutFilterHeader()
223 if (VP8PutBitUniform(bw, use_lf_delta)) { in PutFilterHeader()
226 if (VP8PutBitUniform(bw, need_update)) { in PutFilterHeader()
228 VP8PutBits(bw, 0, 4); in PutFilterHeader()
230 VP8PutSignedBits(bw, hdr->i4x4_lf_delta_, 6); in PutFilterHeader()
231 VP8PutBits(bw, 0, 3); // all others unused in PutFilterHeader()
237 static void PutQuant(VP8BitWriter* const bw, in PutQuant() argument
239 VP8PutBits(bw, enc->base_quant_, 7); in PutQuant()
240 VP8PutSignedBits(bw, enc->dq_y1_dc_, 4); in PutQuant()
241 VP8PutSignedBits(bw, enc->dq_y2_dc_, 4); in PutQuant()
242 VP8PutSignedBits(bw, enc->dq_y2_ac_, 4); in PutQuant()
243 VP8PutSignedBits(bw, enc->dq_uv_dc_, 4); in PutQuant()
244 VP8PutSignedBits(bw, enc->dq_uv_ac_, 4); in PutQuant()
267 VP8BitWriter* const bw = &enc->bw_; in GeneratePartition0() local
271 pos1 = VP8BitWriterPos(bw); in GeneratePartition0()
272 if (!VP8BitWriterInit(bw, mb_size * 7 / 8)) { // ~7 bits per macroblock in GeneratePartition0()
275 VP8PutBitUniform(bw, 0); // colorspace in GeneratePartition0()
276 VP8PutBitUniform(bw, 0); // clamp type in GeneratePartition0()
278 PutSegmentHeader(bw, enc); in GeneratePartition0()
279 PutFilterHeader(bw, &enc->filter_hdr_); in GeneratePartition0()
280 VP8PutBits(bw, enc->num_parts_ == 8 ? 3 : in GeneratePartition0()
283 PutQuant(bw, enc); in GeneratePartition0()
284 VP8PutBitUniform(bw, 0); // no proba update in GeneratePartition0()
285 VP8WriteProbas(bw, &enc->proba_); in GeneratePartition0()
286 pos2 = VP8BitWriterPos(bw); in GeneratePartition0()
288 VP8BitWriterFinish(bw); in GeneratePartition0()
290 pos3 = VP8BitWriterPos(bw); in GeneratePartition0()
297 if (bw->error_) { in GeneratePartition0()
313 VP8BitWriter* const bw = &enc->bw_; in VP8EncWrite() local
327 VP8BitWriterSize(bw) + in VP8EncWrite()
353 const uint8_t* const part0 = VP8BitWriterBuf(bw); in VP8EncWrite()
354 const size_t size0 = VP8BitWriterSize(bw); in VP8EncWrite()
358 VP8BitWriterWipeOut(bw); // will free the internal buffer. in VP8EncWrite()