Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > High Efficiency Video Coding (HEVC)

Reply
 
Thread Tools Search this Thread Display Modes
Old 11th April 2019, 14:10   #21  |  Link
Asilurr
Registered User
 
Join Date: Jan 2019
Posts: 9
A couple of tests on video content generated from still images.

#1 Lenna (preview: wikipedia.org/wiki/File:Lenna_(test_image).png; download: lenna.org), 512x512 RBG24 converted to 8-bit 4:4:4.
x264vs || relative filesize 100.0%
x265vs || 104.7%

#2 M87* (preview: wikipedia.org/wiki/File:Black_hole_-_Messier_87.jpg; download: eso.org/public/archives/images/original/eso1907a.tif), 7416x4320 RGB48 converted to 3708x2160 10-bit 4:4:4. Do note that the original TIFF is a gargantuan 183 MB file.
x264vs || 100.0%
x264f || 100.8%
x265vs || 103.2%
x265f || 104.2%
Asilurr is offline   Reply With Quote
Old 12th April 2019, 09:10   #22  |  Link
gdgsdg123
Registered User
 
Join Date: Mar 2019
Posts: 8
Quote:
Originally Posted by benwaggoner View Post
HEVC in particular has intraframe prediction and other advanced tools that should squeeze even more bits out.

They aren’t all on even in —preset placebo, though! Using —cu-lossless and —tskip can help improve efficiency and quality of near-lossless encoding. Cu-lossless allows any given CTU to use lossless mode if it is more efficient; real lossless is just using that for the whole frame.
The docs give somewhat different opinion.





About --tskip:
Quote:
Lossless — x265 documentation

Transform Skip
A somewhat related feature, --tskip tells the encoder to evaluate transform-skip (bypass DCT but with quantization still enabled) when coding small 4x4 transform blocks. This feature is intended to improve the coding efficiency of screen content (aka: text on a screen) and is not really intended for lossless coding. This feature should only be enabled if the content has a lot of very sharp edges in it, and is mostly unrelated to lossless coding.

About --cu-lossless:
Quote:
Command Line Options — x265 documentation

--cu-lossless, --no-cu-lossless
For each CU, evaluate lossless (transform and quant bypass) encode of the best non-lossless mode option as a potential rate distortion optimization. If the global option --lossless has been specified, all CUs will be encoded as lossless unconditionally regardless of whether this option was enabled. Default disabled.

Only effective at RD levels 3 and above, which perform RDO mode decisions.


And 1 thing I must emphasize... near-lossless = lossy.
gdgsdg123 is offline   Reply With Quote
Old 14th April 2019, 12:10   #23  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
Heavily filtered video might sometimes benefit from tskip, but natural video never will. And since x265 doesn't even implement the screen coding range extensions, the actual capabilities of tskip and other screen coding tunings are very nerfed.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 20th April 2019, 07:25   #24  |  Link
pookpooi
Registered User
 
pookpooi's Avatar
 
Join Date: Aug 2006
Location: Thailand
Posts: 8
The rumored Sony's new video codec XEVC which is based on HEVC version 2 claims 240Mbps peak bitrate lossless compressing 1920 x 1080, 12 bit depth, 24fps. I did a calculation and get 1:7.12 ratio.

source: https://www.eoshd.com/2018/12/sonys-...aw-at-240mbit/
pookpooi is offline   Reply With Quote
Old 22nd April 2019, 23:53   #25  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,928
Quote:
Originally Posted by pookpooi View Post
The rumored Sony's new video codec XEVC which is based on HEVC version 2 claims 240Mbps peak bitrate lossless compressing 1920 x 1080, 12 bit depth, 24fps. I did a calculation and get 1:7.12 ratio.

source: https://www.eoshd.com/2018/12/sonys-...aw-at-240mbit/
Visually lossless at that rate is certainly feasible, but mathematically lossless is impossible unless they're doing some sort of prefiltering.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 16th July 2019, 13:00   #26  |  Link
gdgsdg123
Registered User
 
Join Date: Mar 2019
Posts: 8
Quote:
Originally Posted by poisondeathray View Post
FFV1 (in interframe mode)...
Hmm?..
Quote:
FFV1 Video Codec Specification

The FFV1 video codec is a simple and efficient lossless intra-frame only codec.


Quote:
Originally Posted by poisondeathray View Post
If source has identical content, duplicate frames, then lagarith can be better (null frame option)
I doubt it.

As Lagarith is sort of an old outdated codec... And more advanced codecs (like x264, x265) should have implemented similar capabilities in the algorithms.
gdgsdg123 is offline   Reply With Quote
Old 1st August 2019, 01:49   #27  |  Link
gdgsdg123
Registered User
 
