2

I'm using x265 encoder for HEVC.

I have 3 different configurations. Have

  1. 4 B frames (B4)
  2. 2 B frames (B2)
  3. 0 B frames (B0 - all P frames)

Their encoding times are different.

B4 and B2 need much less encoding time than B0 that contains only P frames. Do you have any idea why?

Both P and B frames have equal QP using parameter --pbratio 1.0.

You can see the three different output files here using QP 36: B4, B2 and B0.

zinon
  • 4,427
  • 14
  • 70
  • 112

2 Answers2

0

You could argue that encoding B-frames is simpler because interpolating is simpler then extrapolating (as in the case of P-frames). Interpolating tends to give smaller errors then extrapolating, which reduces the amount of bits that needs to be encoded.

enter image description here

As for the results using the HM 15.0 reference software, this is reference software so performance is not the main priority. Quote from the HM software manual:

It is not meant to be a particularly efficient implementation of anything, and one may notice its apparent unsuitability for a particular use.

Pieter Meiresone
  • 1,910
  • 1
  • 22
  • 22
  • Thanks for your answer. This could be a possible explanation and since there are not many HEVC encoders available we don't have further comparisons. But can we justify the result for example in a journal paper using this argue as a justification? – zinon Mar 07 '16 at 10:07
  • I think "simpler" is not correct here. If you look at the motion estimation (ME), B-frames require to run the ME on at least 2 frames, while P-frames require only to run the ME on 1 frame. And ME is one of the most computationally complex parts of the encoder. The graph above might give an intuition why you need less bits for B-frames, but not why you need less time. You would need to look at the time spent on entropy encoding in both cases, to see if there is a significant difference. – damjeux Mar 08 '16 at 11:01
0

With the development of HEVC, B frames became more popular for general use and basically replaced P frames in all use cases.

My expectation is simply that the x265 developers just spend more time and effort on optimizing the fast coding algorithms of B pictures, because these are used in the default configuration.

Although HM uses some shortcuts, the encoding time basically increases linearly with the number of reference pictures.

karsten
  • 26
  • 2