OSDN Git Service

Remove implicit truncations from int to bit-field
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 14 Feb 2018 12:42:53 +0000 (13:42 +0100)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 14 Mar 2018 04:09:44 +0000 (12:09 +0800)
commit5802bd725347f7b6ee012e60f741508257e2ee76
tree9e64b46185baa9f3ab11c3b13e3ff82d331d6594
parent41799e7bbc5933a9a28dfafb6d94bd32df77acfc
Remove implicit truncations from int to bit-field

All the members in the structures scoreboard1 and scoreboard2 are
signed int of 4 bit long (this means they only admit values from
-8 to 7).

Along the code, these structures are assigned with values bigger
than 7 which are implicitly truncated to negative numbers. For
example, 0xF -> -1 or 0xE -> -2

It is better to explictly show the assigned values than rely on
implicit convertions. This patch aims to that direction.
src/gen10_hevc_encoder.c
src/gen10_vdenc_vp9.c
src/gen9_hevc_encoder.c
src/gen9_vp9_encoder.c
src/i965_avc_encoder.c
src/i965_encoder_vp8.c