Join Date: Mar 2019
Posts: 8
Quote:
Originally Posted by poisondeathray View Post
If source has identical content, duplicate frames, then lagarith can be better (null frame option)
You might be correct... See this.
gdgsdg123 is offline   Reply With Quote
Old 1st August 2019, 02:15   #28  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,874
Quote:
Originally Posted by gdgsdg123 View Post
Hmm?..

Quote:
FFV1 Video Codec Specification

The FFV1 video codec is a simple and efficient lossless intra-frame only codec.
Scroll down


4.8.17 intra

intra indicates the relationship between frames. Inferred to be 0 if not present.
value relationship
0 frames are independent or dependent (keyframes and non keyframes)
1 frames are independent (keyframes only)
Other reserved for future use



https://trac.ffmpeg.org/wiki/Encode/FFV1
GOP size -g integer >= 1 For archival use, GOP-size should be "1".







Quote:

I doubt it.

As Lagarith is sort of an old outdated codec... And more advanced codecs (like x264, x265) should have implemented similar capabilities in the algorithms.
Yes, but null frames is a special case with pure duplicates . And it's an intra codec, usually compression is worse on typical content


eg.

blankclip(length=1000, width=1280,height=720, pixel_type="YV12")

ie. 1001 blank frames, 1280x720 , 24fps, YUV 4:2:0

x264 --qp 0 mp4 container => 49.2kb
x264 --qp 0 --keyint 1001 mp4 container => 48.6kb
lagarith with null frames, avi container => 31.4kb



Quote:
Originally Posted by gdgsdg123 View Post
You might be correct... See this.

I have no idea what you're trying to say there

Maybe try google translate
poisondeathray is offline   Reply With Quote
Old 1st August 2019, 04:10   #29  |  Link
gdgsdg123
Registered User
 
Join Date: Mar 2019
Posts: 8
Quote:
Originally Posted by poisondeathray View Post
Quote:
Originally Posted by gdgsdg123 View Post
Hmm?..
Quote:
FFV1 Video Codec Specification

The FFV1 video codec is a simple and efficient lossless intra-frame only codec.
Scroll down
Quote:
4.8.17 intra
intra indicates the relationship between frames. Inferred to be 0 if not present.

valuerelationship
0    frames are independent or dependent (keyframes and non keyframes)
1    frames are independent (keyframes only)
Other reserved for future use

https://trac.ffmpeg.org/wiki/Encode/FFV1
GOP size -g integer >= 1 For archival use, GOP-size should be "1".
I doubt such behavior matches the definition of intra-frame only...



Quote:
Originally Posted by poisondeathray View Post
Quote:
Originally Posted by gdgsdg123 View Post
You might be correct... See this.
I have no idea what you're trying to say there

Maybe try google translate
Another time then...

Hint: Those numbers are file sizes in Bytes.
gdgsdg123 is offline   Reply With Quote
Old 2nd August 2019, 00:27   #30  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,928
Quote:
Originally Posted by gdgsdg123 View Post
You might be correct... See this.
Although skip frames in the elementary stream are also possible in H.265 and HEVC. I'm not sure if x265 will use those with IDR-only encoding. It could be a useful option to add.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 2nd August 2019, 02:13   #31  |  Link
gdgsdg123
Registered User
 
Join Date: Mar 2019
Posts: 8
Quote:
Originally Posted by benwaggoner View Post
Although skip frames in the elementary stream are also possible in H.265 and HEVC. I'm not sure if x265 will use those with IDR-only encoding. It could be a useful option to add.
Merging such duplicates would be almost the most obvious way in exploiting redundancy.

And for people who came up with: general compression, motion estimation, psycho-visual optimization... such state-of-the-art stuffs. There's no possibility that they ain't aware of this.



So?..
Quote:
On x264's Handling regards Consecutive Duplicate Frames

Conclusion

Absurd, isn't it?
Bewildered too at first... But then soon sort of understood its design language behind this seeming absurdity.
(To be continued...)
gdgsdg123 is offline   Reply With Quote
Old 6th August 2019, 17:15   #32  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 2,928
Quote:
Originally Posted by gdgsdg123 View Post
Merging such duplicates would be almost the most obvious way in exploiting redundancy.

And for people who came up with: general compression, motion estimation, psycho-visual optimization... such state-of-the-art stuffs. There's no possibility that they ain't aware of this.
Oh, I'm sure they do. But one advantage of a true skip frame is that it needed rest the maximum GOP duration encoder. So a 150 frame GOP could potentially encapsulate hundreds of playback frames in anime, for example.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Tags
lossless, x264, x265

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 19:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.