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 27th May 2024, 06:07   #121  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
How entropy works in HEVC, like input is output of Quantization, like how this data converts into bins how it varies to each value and output is constant ?
KarthikTdk is offline   Reply With Quote
Old 27th May 2024, 07:22   #122  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,094
The entropy coding in HEVC is CABAC = Context-adaptive binary arithmetic coding, a specific variant of the general Arithmetic coding.

For more details, you may need to be able to read the source code.
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 31st May 2024, 05:20   #123  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Types of frames in HEVC

Basically we have 3 frames in hevc, I, P, B frames
Initially it take 1st frames as I FRAME , and next p or b
Is this right?
And please tell me order of frame execution and is b frame is supported
And where can get source code of HEVC.
Thank you 🙏.
KarthikTdk is offline   Reply With Quote
Old 31st May 2024, 11:33   #124  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,094
Yes, B frames are supported.
I frames exist in two variants: IDR (Intraframe with Decoder Reset) to start a GOP, and intermediate Intraframes for single frames with very different content compared to surrounding frames, so the decoding of P and B frames may skip that one (but they are displayed, just not referenced by other frames)
Reference sources: https://vcgit.hhi.fraunhofer.de/jvet/HM
Reference documents: https://hevc.hhi.fraunhofer.de/
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid

Last edited by LigH; 31st May 2024 at 11:38.
LigH is offline   Reply With Quote
Old 1st June 2024, 00:53   #125  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
Quote:
Originally Posted by KarthikTdk View Post
Basically we have 3 frames in hevc, I, P, B frames
Initially it take 1st frames as I FRAME , and next p or b
Is this right?
And please tell me order of frame execution and is b frame is supported
And where can get source code of HEVC.
Thank you 🙏.
We also have Reference B-frames and non-reference b-frames.

And the new x265 version supports multiple hierarchies of B-frames.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 3rd June 2024, 05:23   #126  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Thanks you for replying @benwaggoner and LigH and
Can i get source code in verilog Or c languages
Thank you!
KarthikTdk is offline   Reply With Quote
Old 3rd June 2024, 05:36   #127  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
After I frame done we go with p and b frame after that again I FRAME will come again?
If it will come then when like at which conditions!
Thank you!
KarthikTdk is offline   Reply With Quote
Old 3rd June 2024, 06:33   #128  |  Link
rwill
Registered User
 
Join Date: Dec 2013
Location: Berlin, Germany
Posts: 396
@KarthikTdk: I think you are way in over your head.
__________________
My github...
rwill is offline   Reply With Quote
Old 3rd June 2024, 10:10   #129  |  Link
lvqcl
Registered User
 
Join Date: Aug 2015
Posts: 309
Quote:
Originally Posted by KarthikTdk View Post
Basically I am working on this protocol
What protocol?
lvqcl is online now   Reply With Quote
Old 3rd June 2024, 10:13   #130  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Quote:
Originally Posted by lvqcl View Post
what protocol?
h265/hevc
KarthikTdk is offline   Reply With Quote
Old 3rd June 2024, 15:11   #131  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,094
Quote:
Originally Posted by KarthikTdk View Post
Can i get source code in verilog Or c languages
I already posted you the link to "Reference sources" at Fraunhofer, they are in C/C++.

And highly optimized and enhanced sources for the x265 encoder in C/C++ and Assembler are available from Multicoreware's Bitbucket; more info at https://www.x265.org/
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 3rd June 2024, 18:45   #132  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,878
Quote:
Originally Posted by LigH View Post
And highly optimized and enhanced sources for the x265 encoder in C/C++ and Assembler are available from Multicoreware's Bitbucket; more info at https://www.x265.org/
And for practical performance, you'll want to be using a version optimized for a given architecture with lots of SIMD usage. ARM and x86 performance are nearly equivalent these days, and there's some decent POWER support as well.

The reference encoders is, charitably, glacially slow.
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Old 17th June 2024, 10:34   #133  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Hi there,
How to identify 1st frame and last frame in H265
Thank you in advance.
KarthikTdk is offline   Reply With Quote
Old 17th June 2024, 13:30   #134  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,675
Run an indexer on the file, like LWLibavVideoSource.
A .lwi file is generated. It tells the offsets of all frames.
An example:
Index=0,POS=0,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=1,Pic=1,POC=0,Repeat=1,Field=0
Index=0,POS=49499,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=0,Pic=2,POC=4,Repeat=1,Field=0
until
Index=0,POS=23035292,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=0,Pic=3,POC=1731,Repeat=1,Field=0

The last frame: You want to look for ....POS=23035292

Example file size was 21,9 MB (23.048.192 Bytes)
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 17th June 2024 at 13:32.
Emulgator is offline   Reply With Quote
Old 18th June 2024, 05:13   #135  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Quote:
Originally Posted by Emulgator View Post
Run an indexer on the file, like LWLibavVideoSource.
A .lwi file is generated. It tells the offsets of all frames.
An example:
Index=0,POS=0,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=1,Pic=1,POC=0,Repeat=1,Field=0
Index=0,POS=49499,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=0,Pic=2,POC=4,Repeat=1,Field=0
until
Index=0,POS=23035292,PTS=-9223372036854775808,DTS=-9223372036854775808,EDI=0
Key=0,Pic=3,POC=1731,Repeat=1,Field=0

The last frame: You want to look for ....POS=23035292

Example file size was 21,9 MB (23.048.192 Bytes)
Hi thanks for explaining
Can u tell me again, I didn't get.
KarthikTdk is offline   Reply With Quote
Old 18th June 2024, 10:51   #136  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 7,094
You do not analyse the video stream yourself. You let a smart indexer containing decades of experience do that and then parse the index file it created.

Indexing a media file with MPEG HEVC video is quite complex. It depends at first on whether the video stream is contained in a container, so you would have to demultiplex that container first to get the raw video stream. And raw HEVC video streams would have to be parsed sequentially, from the beginning to the end, byte by byte, if you do not already know some smarter approach (e.g. using GOP index chunks in containers which do have some, like ISO Media, e.g. MP4).
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 20th June 2024, 10:55   #137  |  Link
KarthikTdk
Registered User
 
Join Date: May 2024
Posts: 9
Thanks for your answers
I have another doubt regarding
Intra mode decision
What is the formula used, and anyone know about mode gradient value calculation.

Thank you in advance.
KarthikTdk is offline   Reply With Quote
Reply

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 22:27.


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