How do I achieve lossless HEVC encoding on i.MX8M Plus VPU?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How do I achieve lossless HEVC encoding on i.MX8M Plus VPU?

Jump to solution
2,525 Views
gawarren
Contributor III

How do I achieve lossless HEVC encoding on i.MX8M Plus VPU?

0 Kudos
1 Solution
2,453 Views
joanxie
NXP TechSupport
NXP TechSupport

I don't think current vpu can support totally lossless HEVC, and I checked the IP spec, VC8000E VP9 has DCT feature, I don't find HEVC has such feature, you can control the performance through bit rate and QP

View solution in original post

5 Replies
2,520 Views
joanxie
NXP TechSupport
NXP TechSupport

current bsp has unit test for hevc encoding, try to use the command:

./unit_tests/VPU/hantro/vc8000e_hevcenc -[options] -i inputfile

2,511 Views
gawarren
Contributor III

Using the test script, I'm noting no changes in output file size when I change the crf param in the unit test:

./vc8000e_hevcenc -w 1920 -h 1080 -R1 -crf 51 -i teststream.yuv

0 Kudos
2,514 Views
gawarren
Contributor III

Thank you, this is a good starting place. I'd like to use the imx-vpuwrap library to integrate the vpu into my custom environment. Is it possible to perform lossless encoding from here?

 

Using Constant Rate Factor (CRF) control mode with crf=0 should work; however, setting these values in the vpuwrap library does not take effect. The parameters I'm adjusting are VCEncConfig.ctbRcMode and VCEncRateCtrl.crf, as defined in the hevcencapi.h file.

0 Kudos
2,470 Views
gawarren
Contributor III

crf mode isn't implemented: Solved: Re: Is crf rate mode implemented in vc8000e vpu? - NXP Community

I used qpHdr instead, but the image was not lossless

0 Kudos
2,454 Views
joanxie
NXP TechSupport
NXP TechSupport

I don't think current vpu can support totally lossless HEVC, and I checked the IP spec, VC8000E VP9 has DCT feature, I don't find HEVC has such feature, you can control the performance through bit rate and QP