-1

As x.265 encoder produces reconstructed yuv video file after decoding and I know, in open source x.265 encoder you input raw yuv video and it generates HEVC file for you along with reconstructed YUV file.

My question is, can I input HEVC file directly to produce reconstructed yuv file? If yes, how?

  • What is wrong in this question? Can anybody explain this negative comment? There is already very less information available on internet about HEVC and you are discouraging new comers. – Muhammad Abu Bakr Mar 01 '17 at 21:49

3 Answers3

0

X.265 is the encoder of HEVC, not a decoder. you can use ffmpeg or openHEVC to decoder HEVC stream.

xiangjian Wu
  • 116
  • 1
  • 1
  • 8
0

x.265 encoder produces reconstructed yuv video file after decoding

[..]

it generates HEVC file for you along with reconstructed YUV file

Let me clear this up a bit. Yes, x265 (and other encoders) can create a YUV file during encoding. However, it's not for decoding purposes. It's for debugging purposes. The purpose of an encoder is to create a video stream that can be decoded by a decoder. In order to do that, the encoder and decoder need to agree on an intermediary exchange format, i.e. the standardized bitstream format.

This might seem obvious - in this case, I mean HEVC - but you have to understand that encoders (and decoders) can have bugs. How do you find these bugs? You test! How do you test? You look at the bitstream generated by the encoder, and the YUV representation that the encoder believes the decoder would have created while decoding. And then you decode the file using an independent decoder, and check that the 2 YUV files are identical.

The important thing here is that the encoder didn't actually decode it. Rather, the YUV is the actual internal bitmap representation that the encoder believes should be reconstructed by a decoder given the block/mode choices specified in the bitstream. The encoder never decoded. It just reconstructed the bitmap as it believes the decoder would have done, and then encoded the reconstruction information in the bitstream. (And for reference frames, the bitmap is then used as a target reference for subsequently encoded frames.)

Ronald S. Bultje
  • 10,828
  • 26
  • 47
0

No. You can not input HEVC file directly to HEVC encoder as encoders does not have any entropy decoding modules(It includes other decoding modules such as motion compensation, IDCT, Inverse Qunat etc). But entire point of the encoder is to encode raw video to HEVC bit stream. Instead you can provide HEVC stream to a HEVC decoder and get the exact same reconstructed YUV. Bit-matching encoder reconstructed YUV with the decoded YUV from the standard decoder ensures proper working of the encoder

prashanthns
  • 339
  • 2
  • 12