diff options
author | Fredrik Svedberg <Fredrik.Svedberg@arm.com> | 2020-12-11 13:42:22 +0100 |
---|---|---|
committer | patrik.gustavsson <patrik.gustavsson@arm.com> | 2020-12-18 12:16:19 +0000 |
commit | 5b513886ab120023eb1319d4883b175db8b7de3a (patch) | |
tree | 8ed296f6567daac9c1a564ad417f3d14ab1b7186 /ethosu/mlw_codec/mlw_encode.c | |
parent | 6c74c3bcaa733aa062c15d606726722b19c0dfdb (diff) | |
download | ethos-u-vela-5b513886ab120023eb1319d4883b175db8b7de3a.tar.gz |
[MLBEDSW-297] Setup and run on Microsoft Windows
Various updates to make vela run and produce identical output on
Microsoft Windows.
* Fixed overflow errors
* Fixed compile warnings
* Avoid problematic numpy version
* Updated README.md
Signed-off-by: Fredrik Svedberg <Fredrik.Svedberg@arm.com>
Change-Id: Ie48c63a92a00c81b3247d07f05b75d881319ddbb
Diffstat (limited to 'ethosu/mlw_codec/mlw_encode.c')
-rw-r--r-- | ethosu/mlw_codec/mlw_encode.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ethosu/mlw_codec/mlw_encode.c b/ethosu/mlw_codec/mlw_encode.c index 7820106e..04afa3ee 100644 --- a/ethosu/mlw_codec/mlw_encode.c +++ b/ethosu/mlw_codec/mlw_encode.c @@ -33,8 +33,12 @@ #define ZERO_RUN_THRES 4 +#ifndef min #define min(a,b) ((a)<(b)?(a):(b)) +#endif +#ifndef max #define max(a,b) ((a)>(b)?(a):(b)) +#endif typedef struct palette { int16_t lut[32]; @@ -258,7 +262,7 @@ static void create_palette( int freq[512], // Setup the 32 entry palette int palette_max_val = 0, val, cnt, pal_cnt=0; for(i=0; i<max_palette_size; i++) { - cnt = freq64[i]>>16; + cnt = (int)(freq64[i]>>16); val = freq64[i]&0xffff; if ( cnt==0 ) break; |