DASH Media Packaging SDK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
vp9_parser.cc
1 // Copyright 2015 Google Inc. All rights reserved.
2 //
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file or at
5 // https://developers.google.com/open-source/licenses/bsd
6 
7 #include "packager/media/filters/vp9_parser.h"
8 
9 #include "packager/base/logging.h"
10 #include "packager/media/base/bit_reader.h"
11 #include "packager/media/base/rcheck.h"
12 
13 namespace shaka {
14 namespace media {
15 namespace {
16 
17 const uint32_t VP9_FRAME_MARKER = 2;
18 const uint32_t VP9_SYNC_CODE = 0x498342;
19 const uint32_t REFS_PER_FRAME = 3;
20 const uint32_t REF_FRAMES_LOG2 = 3;
21 const uint32_t REF_FRAMES = (1 << REF_FRAMES_LOG2);
22 const uint32_t FRAME_CONTEXTS_LOG2 = 2;
23 const uint32_t MAX_REF_LF_DELTAS = 4;
24 const uint32_t MAX_MODE_LF_DELTAS = 2;
25 const uint32_t QINDEX_BITS = 8;
26 const uint32_t MAX_SEGMENTS = 8;
27 const uint32_t SEG_TREE_PROBS = (MAX_SEGMENTS - 1);
28 const uint32_t PREDICTION_PROBS = 3;
29 const uint32_t SEG_LVL_MAX = 4;
30 const uint32_t MI_SIZE_LOG2 = 3;
31 const uint32_t MI_BLOCK_SIZE_LOG2 = (6 - MI_SIZE_LOG2); // 64 = 2^6
32 const uint32_t MIN_TILE_WIDTH_B64 = 4;
33 const uint32_t MAX_TILE_WIDTH_B64 = 64;
34 
35 const bool SEG_FEATURE_DATA_SIGNED[SEG_LVL_MAX] = {true, true, false, false};
36 const uint32_t SEG_FEATURE_DATA_MAX_BITS[SEG_LVL_MAX] = {8, 6, 2, 0};
37 
38 enum VpxColorSpace {
39  VPX_COLOR_SPACE_UNKNOWN = 0,
40  VPX_COLOR_SPACE_BT_601 = 1,
41  VPX_COLOR_SPACE_BT_709 = 2,
42  VPX_COLOR_SPACE_SMPTE_170 = 3,
43  VPX_COLOR_SPACE_SMPTE_240 = 4,
44  VPX_COLOR_SPACE_BT_2020 = 5,
45  VPX_COLOR_SPACE_RESERVED = 6,
46  VPX_COLOR_SPACE_SRGB = 7,
47 };
48 
49 uint32_t RoundupShift(uint32_t value, uint32_t n) {
50  return (value + (1 << n) - 1) >> n;
51 }
52 
53 // Number of MI-units (8*8).
54 uint32_t GetNumMiUnits(uint32_t pixels) {
55  return RoundupShift(pixels, MI_SIZE_LOG2);
56 }
57 
58 // Number of sb64 (64x64) blocks per mi_units.
59 uint32_t GetNumBlocks(uint32_t mi_units) {
60  return RoundupShift(mi_units, MI_BLOCK_SIZE_LOG2);
61 }
62 
63 uint32_t GetMinLog2TileCols(uint32_t sb64_cols) {
64  uint32_t min_log2 = 0;
65  while ((MAX_TILE_WIDTH_B64 << min_log2) < sb64_cols)
66  ++min_log2;
67  return min_log2;
68 }
69 
70 uint32_t GetMaxLog2TileCols(uint32_t sb64_cols) {
71  uint32_t max_log2 = 1;
72  while ((sb64_cols >> max_log2) >= MIN_TILE_WIDTH_B64)
73  ++max_log2;
74  return max_log2 - 1;
75 }
76 
77 void GetTileNBits(uint32_t mi_cols,
78  uint32_t* min_log2_tile_cols,
79  uint32_t* max_log2_tile_cols) {
80  const uint32_t sb64_cols = GetNumBlocks(mi_cols);
81  *min_log2_tile_cols = GetMinLog2TileCols(sb64_cols);
82  *max_log2_tile_cols = GetMaxLog2TileCols(sb64_cols);
83  CHECK_LE(*min_log2_tile_cols, *max_log2_tile_cols);
84 }
85 
86 // Parse superframe index if it is a superframe. Fill |vpx_frames| with the
87 // frames information, which contains the sizes of the frames indicated in
88 // superframe index if it is a superframe; otherwise it should contain one
89 // single frame with |data_size| as frame size.
90 bool ParseIfSuperframeIndex(const uint8_t* data,
91  size_t data_size,
92  std::vector<VPxFrameInfo>* vpx_frames) {
93  vpx_frames->clear();
94  uint8_t superframe_marker = data[data_size - 1];
95  VPxFrameInfo vpx_frame;
96  if ((superframe_marker & 0xe0) != 0xc0) {
97  // This is not a super frame. There should be only one frame.
98  vpx_frame.frame_size = data_size;
99  vpx_frames->push_back(vpx_frame);
100  return true;
101  }
102 
103  const size_t num_frames = (superframe_marker & 0x07) + 1;
104  const size_t frame_size_length = ((superframe_marker >> 3) & 0x03) + 1;
105  // Two maker bytes + frame sizes.
106  const size_t index_size = 2 + num_frames * frame_size_length;
107 
108  if (data_size < index_size) {
109  LOG(ERROR) << "This chunk is marked as having a superframe index but "
110  "doesn't have enough data for it.";
111  return false;
112  }
113  const uint8_t superframe_marker2 = data[data_size - index_size];
114  if (superframe_marker2 != superframe_marker) {
115  LOG(ERROR) << "This chunk is marked as having a superframe index but "
116  "doesn't have the matching marker byte at the front of the "
117  "index.";
118  return false;
119  }
120  VLOG(3) << "Superframe num_frames=" << num_frames
121  << " frame_size_length=" << frame_size_length;
122 
123  data += data_size - index_size + 1;
124  size_t total_frame_sizes = 0;
125  for (size_t i = 0; i < num_frames; ++i) {
126  vpx_frame.frame_size = 0;
127  for (size_t i = 0; i < frame_size_length; ++i) {
128  vpx_frame.frame_size |= *data << (i * 8);
129  ++data;
130  }
131  total_frame_sizes += vpx_frame.frame_size;
132  vpx_frames->push_back(vpx_frame);
133  }
134  if (total_frame_sizes + index_size != data_size) {
135  LOG(ERROR) << "Data size (" << data_size
136  << ") does not match with sum of frame sizes ("
137  << total_frame_sizes << ") + index_size (" << index_size << ")";
138  return false;
139  }
140  return true;
141 }
142 
143 bool ReadProfile(BitReader* reader, VPCodecConfiguration* codec_config) {
144  uint8_t bit[2];
145  RCHECK(reader->ReadBits(1, &bit[0]));
146  RCHECK(reader->ReadBits(1, &bit[1]));
147  uint8_t profile = bit[0] | (bit[1] << 1);
148  if (profile == 3) {
149  bool reserved;
150  RCHECK(reader->ReadBits(1, &reserved));
151  RCHECK(!reserved);
152  }
153  codec_config->set_profile(profile);
154  return true;
155 }
156 
157 bool ReadSyncCode(BitReader* reader) {
158  uint32_t sync_code;
159  RCHECK(reader->ReadBits(24, &sync_code));
160  return sync_code == VP9_SYNC_CODE;
161 }
162 
163 VPCodecConfiguration::ColorSpace GetColorSpace(uint8_t color_space) {
164  switch (color_space) {
165  case VPX_COLOR_SPACE_UNKNOWN:
166  return VPCodecConfiguration::COLOR_SPACE_UNSPECIFIED;
167  case VPX_COLOR_SPACE_BT_601:
168  return VPCodecConfiguration::COLOR_SPACE_BT_601;
169  case VPX_COLOR_SPACE_BT_709:
170  return VPCodecConfiguration::COLOR_SPACE_BT_709;
171  case VPX_COLOR_SPACE_SMPTE_170:
172  return VPCodecConfiguration::COLOR_SPACE_SMPTE_170;
173  case VPX_COLOR_SPACE_SMPTE_240:
174  return VPCodecConfiguration::COLOR_SPACE_SMPTE_240;
175  case VPX_COLOR_SPACE_BT_2020:
176  // VP9 does not specify if it is in the form of “constant luminance” or
177  // “non-constant luminance”. As such, application should rely on the
178  // signaling outside of VP9 bitstream. If there is no such signaling,
179  // application may assume non-constant luminance for BT.2020.
180  return VPCodecConfiguration::COLOR_SPACE_BT_2020_NON_CONSTANT_LUMINANCE;
181  case VPX_COLOR_SPACE_SRGB:
182  return VPCodecConfiguration::COLOR_SPACE_SRGB;
183  default:
184  LOG(WARNING) << "Unknown color space: " << static_cast<int>(color_space);
185  return VPCodecConfiguration::COLOR_SPACE_UNSPECIFIED;
186  }
187 }
188 
189 VPCodecConfiguration::ChromaSubsampling GetChromaSubsampling(
190  uint8_t subsampling) {
191  switch (subsampling) {
192  case 0:
193  return VPCodecConfiguration::CHROMA_444;
194  case 1:
195  return VPCodecConfiguration::CHROMA_440;
196  case 2:
197  return VPCodecConfiguration::CHROMA_422;
198  case 3:
199  // VP9 assumes that chrome samples are collocated with luma samples if
200  // there is no explicit signaling outside of VP9 bitstream.
201  return VPCodecConfiguration::CHROMA_420_COLLOCATED_WITH_LUMA;
202  default:
203  LOG(WARNING) << "Unexpected chroma subsampling value: "
204  << static_cast<int>(subsampling);
205  return VPCodecConfiguration::CHROMA_420_COLLOCATED_WITH_LUMA;
206  }
207 }
208 
209 bool ReadBitDepthAndColorSpace(BitReader* reader,
210  VPCodecConfiguration* codec_config) {
211  uint8_t bit_depth = 8;
212  if (codec_config->profile() >= 2) {
213  bool use_vpx_bits_12;
214  RCHECK(reader->ReadBits(1, &use_vpx_bits_12));
215  bit_depth = use_vpx_bits_12 ? 12 : 10;
216  }
217  codec_config->set_bit_depth(bit_depth);
218 
219  uint8_t color_space;
220  RCHECK(reader->ReadBits(3, &color_space));
221  codec_config->set_color_space(GetColorSpace(color_space));
222 
223  bool yuv_full_range = false;
224  auto chroma_subsampling = VPCodecConfiguration::CHROMA_444;
225  if (color_space != VPX_COLOR_SPACE_SRGB) {
226  RCHECK(reader->ReadBits(1, &yuv_full_range));
227 
228  if (codec_config->profile() & 1) {
229  uint8_t subsampling;
230  RCHECK(reader->ReadBits(2, &subsampling));
231  chroma_subsampling = GetChromaSubsampling(subsampling);
232  if (chroma_subsampling ==
233  VPCodecConfiguration::CHROMA_420_COLLOCATED_WITH_LUMA) {
234  LOG(ERROR) << "4:2:0 color not supported in profile "
235  << codec_config->profile();
236  return false;
237  }
238 
239  bool reserved;
240  RCHECK(reader->ReadBits(1, &reserved));
241  RCHECK(!reserved);
242  } else {
243  chroma_subsampling =
244  VPCodecConfiguration::CHROMA_420_COLLOCATED_WITH_LUMA;
245  }
246  } else {
247  // Assume 4:4:4 for colorspace SRGB.
248  chroma_subsampling = VPCodecConfiguration::CHROMA_444;
249  if (codec_config->profile() & 1) {
250  bool reserved;
251  RCHECK(reader->ReadBits(1, &reserved));
252  RCHECK(!reserved);
253  } else {
254  LOG(ERROR) << "4:4:4 color not supported in profile 0 or 2.";
255  return false;
256  }
257  }
258  codec_config->set_video_full_range_flag(yuv_full_range);
259  codec_config->set_chroma_subsampling(chroma_subsampling);
260 
261  VLOG(3) << "\n profile " << static_cast<int>(codec_config->profile())
262  << "\n bit depth " << static_cast<int>(codec_config->bit_depth())
263  << "\n color space " << static_cast<int>(codec_config->color_space())
264  << "\n full_range "
265  << static_cast<int>(codec_config->video_full_range_flag())
266  << "\n chroma subsampling "
267  << static_cast<int>(codec_config->chroma_subsampling());
268  return true;
269 }
270 
271 bool ReadFrameSize(BitReader* reader, uint32_t* width, uint32_t* height) {
272  RCHECK(reader->ReadBits(16, width));
273  *width += 1; // Off by 1.
274  RCHECK(reader->ReadBits(16, height));
275  *height += 1; // Off by 1.
276  return true;
277 }
278 
279 bool ReadDisplayFrameSize(BitReader* reader,
280  uint32_t* display_width,
281  uint32_t* display_height) {
282  bool has_display_size;
283  RCHECK(reader->ReadBits(1, &has_display_size));
284  if (has_display_size)
285  RCHECK(ReadFrameSize(reader, display_width, display_height));
286  return true;
287 }
288 
289 bool ReadFrameSizes(BitReader* reader, uint32_t* width, uint32_t* height) {
290  uint32_t new_width;
291  uint32_t new_height;
292  RCHECK(ReadFrameSize(reader, &new_width, &new_height));
293  if (new_width != *width) {
294  VLOG(1) << "Width updates from " << *width << " to " << new_width;
295  *width = new_width;
296  }
297  if (new_height != *height) {
298  VLOG(1) << "Height updates from " << *height << " to " << new_height;
299  *height = new_height;
300  }
301 
302  uint32_t display_width = *width;
303  uint32_t display_height = *height;
304  RCHECK(ReadDisplayFrameSize(reader, &display_width, &display_height));
305  return true;
306 }
307 
308 bool ReadFrameSizesWithRefs(BitReader* reader,
309  uint32_t* width,
310  uint32_t* height) {
311  bool found = false;
312  for (uint32_t i = 0; i < REFS_PER_FRAME; ++i) {
313  RCHECK(reader->ReadBits(1, &found));
314  if (found)
315  break;
316  }
317  if (!found) {
318  RCHECK(ReadFrameSizes(reader, width, height));
319  } else {
320  uint32_t display_width;
321  uint32_t display_height;
322  RCHECK(ReadDisplayFrameSize(reader, &display_width, &display_height));
323  }
324  return true;
325 }
326 
327 bool ReadLoopFilter(BitReader* reader) {
328  RCHECK(reader->SkipBits(9)); // filter_evel, sharness_level
329  bool mode_ref_delta_enabled;
330  RCHECK(reader->ReadBits(1, &mode_ref_delta_enabled));
331  if (!mode_ref_delta_enabled)
332  return true;
333  bool mode_ref_delta_update;
334  RCHECK(reader->ReadBits(1, &mode_ref_delta_update));
335  if (!mode_ref_delta_update)
336  return true;
337 
338  for (uint32_t i = 0; i < MAX_REF_LF_DELTAS + MAX_MODE_LF_DELTAS; ++i)
339  RCHECK(reader->SkipBitsConditional(true, 6 + 1));
340  return true;
341 }
342 
343 bool ReadQuantization(BitReader* reader) {
344  RCHECK(reader->SkipBits(QINDEX_BITS));
345  // Skip delta_q bits.
346  for (uint32_t i = 0; i < 3; ++i)
347  RCHECK(reader->SkipBitsConditional(true, 4 + 1));
348  return true;
349 }
350 
351 bool ReadSegmentation(BitReader* reader) {
352  bool enabled;
353  RCHECK(reader->ReadBits(1, &enabled));
354  if (!enabled)
355  return true;
356 
357  bool update_map;
358  RCHECK(reader->ReadBits(1, &update_map));
359  if (update_map) {
360  for (uint32_t i = 0; i < SEG_TREE_PROBS; ++i)
361  RCHECK(reader->SkipBitsConditional(true, 8));
362 
363  bool temporal_update;
364  RCHECK(reader->ReadBits(1, &temporal_update));
365  if (temporal_update) {
366  for (uint32_t j = 0; j < PREDICTION_PROBS; ++j)
367  RCHECK(reader->SkipBitsConditional(true, 8));
368  }
369  }
370 
371  bool update_data;
372  RCHECK(reader->ReadBits(1, &update_data));
373  if (update_data) {
374  RCHECK(reader->SkipBits(1)); // abs_delta
375  for (uint32_t i = 0; i < MAX_SEGMENTS; ++i) {
376  for (uint32_t j = 0; j < SEG_LVL_MAX; ++j) {
377  bool feature_enabled;
378  RCHECK(reader->ReadBits(1, &feature_enabled));
379  if (feature_enabled) {
380  RCHECK(reader->SkipBits(SEG_FEATURE_DATA_MAX_BITS[j]));
381  if (SEG_FEATURE_DATA_SIGNED[j])
382  RCHECK(reader->SkipBits(1)); // signness
383  }
384  }
385  }
386  }
387  return true;
388 }
389 
390 bool ReadTileInfo(uint32_t width, BitReader* reader) {
391  uint32_t mi_cols = GetNumMiUnits(width);
392 
393  uint32_t min_log2_tile_cols;
394  uint32_t max_log2_tile_cols;
395  GetTileNBits(mi_cols, &min_log2_tile_cols, &max_log2_tile_cols);
396  uint32_t max_ones = max_log2_tile_cols - min_log2_tile_cols;
397 
398  uint32_t log2_tile_cols = min_log2_tile_cols;
399  while (max_ones--) {
400  bool has_more;
401  RCHECK(reader->ReadBits(1, &has_more));
402  if (!has_more)
403  break;
404  ++log2_tile_cols;
405  }
406  RCHECK(log2_tile_cols <= 6);
407 
408  RCHECK(reader->SkipBitsConditional(true, 1)); // log2_tile_rows
409  return true;
410 }
411 
412 } // namespace
413 
414 VP9Parser::VP9Parser() : width_(0), height_(0) {}
415 VP9Parser::~VP9Parser() {}
416 
417 bool VP9Parser::Parse(const uint8_t* data,
418  size_t data_size,
419  std::vector<VPxFrameInfo>* vpx_frames) {
420  DCHECK(data);
421  DCHECK(vpx_frames);
422  RCHECK(ParseIfSuperframeIndex(data, data_size, vpx_frames));
423 
424  for (auto& vpx_frame : *vpx_frames) {
425  VLOG(4) << "process frame with size " << vpx_frame.frame_size;
426  BitReader reader(data, vpx_frame.frame_size);
427  uint8_t frame_marker;
428  RCHECK(reader.ReadBits(2, &frame_marker));
429  RCHECK(frame_marker == VP9_FRAME_MARKER);
430 
431  RCHECK(ReadProfile(&reader, writable_codec_config()));
432 
433  bool show_existing_frame;
434  RCHECK(reader.ReadBits(1, &show_existing_frame));
435  if (show_existing_frame) {
436  RCHECK(reader.SkipBits(3)); // ref_frame_index
437  // End of current frame data. There should be no more bytes available.
438  RCHECK(reader.bits_available() < 8);
439 
440  vpx_frame.is_keyframe = false;
441  vpx_frame.uncompressed_header_size = vpx_frame.frame_size;
442  vpx_frame.width = width_;
443  vpx_frame.height = height_;
444  continue;
445  }
446 
447  bool is_interframe;
448  RCHECK(reader.ReadBits(1, &is_interframe));
449  vpx_frame.is_keyframe = !is_interframe;
450 
451  bool show_frame;
452  RCHECK(reader.ReadBits(1, &show_frame));
453  bool error_resilient_mode;
454  RCHECK(reader.ReadBits(1, &error_resilient_mode));
455 
456  if (vpx_frame.is_keyframe) {
457  RCHECK(ReadSyncCode(&reader));
458  RCHECK(ReadBitDepthAndColorSpace(&reader, writable_codec_config()));
459  RCHECK(ReadFrameSizes(&reader, &width_, &height_));
460  } else {
461  bool intra_only = false;
462  if (!show_frame)
463  RCHECK(reader.ReadBits(1, &intra_only));
464  if (!error_resilient_mode)
465  RCHECK(reader.SkipBits(2)); // reset_frame_context
466 
467  if (intra_only) {
468  RCHECK(ReadSyncCode(&reader));
469  if (codec_config().profile() > 0) {
470  RCHECK(ReadBitDepthAndColorSpace(&reader, writable_codec_config()));
471  } else {
472  // NOTE: The intra-only frame header does not include the
473  // specification of either the color format or color sub-sampling in
474  // profile 0. VP9 specifies that the default color format should be
475  // YUV 4:2:0 in this case (normative).
476  writable_codec_config()->set_chroma_subsampling(
477  VPCodecConfiguration::CHROMA_420_COLLOCATED_WITH_LUMA);
478  writable_codec_config()->set_bit_depth(8);
479  }
480 
481  RCHECK(reader.SkipBits(REF_FRAMES)); // refresh_frame_flags
482  RCHECK(ReadFrameSizes(&reader, &width_, &height_));
483  } else {
484  RCHECK(reader.SkipBits(REF_FRAMES)); // refresh_frame_flags
485  RCHECK(reader.SkipBits(REFS_PER_FRAME * (REF_FRAMES_LOG2 + 1)));
486 
487  // TODO(kqyang): We may need to actually build the refs to extract the
488  // correct width and height for the current frame. The width will be
489  // used later in ReadTileInfo.
490  RCHECK(ReadFrameSizesWithRefs(&reader, &width_, &height_));
491 
492  RCHECK(reader.SkipBits(1)); // allow_high_precision_mv
493 
494  bool interp_filter;
495  RCHECK(reader.ReadBits(1, &interp_filter));
496  if (!interp_filter)
497  RCHECK(reader.SkipBits(2)); // more interp_filter
498  }
499  }
500 
501  if (!error_resilient_mode) {
502  RCHECK(reader.SkipBits(1)); // refresh_frame_context
503  RCHECK(reader.SkipBits(1)); // frame_parallel_decoding_mode
504  }
505  RCHECK(reader.SkipBits(FRAME_CONTEXTS_LOG2)); // frame_context_idx
506 
507  VLOG(4) << "bits read before ReadLoopFilter: " << reader.bit_position();
508  RCHECK(ReadLoopFilter(&reader));
509  RCHECK(ReadQuantization(&reader));
510  RCHECK(ReadSegmentation(&reader));
511  RCHECK(ReadTileInfo(width_, &reader));
512 
513  uint16_t header_size;
514  RCHECK(reader.ReadBits(16, &header_size));
515  vpx_frame.uncompressed_header_size =
516  vpx_frame.frame_size - reader.bits_available() / 8;
517  vpx_frame.width = width_;
518  vpx_frame.height = height_;
519 
520  VLOG(3) << "\n frame_size: " << vpx_frame.frame_size
521  << "\n uncompressed_header_size: "
522  << vpx_frame.uncompressed_header_size
523  << "\n bits read: " << reader.bit_position()
524  << "\n header_size: " << header_size;
525 
526  RCHECK(header_size > 0);
527  RCHECK(header_size * 8 <= reader.bits_available());
528 
529  data += vpx_frame.frame_size;
530  }
531  return true;
532 }
533 
534 bool VP9Parser::IsKeyframe(const uint8_t* data, size_t data_size) {
535  BitReader reader(data, data_size);
536  uint8_t frame_marker;
537  RCHECK(reader.ReadBits(2, &frame_marker));
538  RCHECK(frame_marker == VP9_FRAME_MARKER);
539 
541  RCHECK(ReadProfile(&reader, &codec_config));
542 
543  bool show_existing_frame;
544  RCHECK(reader.ReadBits(1, &show_existing_frame));
545  if (show_existing_frame)
546  return false;
547 
548  bool is_interframe;
549  RCHECK(reader.ReadBits(1, &is_interframe));
550  if (is_interframe)
551  return false;
552 
553  RCHECK(reader.SkipBits(2)); // show_frame, error_resilient_mode.
554 
555  RCHECK(ReadSyncCode(&reader));
556  return true;
557 }
558 
559 } // namespace media
560 } // namespace shaka
static bool IsKeyframe(const uint8_t *data, size_t data_size)
Definition: vp9_parser.cc:534
A class to read bit streams.
Definition: bit_reader.h:17
const VPCodecConfiguration & codec_config() const
Definition: vpx_parser.h:44
bool Parse(const uint8_t *data, size_t data_size, std::vector< VPxFrameInfo > *vpx_frames) override
Definition: vp9_parser.cc:417
bool ReadBits(int num_bits, T *out)
Definition: bit_reader.h:35
int bits_available() const
Definition: bit_reader.h:76
bool SkipBits(int num_bits)
Definition: bit_reader.cc:24
int bit_position() const
Definition: bit_reader.h:81
Class for parsing or writing VP codec configuration data.