-
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
vvc_sao: Move accelerated HEVC SAO assembly code to VVC #53
Conversation
Hi @zackerthescar , thank you |
Closed by accident, sorry. |
Added vvc_sao checks for checkasm. Revealed some issues, to say the least. In the avx2 case, SAO band filter passes completely, but none of the edge filters pass.
I'm pretty sure that's why I'm getting the artifacts on the output file. |
this will do the mprg4 encode. Please use |
could you help debug why it's mismatched? |
|
Yep, working on this right now. Hoping to debug this soon. I will post the results w/ no encoder running soon. |
This is due to the fact that HEVC's SAO filter declares the source pointers const. I already have a build that doesn't have these pointers const'ed, and I will push it as soon as possible. |
@zackerthescar , we are close to the GSOC deadline. thank you. |
I have added commit 4104b68 which removes the code to initialize the AVX2-accelerated edge functions. This allows I have written up a GSoC proposal and will submit it soon, within the next few hours. Update:
Thanks. |
.vscode/settings.json
Outdated
@@ -0,0 +1,5 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we do not need this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was something automatically added by vscode. Removed in my rebase.
libavcodec/x86/vvcdsp_init.c
Outdated
@@ -120,19 +120,17 @@ static void alf_filter_chroma_8_avx2(uint8_t *dst, ptrdiff_t dst_stride, const u | |||
c->alf.filter[CHROMA] = alf_filter_chroma_##depth##_avx2; \ | |||
} while (0) | |||
|
|||
#define SAO_BAND_FILTER_FUNCS(bitd, opt) \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do not need to change this. how about we rebase and combine this with other commit
Sorry about the delay, I've been busy with some schoolwork. I've rebased and force-pushed only the needed changes based on your comments.
has been done. Thanks. |
Hi @zackerthescar , AVX2:
|
Hi, sorry for the late reply. I was able to confirm that I'm guessing this is due to the fact that we have 9 pointers in VVC (vvcdsp.h) versus 5 in HEVC (hevcdsp.h) Perhaps we need more widths beyond |
Hi @zackerthescar , |
Sorry for the late reply. As far as I know, the same code for 64x64 block in HEVC is faster in AVX2 than C.
This is why I believe that not populating the rest of the pointers is causing the issue. What are all of VVC's supported block sizes? I can't seem to find that in the ITU document... |
why hevc uses sse2 and vvc uses avx2? |
Seems to be a copy-paste error on my part (copy-pasted the wrong line). Will update the results when I get back home. I'll try to make functions for all corresponding CTU sizes until 128x128, see if that helps. |
Successfully moved accelerated HEVC SAO assembly code to VVC. Both assembly files are essentially untouched from the HEVC SAO code, other than changing function names. This hasn't been tested yet, but compiles and if issue #45 is correct, should run just fine.
Function pointers are initialized to the exact index as they are in
x86/hevcdsp_init.c
. Hopefullyhevcdsp.c
fills in the other function pointers or this will segfault.