diff options
author | James Zern <jzern@google.com> | 2022-08-18 11:35:06 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2022-08-18 19:12:59 -0700 |
commit | b55ef982b0537b4c3d63486e55dcb8fff5fa1d78 (patch) | |
tree | 559e17084b20cf631374a6e36067555373b15d6a /vpx_dsp/bitwriter.h | |
parent | 002b6b1ce05c2810cb858188b29aafe785bbc01a (diff) | |
download | libvpx-b55ef982b0537b4c3d63486e55dcb8fff5fa1d78.tar libvpx-b55ef982b0537b4c3d63486e55dcb8fff5fa1d78.tar.gz libvpx-b55ef982b0537b4c3d63486e55dcb8fff5fa1d78.tar.bz2 libvpx-b55ef982b0537b4c3d63486e55dcb8fff5fa1d78.zip |
use VPX_NO_UNSIGNED_SHIFT_CHECK with entropy functions
these shift values off the most significant bit as part of the process;
vp8_regular_quantize_b_sse4_1 is included here for a special case of
mask creation
quiets warnings of the form:
vp8/decoder/dboolhuff.h:81:11: runtime error: left shift of
2373679303235599696 by 3 places cannot be represented in type
'VP8_BD_VALUE' (aka 'unsigned long')
vp8/encoder/bitstream.c:257:18: runtime error: left shift of 2147493041
by 1 places cannot be represented in type 'unsigned int'
vp8/encoder/x86/quantize_sse4.c:114:18: runtime error: left shift of
4294967294 by 1 places cannot be represented in type 'unsigned int'
vp9/encoder/vp9_pickmode.c:1632:41: runtime error: left shift of
4294967295 by 1 places cannot be represented in type 'unsigned int'
Bug: b/229626362
Change-Id: Iabed118b2a094232783e5ad0e586596d874103ca
Diffstat (limited to 'vpx_dsp/bitwriter.h')
-rw-r--r-- | vpx_dsp/bitwriter.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vpx_dsp/bitwriter.h b/vpx_dsp/bitwriter.h index 04084af8f..5f1ee69ec 100644 --- a/vpx_dsp/bitwriter.h +++ b/vpx_dsp/bitwriter.h @@ -13,6 +13,7 @@ #include <stdio.h> +#include "vpx_ports/compiler_attributes.h" #include "vpx_ports/mem.h" #include "vpx_dsp/prob.h" @@ -35,7 +36,9 @@ typedef struct vpx_writer { void vpx_start_encode(vpx_writer *br, uint8_t *source); void vpx_stop_encode(vpx_writer *br); -static INLINE void vpx_write(vpx_writer *br, int bit, int probability) { +static INLINE VPX_NO_UNSIGNED_SHIFT_CHECK void vpx_write(vpx_writer *br, + int bit, + int probability) { unsigned int split; int count = br->count; unsigned int range = br->range; |