38 f(1, ten_or_twelve_bit);
39 vp9->
bit_depth = current->ten_or_twelve_bit ? 12 : 10;
50 fixed(1, reserved_zero, 0);
52 infer(subsampling_x, 1);
53 infer(subsampling_y, 1);
58 infer(subsampling_x, 0);
59 infer(subsampling_y, 0);
60 fixed(1, reserved_zero, 0);
76 f(16, frame_width_minus_1);
77 f(16, frame_height_minus_1);
79 vp9->
frame_width = current->frame_width_minus_1 + 1;
95 f(1, render_and_frame_size_different);
97 if (current->render_and_frame_size_different) {
98 f(16, render_width_minus_1);
99 f(16, render_height_minus_1);
112 fs(1, found_ref[
i], 1,
i);
113 if (current->found_ref[
i]) {
115 &vp9->
ref[current->ref_frame_idx[
i]];
145 f(1, is_filter_switchable);
146 if (!current->is_filter_switchable)
147 f(2, raw_interpolation_filter_type);
157 f(6, loop_filter_level);
158 f(3, loop_filter_sharpness);
160 f(1, loop_filter_delta_enabled);
161 if (current->loop_filter_delta_enabled) {
162 f(1, loop_filter_delta_update);
163 if (current->loop_filter_delta_update) {
165 fs(1, update_ref_delta[
i], 1,
i);
166 if (current->update_ref_delta[
i])
167 ss(6, loop_filter_ref_deltas[
i], 1,
i);
169 for (
i = 0;
i < 2;
i++) {
170 fs(1, update_mode_delta[
i], 1,
i);
171 if (current->update_mode_delta[
i])
172 ss(6, loop_filter_mode_deltas[
i], 1,
i);
197 static const uint8_t segmentation_feature_bits[
VP9_SEG_LVL_MAX] = { 8, 6, 2, 0 };
198 static const uint8_t segmentation_feature_signed[
VP9_SEG_LVL_MAX] = { 1, 1, 0, 0 };
202 f(1, segmentation_enabled);
204 if (current->segmentation_enabled) {
205 f(1, segmentation_update_map);
206 if (current->segmentation_update_map) {
207 for (
i = 0;
i < 7;
i++)
208 prob(segmentation_tree_probs[
i], 1,
i);
209 f(1, segmentation_temporal_update);
210 for (
i = 0;
i < 3;
i++) {
211 if (current->segmentation_temporal_update)
212 prob(segmentation_pred_prob[
i], 1,
i);
214 infer(segmentation_pred_prob[
i], 255);
218 f(1, segmentation_update_data);
219 if (current->segmentation_update_data) {
220 f(1, segmentation_abs_or_delta_update);
223 fs(1, feature_enabled[
i][j], 2,
i, j);
224 if (current->feature_enabled[
i][j] &&
225 segmentation_feature_bits[j]) {
226 fs(segmentation_feature_bits[j],
227 feature_value[
i][j], 2,
i, j);
228 if (segmentation_feature_signed[j])
229 fs(1, feature_sign[
i][j], 2,
i, j);
231 infer(feature_sign[
i][j], 0);
233 infer(feature_value[
i][j], 0);
234 infer(feature_sign[
i][j], 0);
248 int min_log2_tile_cols, max_log2_tile_cols;
251 min_log2_tile_cols = 0;
253 ++min_log2_tile_cols;
254 max_log2_tile_cols = 0;
256 ++max_log2_tile_cols;
258 increment(tile_cols_log2, min_log2_tile_cols, max_log2_tile_cols);
273 f(1, profile_low_bit);
274 f(1, profile_high_bit);
275 vp9->
profile = (current->profile_high_bit << 1) + current->profile_low_bit;
277 fixed(1, reserved_zero, 0);
279 f(1, show_existing_frame);
280 if (current->show_existing_frame) {
281 f(3, frame_to_show_map_idx);
282 infer(header_size_in_bytes, 0);
283 infer(refresh_frame_flags, 0x00);
284 infer(loop_filter_level, 0);
290 f(1, error_resilient_mode);
298 infer(refresh_frame_flags, 0xff);
301 if (current->show_frame == 0)
306 if (current->error_resilient_mode == 0)
307 f(2, reset_frame_context);
309 infer(reset_frame_context, 0);
311 if (current->intra_only == 1) {
317 infer(color_space, 1);
318 infer(subsampling_x, 1);
319 infer(subsampling_y, 1);
326 f(8, refresh_frame_flags);
331 f(8, refresh_frame_flags);
334 fs(3, ref_frame_idx[
i], 1,
i);
340 f(1, allow_high_precision_mv);
345 if (current->error_resilient_mode == 0) {
346 f(1, refresh_frame_context);
347 f(1, frame_parallel_decoding_mode);
349 infer(refresh_frame_context, 0);
350 infer(frame_parallel_decoding_mode, 1);
353 f(2, frame_context_idx);
360 f(16, header_size_in_bytes);
363 if (current->refresh_frame_flags & (1 <<
i)) {
375 "subsample %dx%d bit_depth %d tiles %dx%d.\n",
378 vp9->
bit_depth, 1 << current->tile_cols_log2,
379 1 << current->tile_rows_log2);
388 fixed(1, zero_bit, 0);
412 HEADER(
"Superframe Index");
414 f(3, superframe_marker);
415 f(2, bytes_per_framesize_minus_1);
416 f(3, frames_in_superframe_minus_1);
418 for (
i = 0;
i <= current->frames_in_superframe_minus_1;
i++) {
420 fle(8 * (current->bytes_per_framesize_minus_1 + 1),
424 f(3, superframe_marker);
425 f(2, bytes_per_framesize_minus_1);
426 f(3, frames_in_superframe_minus_1);