Video Compression

VideoNerd

HEVC (Ver. 1) adopts two lossless modes:

  •          IPCM – actually ‘copy-paste’ mode (even not DPCM)
  •          Lossless Entropy

 

Lossless Entropy Mode

This mode is signaled by PPS parameter transquant_bypass_enabled_flag .

Lossless entropy mode is applied on CU-level, i.e. some CUs can be coded as lossless while the rest is coded in regular lossy manner. In some scenarion it might be useful to encode a region (e.g. Logo) in lossless entropy mode. If a CU is coded as entropy lossless this CUs is indeed identical copy of the original one since in-loop filters (Deblocking,SAO) are not applied on the pixels of  the CU (notice in-loop filters can modify pixels).

Technically the lossless entropy mode is performed by skipping transform and quantization phases,  only residuals are entropy coded.

It might seem the entropy lossless mode is less time consuming than regular lossy mode (because no transform, no quantization/de-quantization, no deblocking, no SAO). However, the lossless entropy mode produces much more bins and as a result CABAC tends to work much harder. It would not a surprise that lossless entropy mode would take more cycles than lossy one.

i conducted several tests with x265 and found that lossless entropy mode is about twice slower than regular lossy mode.

Remarks:

  • To enable the lossless entropy mode in x265 it’s necessary to type '--lossless' in the command line.
  • Another possibility is to use ffmpeg and to set ‘-crf 0’ :   ffmpeg -s 1920x1080 -i test.yuv -c:v libx265 -crf 0 -y output.h265
  • In lossless mode the bitrate is redundant since an encoder has no tool to control bitrate.
  • According to Fatih Kamisli (see the paper “LOSSLESS COMPRESSION IN HEVC WITH INTEGER-TO-INTEGER TRANSFORMS”, 2016),    HEVC Range Extensions (Ver. 2) provides RDPCM and other tools that improve the lossless compression coding efficiency by 5-10% and also reduce the encoding/decoding time or complexity by ~%10.
  • According to HEVC spec., only  QP=4 makes quantization truly lossless.

 

Philosophical Note:

In lossless compression you always should bear in mind the principle of pigeonholes. According to the principle of pigeonholes there is no universal tool which squeezes all NxN pictures. If you succeed with a tool to squeeze a subset of NxN pictures, then there necessarily exist pictures which your tool extends instead of compressing.

 

Note: lossless coding is sometimes called entropy coding.

 

24 Responses

  1. I’m not sure exactly why but this weblog is loading extremely slow for me. Is anyone else having this problem or is it a problem on my end? I’ll check back later and see if the problem still exists.

  2. Good site! I truly love how it is simple on my eyes and the data are well written. I am wondering how I might be notified when a new post has been made. I’ve subscribed to your feed which must do the trick! Have a nice day!

  3. Thanks for another great post. The place else could anyone get that type of info in such an ideal approach of writing? I’ve a presentation subsequent week, and I’m on the look for such information.

  4. Hello would you mind sharing which blog platform you’re working with? I’m looking to start my own blog soon but I’m having a difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique. P.S Sorry for being off-topic but I had to ask!

  5. A lot of thanks for your whole effort on this site. My mum take interest in making time for investigation and it is obvious why. We all notice all regarding the lively manner you offer rewarding thoughts on the website and as well cause participation from some other people on the subject so our princess has always been learning a lot of things. Take pleasure in the remaining portion of the new year. You have been performing a powerful job.

  6. Throughout this great design of things you actually get a B+ for hard work. Exactly where you actually confused everybody was in the specifics. You know, it is said, the devil is in the details… And that couldn’t be more accurate here. Having said that, permit me reveal to you exactly what did do the job. The text is definitely really convincing and this is most likely the reason why I am taking the effort in order to comment. I do not really make it a regular habit of doing that. Next, even though I can notice a jumps in logic you come up with, I am not confident of exactly how you seem to connect the points which make the actual final result. For the moment I will subscribe to your point however hope in the foreseeable future you actually link your dots better.

  7. I found your weblog web site on google and examine a couple of of your early posts. Proceed to maintain up the very good operate. I simply further up your RSS feed to my MSN News Reader. Looking for forward to reading extra from you later on!?

  8. Excellent beat ! I wish to apprentice while you amend your website, how can i subscribe for a blog site? The account helped me a acceptable deal. I had been tiny bit acquainted of this your broadcast offered bright clear idea

  9. Hello there, just became alert to your blog through Google, and found that it’s truly informative. I am going to be careful for brussels. I will appreciate should you proceed this in future. Numerous other folks can be benefited out of your writing. Cheers!

  10. Wonderful goods from you, man. I have understand your stuff previous to and you are just extremely wonderful. I really like what you have acquired here, certainly like what you are saying and the way in which you say it. You make it enjoyable and you still care for to keep it wise. I can’t wait to read far more from you. This is actually a tremendous site.

  11. I haven?t checked in here for some time because I thought it was getting boring, but the last several posts are great quality so I guess I?ll add you back to my daily bloglist. You deserve it my friend 🙂

  12. I like the helpful info you supply in your articles. I?ll bookmark your weblog and test again here frequently. I am fairly certain I will learn many new stuff proper right here! Best of luck for the next!

  13. I appreciate, cause I found just what I was looking for. You’ve ended my four day long hunt! God Bless you man. Have a great day. Bye

  14. naturally like your website however you need to take a look at the spelling on several of your posts. Many of them are rife with spelling problems and I in finding it very bothersome to tell the reality however I’ll definitely come again again.

Leave a Reply

Your email address will not be published. Required fields are marked *