Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

File size difference CQP mode between 8-bit and 10-bit QuickSync H.265 #1980

Closed
ukmark62 opened this issue Feb 21, 2020 · 3 comments
Closed
Assignees
Labels

Comments

@ukmark62
Copy link

ukmark62 commented Feb 21, 2020

Hi again!

I'm noticing a huge discrepancy in file size between 8-bit and 10-bit QuickSync H.265 encoding using default CQP (Constant QP) mode. (I tried this with both the "QSVEnc" (https://github.com/rigaya/QSVEnc/) and "Handbrake" programs and the same issue was present in both). Both these programs make use of the Intel Media SDK API for QuickSync encoding.

I did approximately a 5-minute video test where the only difference was changing the video profile from "main" to "main10". The 10-bit file was over 5 times the size of the 8-bit file!!! (approx 525Mb vs 100Mb). Also, this ratio was the same if I used "fixed-function" CQP encoding. The correct file size should be around 100Mb.

I've never seen such a difference in file size. Can you test this? Looks like some issue with the CQP encoding method and 10-bit H.265 in QuickSync.

Logs are below showing the command used in QSVEnc, where the only difference was changing the "main" profile to "main10".

8-bit log:-
------------------- Video encoding using QSVEnc 3.31 -------------------

D:\StaxRip\Apps\Encoders\QSVEnc\QSVEncC64.exe --avhw --codec hevc --quality best --profile main --cqp 24:26:27 -i "input.mkv" -o "output.hevc"

B pyramid on IvyBridge generation might cause artifacts, please check your encoded video.
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 3.31 (r1738) by rigaya, Feb 20 2020 11:51:27 (VC 1916/Win/avx2)
OS Windows 10 x64 (18363)
CPU Info Intel Core i7-1065G7 @ 1.30GHz [TB: 3.89GHz] (4C/8T)
GPU Info Intel Iris(R) Plus Graphics (64EU) 300-1100MHz [15W] (26.20.100.7870)
Media SDK QuickSyncVideo (hardware encoder) PG, 1st GPU, API v1.31
Async Depth 6 frames
Buffer Memory d3d9, 1 input buffer, 33 work buffer
Input Info avqsv: H.264/AVC, 1280x536, 24000/1001 fps
AVSync cfr
Output HEVC main @ Level 3.1
1280x536p 1:1 23.976fps (24000/1001fps)
Target usage 1 - best
Encode Mode Constant QP (CQP)
CQP Value I:24 P:26 B:27
QP Limit min: none, max: none
Trellis Auto
Ref frames 3 frames
Bframes 3 frames, B-pyramid: on
Max GOP Length 240 frames
Ext. Features WeightP WeightB QPOffset tskip ctu:64 sao:all
encoded 8105 frames, 76.69 fps, 2550.85 kbps, 102.79 MB
encode time 0:01:45, CPU: 9.5, GPU: 97.0, VD: 19.0
frame type IDR 1
frame type I 35, total size 1.22 MB
frame type P 2026, total size 44.95 MB
frame type B 6045, total size 56.62 MB

Start: 16:12:05
End: 16:13:52
Duration: 00:01:46

10-bit log:-
------------------- Video encoding using QSVEnc 3.31 -------------------

D:\StaxRip\Apps\Encoders\QSVEnc\QSVEncC64.exe --avhw --codec hevc --quality best --profile main10 --cqp 24:26:27 -i "input.mkv" -o "output.hevc"

B pyramid on IvyBridge generation might cause artifacts, please check your encoded video.
cop3.DirectBiasAdjustment value changed off -> auto by driver
cop3.GlobalMotionBiasAdjustment value changed off -> auto by driver
QSVEncC (x64) 3.31 (r1738) by rigaya, Feb 20 2020 11:51:27 (VC 1916/Win/avx2)
OS Windows 10 x64 (18363)
CPU Info Intel Core i7-1065G7 @ 1.30GHz [TB: 3.89GHz] (4C/8T)
GPU Info Intel Iris(R) Plus Graphics (64EU) 300-1100MHz [15W] (26.20.100.7870)
Media SDK QuickSyncVideo (hardware encoder) PG, 1st GPU, API v1.31
Async Depth 6 frames
Buffer Memory d3d9, 1 input buffer, 33 work buffer
Input Info avqsv: H.264/AVC, 1280x536, 24000/1001 fps
VPP Enabled ColorFmtConvertion: nv12 -> p010
AVSync cfr
Output HEVC main10 @ Level 3.1
1280x536p 1:1 23.976fps (24000/1001fps)
Target usage 1 - best
Encode Mode Constant QP (CQP)
CQP Value I:24 P:26 B:27
QP Limit min: none, max: none
Trellis Auto
Ref frames 3 frames
Bframes 3 frames, B-pyramid: on
Max GOP Length 240 frames
Ext. Features WeightP WeightB QPOffset tskip ctu:64 sao:all
encoded 8105 frames, 53.56 fps, 13102.75 kbps, 528.02 MB
encode time 0:02:31, CPU: 9.3, GPU: 97.1, VD: 14.0
frame type IDR 1
frame type I 35, total size 4.74 MB
frame type P 2026, total size 196.54 MB
frame type B 6045, total size 326.74 MB

Start: 16:16:56
End: 16:19:28
Duration: 00:02:32

@ukmark62 ukmark62 changed the title File size difference CQP mode between 8-bit and 10-bit QuickSync H.265 [windows] File size difference CQP mode between 8-bit and 10-bit QuickSync H.265 Feb 21, 2020
@ukmark62
Copy link
Author

Tried with a different input file and the findings are the same - 10-bit is anywhere from 5 to 6 times larger than 8-bit.

@lakulako
Copy link
Contributor

Hi @ukmark62,
To get similar size for 10 bit QPs should be increased by 12 relative to 8 bit case.
Msdk extends QP range to the higher QP values [1; 51+6*(bits-8)].

@ukmark62
Copy link
Author

ukmark62 commented Feb 25, 2020

Thanks for getting back.

@lakulako - So the extended range for 10-bit is 1-63?
The equivalent 10-bit QP is 35 for 8-bit QP of 23 etc?

I'll close this issue.

@dmitryermilov dmitryermilov changed the title [windows] File size difference CQP mode between 8-bit and 10-bit QuickSync H.265 File size difference CQP mode between 8-bit and 10-bit QuickSync H.265 Feb 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants