ffvvc / FFmpeg

VVC Decoder for ffmpeg
Other
48 stars 12 forks source link

vvc_deblock.c: add checkasm cases for strong, one-side, weak, mixed, shift #241

Closed stone-d-chen closed 4 months ago

stone-d-chen commented 4 months ago

Add cases by iteratively setting maxlen{p, q} and shift.

randomize_chroma_buffers() now takes both buffers and a parameter gen_strong. It will also internally handle buffer copying.

stone-d-chen commented 4 months ago

New tests

Note: Bench numbers aren't accurate.

AVX:
 - vvc_deblock.chroma [OK]
checkasm: all 24 tests passed
vvc_h_loop_filter_chroma_8_mix_no-shift_c: 60.1
vvc_h_loop_filter_chroma_8_mix_no-shift_avx: 80.1
vvc_h_loop_filter_chroma_8_mix_shift_c: 100.1
vvc_h_loop_filter_chroma_8_mix_shift_avx: 70.1
vvc_h_loop_filter_chroma_8_one-side_no-shift_c: 90.1
vvc_h_loop_filter_chroma_8_one-side_no-shift_avx: 70.1
vvc_h_loop_filter_chroma_8_one-side_shift_c: 139.8
vvc_h_loop_filter_chroma_8_one-side_shift_avx: 70.1
vvc_h_loop_filter_chroma_8_strong_no-shift_c: 80.1
vvc_h_loop_filter_chroma_8_strong_no-shift_avx: 70.1
vvc_h_loop_filter_chroma_8_strong_shift_c: 140.1
vvc_h_loop_filter_chroma_8_strong_shift_avx: 70.1
vvc_h_loop_filter_chroma_8_weak_no-shift_c: 60.1
vvc_h_loop_filter_chroma_8_weak_no-shift_avx: 20.1
vvc_h_loop_filter_chroma_8_weak_shift_c: 89.8
vvc_h_loop_filter_chroma_8_weak_shift_avx: 20.1
vvc_h_loop_filter_chroma_10_mix_no-shift_c: 59.8
vvc_h_loop_filter_chroma_10_mix_no-shift_avx: 30.1
vvc_h_loop_filter_chroma_10_mix_shift_c: 110.1
vvc_h_loop_filter_chroma_10_mix_shift_avx: 30.1
vvc_h_loop_filter_chroma_10_one-side_no-shift_c: 89.8
vvc_h_loop_filter_chroma_10_one-side_no-shift_avx: 30.1
vvc_h_loop_filter_chroma_10_one-side_shift_c: 140.1
vvc_h_loop_filter_chroma_10_one-side_shift_avx: 30.1
vvc_h_loop_filter_chroma_10_strong_no-shift_c: 90.1
vvc_h_loop_filter_chroma_10_strong_no-shift_avx: 30.1
vvc_h_loop_filter_chroma_10_strong_shift_c: 140.1
vvc_h_loop_filter_chroma_10_strong_shift_avx: 30.1
vvc_h_loop_filter_chroma_10_weak_no-shift_c: 60.1
vvc_h_loop_filter_chroma_10_weak_no-shift_avx: 30.1
vvc_h_loop_filter_chroma_10_weak_shift_c: 80.1
vvc_h_loop_filter_chroma_10_weak_shift_avx: 20.1
vvc_h_loop_filter_chroma_12_mix_no-shift_c: 70.1
vvc_h_loop_filter_chroma_12_mix_no-shift_avx: 29.8
vvc_h_loop_filter_chroma_12_mix_shift_c: 99.8
vvc_h_loop_filter_chroma_12_mix_shift_avx: 70.1
vvc_h_loop_filter_chroma_12_one-side_no-shift_c: 90.1
vvc_h_loop_filter_chroma_12_one-side_no-shift_avx: 70.1
vvc_h_loop_filter_chroma_12_one-side_shift_c: 130.1
vvc_h_loop_filter_chroma_12_one-side_shift_avx: 70.1
vvc_h_loop_filter_chroma_12_strong_no-shift_c: 90.1
vvc_h_loop_filter_chroma_12_strong_no-shift_avx: 70.1
vvc_h_loop_filter_chroma_12_strong_shift_c: 139.8
vvc_h_loop_filter_chroma_12_strong_shift_avx: 70.1
vvc_h_loop_filter_chroma_12_weak_no-shift_c: 50.1
vvc_h_loop_filter_chroma_12_weak_no-shift_avx: 30.1
vvc_h_loop_filter_chroma_12_weak_shift_c: 80.1
vvc_h_loop_filter_chroma_12_weak_shift_avx: 20.1
stone-d-chen commented 4 months ago

Made the suggested changes and pushed.

I also changed the function signature so that the parameters important for testing different code branches are first for clarity.

stone-d-chen commented 4 months ago

Quick update:

nuomi2021 commented 4 months ago

be calculated. EDIT: This is fixed with the latest version, simple memcopy problem. you can send a pr for this. small patches are easy to review and merge. thank you.

stone-d-chen commented 4 months ago

you can send a pr for this. small patches are easy to review and merge. thank you.

Sounds good, do you mean send a patch to the mailing list?

nuomi2021 commented 4 months ago

you can send a pr for this. small patches are easy to review and merge. thank you.

Sounds good, do you mean send a patch to the mailing list?

to this repo, :) still need some work to do before we send the patch upstream.

stone-d-chen commented 4 months ago

@nuomi2021 this should be good to merge now

nuomi2021 commented 4 months ago

thank you