History

avcodec/vvc/cabac: add 9.3.3.5 k-th order Exp - Golomb binarization process

Wu Jianhua committed 1 year ago

Commit 02fe29f1 parent fe97bf81 file · +21 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vvc/cabac.c+21−0
@@ -928,6 +928,27 @@ static int truncated_binary_decode(VVCLocalContext *lc, const int c_max) · 927 unmodified lines
928 return v;928 return v;
929}929}
930 930
931// 9.3.3.5 k-th order Exp - Golomb binarization process
932static int kth_order_egk_decode(CABACContext *c, int k)
933{
934 int bit = 1;
935 int value = 0;
936 int symbol = 0;
937
938 while (bit) {
939 bit = get_cabac_bypass(c);
940 value += bit << k++;
941 }
942
943 if (--k) {
944 for (int i = 0; i < k; i++)
945 symbol = (symbol << 1) | get_cabac_bypass(c);
946 value += symbol;
947 }
948
949 return value;
950}
951
931// 9.3.3.6 Limited k-th order Exp-Golomb binarization process952// 9.3.3.6 Limited k-th order Exp-Golomb binarization process
932static int limited_kth_order_egk_decode(CABACContext *c, const int k, const int max_pre_ext_len, const int trunc_suffix_len)953static int limited_kth_order_egk_decode(CABACContext *c, const int k, const int max_pre_ext_len, const int trunc_suffix_len)
933{954{

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t