Skip to content
Snippets Groups Projects
Commit 5a8228a6 authored by Petter Reinholdtsen's avatar Petter Reinholdtsen
Browse files

Avoided bit shift of negative values in OC_MV() macro.

During video playout using player_example with gcc sanitaztions
enabled, new bit shifting of negative values were discovered.
Replaced this with multiplication too.
parent ec642ecf
No related branches found
No related tags found
1 merge request!35Avoided bit shift of negative values in OC_MV() and OC_MV_Y() macros.
Pipeline #6248 passed
......@@ -228,7 +228,7 @@ typedef struct oc_theora_state oc_theora_state;
#define OC_MV(_x,_y) ((oc_mv)((_x)&0xFF|(_y)<<8))
#define OC_MV(_x,_y) ((oc_mv)((_x)&0xFF|(_y)*256))
#define OC_MV_X(_mv) ((signed char)(_mv))
#define OC_MV_Y(_mv) ((_mv)>>8)
#define OC_MV_ADD(_mv1,_mv2) \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment