Merge pull request #125 from schnaader/arm-test-packjpg-packmp3-fix

Merge ARM support
This commit is contained in:
Christian Schneider 2020-10-01 15:51:44 +02:00 committed by GitHub
commit ec9adc8be1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 29 deletions

View file

@ -160,7 +160,11 @@ add_executable(precomp ${GIF_SRC} ${BZIP_SRC} ${ZLIB_SRC} ${PACKARI_SRC}
${BRUNSLI_SRC} ${BROTLI_SRC} ${PRECOMP_SRC} ${PRECOMP_HDR})
if (UNIX)
target_link_libraries(precomp Threads::Threads)
if (NOT APPLE)
target_link_libraries(precomp Threads::Threads atomic)
else()
target_link_libraries(precomp Threads::Threads)
endif()
endif()
install(TARGETS precomp DESTINATION bin)

View file

@ -113,7 +113,11 @@ EGifOpenFileName(const char *FileName,
// TODO: Does this work?
FileHandle = open(FileName, O_WRONLY | O_CREAT | O_EXCL
#endif
#ifdef S_IREAD
, S_IREAD | S_IWRITE);
#else
, S_IRUSR | S_IWUSR);
#endif
else
#ifndef LINUX
FileHandle = open(FileName, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY
@ -121,7 +125,11 @@ EGifOpenFileName(const char *FileName,
// TODO: Does this work?
FileHandle = open(FileName, O_WRONLY | O_CREAT | O_TRUNC
#endif
#ifdef S_IREAD
, S_IREAD | S_IWRITE);
#else
, S_IRUSR | S_IWUSR);
#endif
if (FileHandle == -1) {
_GifError = E_GIF_ERR_OPEN_FAILED;

View file

@ -556,7 +556,7 @@ INTERN unsigned int* scnp = NULL; // scan start positions in hu
INTERN int rstc = 0 ; // count of restart markers
INTERN int scnc = 0 ; // count of scans
INTERN int rsti = 0 ; // restart interval
INTERN char padbit = -1 ; // padbit (for huffman coding)
INTERN signed char padbit = -1 ; // padbit (for huffman coding)
INTERN unsigned char* rst_err = NULL; // number of wrong-set RST markers per scan
INTERN unsigned char* zdstdata[4] = { NULL }; // zero distribution (# of non-zeroes) lists (for higher 7x7 block)

View file

@ -219,29 +219,29 @@ INTERN int g_bitrate = 0; // bit rate - global or zero for vbr
global variables: frame analysis info
----------------------------------------------- */
INTERN char i_mpeg = -1; // mpeg - non changing
INTERN char i_layer = -1; // layer - non changing
INTERN char i_samplerate = -1; // sample rate - non changing
INTERN char i_bitrate = -1; // bit rate - value or -1 (variable)
INTERN char i_protection = -1; // checksum - for all (1), none (0) or some (-1) frames
INTERN char i_padding = -1; // padding - for all (1), none (0) or some (-1) frames
INTERN char i_privbit = -1; // private bit - value or -1 (variable)
INTERN char i_channels = -1; // channel mode - non changing
INTERN char i_stereo_ms = -1; // ms stereo - for all (1), none (0) or some (-1) frames
INTERN char i_stereo_int = -1; // int stereo - for all (1), none (0) or some (-1) frames
INTERN char i_copyright = -1; // copyright bit - value or -1 (variable)
INTERN char i_original = -1; // original bit - value or -1 (variable)
INTERN char i_emphasis = -1; // emphasis - value or -1 (variable)
INTERN char i_padbits = -1; // side info padding bits - value or -1 (variable)
INTERN char i_bit_res = -1; // bit reservoir - is used (1) or not used (0)
INTERN char i_share = -1; // scalefactor sharing - is used (1) or not used (0)
INTERN char i_sblocks = -1; // special blocks - are used (1) or not used (0)
INTERN char i_mixed = -1; // mixed blocks - are used (1) or not used (0)
INTERN char i_preemphasis = -1; // preemphasis - value or -1 (variable)
INTERN char i_coarse = -1; // coarse scalefactors - value or -1 (variable)
INTERN char i_sbgain = -1; // subblock gain - used properly (1), not used (0) or used for non-short (-1)
INTERN char i_aux_h = -1; // auxiliary data handling - none (0), at begin and end (1), between frames (-1)
INTERN char i_sb_diff = -1; // special blocks diffs between ch0 and ch1 - none (0) or some (-1)
INTERN signed char i_mpeg = -1; // mpeg - non changing
INTERN signed char i_layer = -1; // layer - non changing
INTERN signed char i_samplerate = -1; // sample rate - non changing
INTERN signed char i_bitrate = -1; // bit rate - value or -1 (variable)
INTERN signed char i_protection = -1; // checksum - for all (1), none (0) or some (-1) frames
INTERN signed char i_padding = -1; // padding - for all (1), none (0) or some (-1) frames
INTERN signed char i_privbit = -1; // private bit - value or -1 (variable)
INTERN signed char i_channels = -1; // channel mode - non changing
INTERN signed char i_stereo_ms = -1; // ms stereo - for all (1), none (0) or some (-1) frames
INTERN signed char i_stereo_int = -1; // int stereo - for all (1), none (0) or some (-1) frames
INTERN signed char i_copyright = -1; // copyright bit - value or -1 (variable)
INTERN signed char i_original = -1; // original bit - value or -1 (variable)
INTERN signed char i_emphasis = -1; // emphasis - value or -1 (variable)
INTERN signed char i_padbits = -1; // side info padding bits - value or -1 (variable)
INTERN signed char i_bit_res = -1; // bit reservoir - is used (1) or not used (0)
INTERN signed char i_share = -1; // scalefactor sharing - is used (1) or not used (0)
INTERN signed char i_sblocks = -1; // special blocks - are used (1) or not used (0)
INTERN signed char i_mixed = -1; // mixed blocks - are used (1) or not used (0)
INTERN signed char i_preemphasis = -1; // preemphasis - value or -1 (variable)
INTERN signed char i_coarse = -1; // coarse scalefactors - value or -1 (variable)
INTERN signed char i_sbgain = -1; // subblock gain - used properly (1), not used (0) or used for non-short (-1)
INTERN signed char i_aux_h = -1; // auxiliary data handling - none (0), at begin and end (1), between frames (-1)
INTERN signed char i_sb_diff = -1; // special blocks diffs between ch0 and ch1 - none (0) or some (-1)
/* -----------------------------------------------
@ -1547,10 +1547,10 @@ INTERN bool read_mp3( void )
int main_data_begin;
int main_data_end;
char mpeg = -1;
char layer = -1;
char samples = -1;
char channels = -1;
signed char mpeg = -1;
signed char layer = -1;
signed char samples = -1;
signed char channels = -1;
abytewriter* data_writer;
mp3Frame* frame = NULL;