-
Notifications
You must be signed in to change notification settings - Fork 12
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
8-bit AVX2 MC HV* Optimisations #234
Comments
Also the HEVC decoder uses AVX2 for the 4-tap HV32 but not the 8-tap, perhaps we'd want to add the patch below? diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index 2c0fca303e..ca9ee4d60c 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -184,6 +184,7 @@ FW_EPEL_HV(16, 10, avx2)
FW_QPEL(32, 8, avx2)
FW_QPEL(16, 10, avx2)
+FW_QPEL_HV(32, 8, avx2)
FW_QPEL_HV(16, 10, avx2)
#endif |
Hi @frankplow , thank you for the issue. thank you |
Hi. What is the error shown when applying this patch? |
There are no error messages, the patch causes mismatches in the checkasm and conformance suite. In other words, these optimisations do not perform the same operation as their C equivalents. |
Sorry my bad. I mean what is the error shown by checkasm? Can you paste them here? |
It only shows that there is a mismatch for these functions:
|
@QSXW could you help check? |
Sorry, recently I got stuck with some personal errands. I'm back now and I will check it by two days. |
The hevc actually doesn't use the hv32, where there may have some issue to make them disable the usage of hv32, which means it cannot be used by vvc as well directly. The hv32 avx2 algorithm doesn't exist. It is only used to make that |
I'm not sure I understand entirely how the HV32 algorithm doesn't exist? What is the code run by, for example, In any case, if it is not trivial to fix/write assembly optimisations for these functions, would you agree the best way forward is to modify |
The author of hevc asm just doesn't write an available hv32 assembly code. The symbol of hv32_8_avx2 there are just used to make the compilation successful actually.
I think it will be difficult to modify the MC_REP_FUNCS_AVX2, so the former author adds a faker entry of hv32 there. And, I think the compiler will strip the unused symbols. |
The functions
ff_h2656_put_(uni_)?{4,8}tap_hv32_8_avx2
are defined inlibavcodec/x86/h26x/h2656_inter.asm
. They are used directly in the HEVC decoder, and also indirectly to define optimisations for larger sizesff_h2656_put_(uni_)?{4,8}tap_hv{64,128}_8_avx2
, using the helpermc_rep_func
.None of these functions are currently used in the VVC decoder. As HEVC does not have size-128 CUs, the size-128 functions are not used anywhere. The patch below updates the VVC decoder to use these optimisations.
Unfortunately, applying this patch results in checkasm and the conformance bitstreams failing. It appears that there is some difference between HEVC and VVC that is not being accounted for. The problem is specific to 8-bit HV; 8-bit H and V functions and HV functions for >= 10-bit are already in use and work correctly.
The text was updated successfully, but these errors were encountered: