AVCSequenceParameterSetReader::readData() –

You appear to be a bot. Output may be restricted

Description

Usage

AVCSequenceParameterSetReader::readData();

Parameters

Returns

void

Source

File name: wordpress/wp-includes/ID3/module.audio-video.flv.php
Lines:

1 to 51 of 51
  public function readData() {
    $this->AVCSequenceParameterSetReader::skipBits(8);
    $this->AVCSequenceParameterSetReader::skipBits(8);
    $profile = $this->AVCSequenceParameterSetReader::getBits(8);                               // read profile
    if ($profile > 0) {
      $this->AVCSequenceParameterSetReader::skipBits(8);
      $level_idc = $this->AVCSequenceParameterSetReader::getBits(8);                         // level_idc
      $this->AVCSequenceParameterSetReader::expGolombUe();                                   // seq_parameter_set_id // sps
      $this->AVCSequenceParameterSetReader::expGolombUe();                                   // log2_max_frame_num_minus4
      $picOrderType = $this->AVCSequenceParameterSetReader::expGolombUe();                   // pic_order_cnt_type
      if ($picOrderType == 0) {
        $this->AVCSequenceParameterSetReader::expGolombUe();                               // log2_max_pic_order_cnt_lsb_minus4
      } elseif ($picOrderType == 1) {
        $this->AVCSequenceParameterSetReader::skipBits(1);                                 // delta_pic_order_always_zero_flag
        $this->AVCSequenceParameterSetReader::expGolombSe();                               // offset_for_non_ref_pic
        $this->AVCSequenceParameterSetReader::expGolombSe();                               // offset_for_top_to_bottom_field
        $num_ref_frames_in_pic_order_cnt_cycle = $this->AVCSequenceParameterSetReader::expGolombUe(); // num_ref_frames_in_pic_order_cnt_cycle
        for ($i = 0; $i < $num_ref_frames_in_pic_order_cnt_cycle; $i++) {
          $this->AVCSequenceParameterSetReader::expGolombSe();                           // offset_for_ref_frame[ i ]
        }
      }
      $this->AVCSequenceParameterSetReader::expGolombUe();                                   // num_ref_frames
      $this->AVCSequenceParameterSetReader::skipBits(1);                                     // gaps_in_frame_num_value_allowed_flag
      $pic_width_in_mbs_minus1 = $this->AVCSequenceParameterSetReader::expGolombUe();        // pic_width_in_mbs_minus1
      $pic_height_in_map_units_minus1 = $this->AVCSequenceParameterSetReader::expGolombUe(); // pic_height_in_map_units_minus1

      $frame_mbs_only_flag = $this->AVCSequenceParameterSetReader::getBits(1);               // frame_mbs_only_flag
      if ($frame_mbs_only_flag == 0) {
        $this->AVCSequenceParameterSetReader::skipBits(1);                                 // mb_adaptive_frame_field_flag
      }
      $this->AVCSequenceParameterSetReader::skipBits(1);                                     // direct_8x8_inference_flag
      $frame_cropping_flag = $this->AVCSequenceParameterSetReader::getBits(1);               // frame_cropping_flag

      $frame_crop_left_offset   = 0;
      $frame_crop_right_offset  = 0;
      $frame_crop_top_offset    = 0;
      $frame_crop_bottom_offset = 0;

      if ($frame_cropping_flag) {
        $frame_crop_left_offset   = $this->AVCSequenceParameterSetReader::expGolombUe();   // frame_crop_left_offset
        $frame_crop_right_offset  = $this->AVCSequenceParameterSetReader::expGolombUe();   // frame_crop_right_offset
        $frame_crop_top_offset    = $this->AVCSequenceParameterSetReader::expGolombUe();   // frame_crop_top_offset
        $frame_crop_bottom_offset = $this->AVCSequenceParameterSetReader::expGolombUe();   // frame_crop_bottom_offset
      }
      $this->AVCSequenceParameterSetReader::skipBits(1);                                     // vui_parameters_present_flag
      // etc

      $this->width  = (($pic_width_in_mbs_minus1 + 1) * 16) - ($frame_crop_left_offset * 2) - ($frame_crop_right_offset * 2);
      $this->height = ((2 - $frame_mbs_only_flag) * ($pic_height_in_map_units_minus1 + 1) * 16) - ($frame_crop_top_offset * 2) - ($frame_crop_bottom_offset * 2);
    }
  }
 

 View on GitHub View on Trac