nothings / single_file_libs

List of single-file C/C++ libraries.
8.86k stars 585 forks source link

video/jo_mpeg is C not C++ #171

Closed isohelio closed 4 years ago

isohelio commented 4 years ago

Looking at the jo_mpeg video library it appears to be written in C and describes itself as 256 lines of C code.

jprjr commented 4 years ago

Technically it's C++ because of this function signature:

static void jo_DCT(float &d0, float &d1, float &d2, float &d3, float &d4, float &d5, float &d6, float &d7)

You can convert it to C pretty easily, but technically it is C++.

isohelio commented 4 years ago

Well spotted.

isohelio commented 4 years ago

There is a version here with the references converted to standard c pointers.

https://github.com/yui0/slibs/blob/master/jo_mpeg.h

May be of interest to people who wanted standard C (as did I)?