-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HEVCe] RC method forced to CBR with HRD param, overwrites previous RC method #865
Comments
@Xiaogang-Li , HRD parameter should be valid with other BRC mode, such as VBR, should not just set it to CBR |
This is a work around for intel-media-driver bug intel/media-driver#865 This driver will force the BRC to CBR for HEVCe when it parses the HRD params. Thus, any BRC method submitted in the BRC params prior to parsing the HRD params will be lost. Therefore, VBR can't be effectively enabled if BRC params precede the HRD params. To work around this issue, set the HRD params before the BRC params so the driver will parse BRC "after" HRD params.
@Xiaogang-Li any progress on fixing this? |
@uartie Sorry for late response. HRD should not limited to CBR, will correct it ASAP. |
This is a workaround for intel-media-driver bug intel/media-driver#865 The driver will force the RC method to CBR for HEVCe when it parses the HRD param. Thus, any RC method param submitted "prior" to the HRD param will be lost. Therefore, VBR, ICQ and QVBR for HEVCe can't be effectively enabled if the RC method param "precedes" the HRD param. To work around this issue, set the HRD param before the RC method param so the driver will parse the RC method param "after" the HRD param. Afaict, other codecs in the driver (and other drivers) do not appear to be dependent on the order of HRD and RC param submission.
Hi @uartie, could you provide several test cases to us, then we can validate it. |
We added a workaround in gstreamer-vaapi to temporarily fix this (https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/307). Unfortunately, the workaround does not seem to fix issue #723 (so that must be a different bug). In order to test a driver level fix for this bug, you will want to revert gstreamer-vaapi
...without any fix/workaround, the above results are something like this:
Also, without a fix/workaround, you can try setting different vaapih265enc |
Thank you. |
Do you have a link to the new code? |
Not yet, we are in the internal review. It should not take more time. |
@uartie This issue is fixed, please help to check it on your side. |
Please point me to the commit/PR that fixes this please! |
Confirmed this is fixed by d9ce426 |
media-driver/media_driver/linux/common/codec/ddi/media_ddi_encode_hevc.cpp
Lines 1023 to 1030 in dad4030
Based on the behavior in 1 thru 4, HEVC encoding with gst-vaapi will always use CBR in driver when user sets rate-control to any method != CQP. If ICQ/QVBR was requested, this causes ICQ quality setting to be ignored in the codechal. Also, this causes same encode output when user requests either QVBR or VBR.
QVBR/ICQ are added in gst-vaapi at https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/292
The text was updated successfully, but these errors were encountered: