Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Video 如何使用Ldecod计算H264宏块长度,类似于Vega的计算方法?_Video_H.264_Decoder - Fatal编程技术网

Video 如何使用Ldecod计算H264宏块长度,类似于Vega的计算方法?

Video 如何使用Ldecod计算H264宏块长度,类似于Vega的计算方法?,video,h.264,decoder,Video,H.264,Decoder,是否有人安装了Ldecod H264参考解码器来计算宏块大小?是的,我安装了,具体到单个宏块元素QP、MVs、系数等。这是多年前的事了,所以它基于Ldecod JM13.2 不管怎么说,至少在JM13.2中,这里是需要研究的领域 在image.c中,解码一个片段 希望这会有所帮助,就像我说的,我没有看过最新的JM解码器,所以这些东西中有很多可能已经改变了,但实际上,使用比JM 13.2更早的版本可能会更容易。如果您不使用high profile或FRExt,早期的代码库就不那么复杂了 void

是否有人安装了Ldecod H264参考解码器来计算宏块大小?

是的,我安装了,具体到单个宏块元素QP、MVs、系数等。这是多年前的事了,所以它基于Ldecod JM13.2

不管怎么说,至少在JM13.2中,这里是需要研究的领域

在image.c中,解码一个片段

希望这会有所帮助,就像我说的,我没有看过最新的JM解码器,所以这些东西中有很多可能已经改变了,但实际上,使用比JM 13.2更早的版本可能会更容易。如果您不使用high profile或FRExt,早期的代码库就不那么复杂了

void decode_one_slice(struct img_par *img,struct inp_par *inp)
{
  .
  .
  .
  .
  // added mb_start_bits, mb_end_bits, and mb_bits[] to dec_picture (StorablePicture)
  while (end_of_slice == FALSE) // loop over macroblocks
  {
      start_macroblock(&currMB, img, img->current_mb_nr);
      if (active_pps->entropy_coding_mode_flag)
      {
          //save start bit count
          dec_picture->mb_start_bits = img->currentSlice->partArr[0].bitstream->read_len*8 - img->currentSlice->partArr[0].de_cabac.DbitsLeft+1;
      }
      else
      {
          dec_picture->mb_start_bits = img->currentSlice->partArr[0].bitstream->frame_bitoffset;
      }
      .
      .
      .
      .
      //then at bottom of MB loop
      if (active_pps->entropy_coding_mode_flag)
          dec_picture->mb_end_bits = img->currentSlice->partArr[0].bitstream->read_len*8 - img->currentSlice->partArr[0].de_cabac.DbitsLeft+1;
      else
          dec_picture->mb_end_bits = img->currentSlice->partArr[0].bitstream->frame_bitoffset;

      dec_picture->mb_bits[img->current_mb_nr] = dec_picture->mb_end_bits-dec_picture->mb_start_bits;
  }
  .
  .
  .
  .
}