bbc / turingcodec

Source code for the Turing codec, an HEVC software encoder optimised for fast encoding of large resolution video content
http://turingcodec.org/
GNU General Public License v2.0
154 stars 39 forks source link

Test on a variety of compilers/OSes #12

Closed jdek closed 6 months ago

jdek commented 7 years ago

Currently the build is tested on gcc 4.8.2 and 4.8.4, with travis testing on gcc 5.

Turingcodec should be tested on at least the following compilers/operating systems:

Note that travis-ci can test all the macOS and Linux compilers, and should be easy to setup. The issue is that turingcodec doesn't currently compile on these configurations.

kupix commented 7 years ago

See also issue #5 (OS-X port). Clang 3.0 is possibly too old to have sufficient C++1x support. Gcc 6.0 should compile the codec but yes, it needs to be CI'ed.

jdek commented 7 years ago

@kupix 3.0 was from freebsd 10 release, which isn't the latest but was until fairly recently, so it can probably be dropped just fine. It would be an extra nice-to-have, but if it's not possible, it shouldn't be too much of an issue.

lu-zero commented 7 years ago

I sent you a patch to support recent clang and I tested it on clang-4 on linux.

casting a function pointer to a byte pointer sounds quite fishy.

/usr/src/turingcodec/havoc/Jit.h:155:16: error: reinterpret_cast from 'const uint8 *' (aka 'const unsigned char *') to 'int (*)(const unsigned char *, long, const unsigned char *, long)' casts away qualifiers
        return reinterpret_cast<F *>(this->getCode());
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/turingcodec/havoc/hadamard.cpp:777:46: note: in instantiation of function template specialization 'Jit::Function::operator int (*)(const unsigned char *, long, const unsigned char *, long)<int
      (const unsigned char *, long, const unsigned char *, long)>' requested here
        *havoc_get_hadamard_satd(table, 2) = satd4;
                                             ^
/usr/src/turingcodec/havoc/hadamard.cpp:811:9: note: in instantiation of function template specialization 'havoc_populate_hadamard_satd<unsigned char>' requested here
        havoc_populate_hadamard_satd(&table, code);
        ^
/usr/src/turingcodec/havoc/hadamard.cpp:840:64: note: in instantiation of member function 'bound_hadamard_satd<unsigned char>::init' requested here
        return static_cast<bound_hadamard_satd<uint8_t> *>(b)->init(code);
                                                               ^
In file included from /usr/src/turingcodec/havoc/hadamard.cpp:23:
/usr/src/turingcodec/havoc/Jit.h:155:16: error: reinterpret_cast from 'const uint8 *' (aka 'const unsigned char *') to 'int (*)(const unsigned short *, long, const unsigned short *, long)' casts away qualifiers
        return reinterpret_cast<F *>(this->getCode());
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/src/turingcodec/havoc/hadamard.cpp:777:46: note: in instantiation of function template specialization 'Jit::Function::operator int (*)(const unsigned short *, long, const unsigned short *, long)<int
      (const unsigned short *, long, const unsigned short *, long)>' requested here
        *havoc_get_hadamard_satd(table, 2) = satd4;
                                             ^
/usr/src/turingcodec/havoc/hadamard.cpp:811:9: note: in instantiation of function template specialization 'havoc_populate_hadamard_satd<unsigned short>' requested here
        havoc_populate_hadamard_satd(&table, code);
        ^
/usr/src/turingcodec/havoc/hadamard.cpp:842:65: note: in instantiation of member function 'bound_hadamard_satd<unsigned short>::init' requested here
        return static_cast<bound_hadamard_satd<uint16_t> *>(b)->init(code);
                                                                ^