Lines Matching refs:vlc
123 static unsigned vp9_u(struct vl_vlc *vlc, unsigned n)
125 unsigned valid = vl_vlc_valid_bits(vlc);
131 vl_vlc_fillbits(vlc);
133 return vl_vlc_get_uimsbf(vlc, n);
136 static signed vp9_s(struct vl_vlc *vlc, unsigned n)
141 v = vp9_u(vlc, n);
142 s = vp9_u(vlc, 1);
147 static void bitdepth_colorspace_sampling(struct vl_vlc *vlc, unsigned profile)
153 vp9_u(vlc, 1);
155 cs = vp9_u(vlc, 3);
158 vp9_u(vlc, 1);
161 static void frame_size(struct vl_vlc *vlc)
164 vp9_u(vlc, 16);
166 vp9_u(vlc, 16);
169 if (vp9_u(vlc, 1)) {
171 vp9_u(vlc, 16);
173 vp9_u(vlc, 16);
179 struct vl_vlc vlc;
185 vl_vlc_init(&vlc, 1, (const void * const*)&buf->data,
189 if (vp9_u(&vlc, 2) != 0x2)
192 profile = vp9_u(&vlc, 1) | vp9_u(&vlc, 1) << 1;
195 profile += vp9_u(&vlc, 1);
201 if (vp9_u(&vlc, 1))
204 frame_type = vp9_u(&vlc, 1);
205 show_frame = vp9_u(&vlc, 1);
206 error_resilient_mode = vp9_u(&vlc, 1);
210 if (vp9_u(&vlc, 24) != 0x498342)
213 bitdepth_colorspace_sampling(&vlc, profile);
214 frame_size(&vlc);
218 intra_only = show_frame ? 0 : vp9_u(&vlc, 1);
221 vp9_u(&vlc, 2);
225 if (vp9_u(&vlc, 24) != 0x498342)
228 bitdepth_colorspace_sampling(&vlc, profile);
230 vp9_u(&vlc, 8);
231 frame_size(&vlc);
234 vp9_u(&vlc, 8);
238 vp9_u(&vlc, 3);
239 vp9_u(&vlc, 1);
243 size_in_refs = vp9_u(&vlc, 1);
250 vp9_u(&vlc, 16);
251 vp9_u(&vlc, 16);
254 if (vp9_u(&vlc, 1)) {
256 vp9_u(&vlc, 16);
257 vp9_u(&vlc, 16);
261 vp9_u(&vlc, 1);
263 if (!vp9_u(&vlc, 1))
265 vp9_u(&vlc, 2);
270 vp9_u(&vlc, 1);
272 vp9_u(&vlc, 1);
275 vp9_u(&vlc, 2);
280 vp9_u(&vlc, 6);
282 vp9_u(&vlc, 3);
284 mode_ref_delta_enabled = vp9_u(&vlc, 1);
286 mode_ref_delta_update = vp9_u(&vlc, 1);
290 if (vp9_u(&vlc, 1))
292 vp9_s(&vlc, 6);
296 if (vp9_u(&vlc, 1))
298 vp9_s(&vlc, 6);
307 context->desc.vp9.picture_parameter.base_qindex = vp9_u(&vlc, 8);
308 context->desc.vp9.picture_parameter.y_dc_delta_q = vp9_u(&vlc, 1) ? vp9_s(&vlc, 4) : 0;
309 context->desc.vp9.picture_parameter.uv_ac_delta_q = vp9_u(&vlc, 1) ? vp9_s(&vlc, 4) : 0;
310 context->desc.vp9.picture_parameter.uv_dc_delta_q = vp9_u(&vlc, 1) ? vp9_s(&vlc, 4) : 0;
315 if (!vp9_u(&vlc, 1))
319 if (vp9_u(&vlc, 1)) {
322 if (vp9_u(&vlc, 1)) {
324 vp9_u(&vlc, 8);
329 if (vp9_u(&vlc, 1)) {
332 if (vp9_u(&vlc, 1))
334 vp9_u(&vlc, 8);
340 if (vp9_u(&vlc, 1)) {
342 context->desc.vp9.picture_parameter.abs_delta = vp9_u(&vlc, 1);
345 if ((context->desc.vp9.slice_parameter.seg_param[i].alt_quant_enabled = vp9_u(&vlc, 1)))
346 context->desc.vp9.slice_parameter.seg_param[i].alt_quant = vp9_s(&vlc, 8);
348 if ((context->desc.vp9.slice_parameter.seg_param[i].alt_lf_enabled = vp9_u(&vlc, 1)))
349 context->desc.vp9.slice_parameter.seg_param[i].alt_lf = vp9_s(&vlc, 6);
351 if (vp9_u(&vlc, 1))
352 vp9_u(&vlc, 2);
354 vp9_u(&vlc, 1);