Skip to content
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

embed adaptive Quantization method #112

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src_base/xeve_bsw.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ int xeve_bsw_write(XEVE_BSW * bs, u32 val, int len) /* len(1 ~ 32) */
int leftbits;

xeve_assert(bs);
xeve_assert(len <= 32); // to avoid shifting by a negative value
xeve_assert(len > 0); // to avoid shifting by a negative value

leftbits = bs->leftbits;
val <<= (32 - len);
Expand Down Expand Up @@ -244,4 +244,4 @@ void xeve_bsw_write_se(XEVE_BSW * bs, int val)
{
xeve_bsw_write_ue(bs, val <= 0 ? (-val * 2) : (val * 2 - 1));
}
#endif
#endif