mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +00:00
compilation fixes: define always_inline and don't use uint64_t_C
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21740 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7c44ff0483
commit
cf122d037c
@ -39,6 +39,13 @@
|
||||
#include "libavcodec/mpegvideo.h"
|
||||
//#include "jpeg_enc.h" /* this file is not present yet */
|
||||
|
||||
/* code from ffmpeg/libavcodec */
|
||||
#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC_ == 3 && __GNUC_MINOR__ > 0)
|
||||
# define always_inline __attribute__((always_inline)) inline
|
||||
#else
|
||||
# define always_inline inline
|
||||
#endif
|
||||
|
||||
#undef malloc
|
||||
#undef free
|
||||
#undef realloc
|
||||
@ -151,7 +158,7 @@ static void convert_matrix(MpegEncContext *s, int (*qmat)[64],
|
||||
* So 16 <= qscale * quant_matrix[i] <= 7905
|
||||
* so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905
|
||||
* so 32768 >= (1<<19) / (qscale * quant_matrix[i]) >= 67 */
|
||||
qmat[qscale][i] = (int)((uint64_t_C(1) <<
|
||||
qmat[qscale][i] = (int)((UINT64_C(1) <<
|
||||
QMAT_SHIFT_MMX) / (qscale
|
||||
*quant_matrix[j]));
|
||||
qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX)
|
||||
|
@ -113,7 +113,7 @@ static void convert_matrix(MpegEncContext *s, int (*qmat)[64],
|
||||
so (1<<19) / 16 >= (1<<19) / (qscale * quant_matrix[i]) >= (1<<19) / 7905
|
||||
so 32768 >= (1<<19) / (qscale * quant_matrix[i]) >= 67
|
||||
*/
|
||||
qmat [qscale][i] = (int)((uint64_t_C(1) << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]));
|
||||
qmat [qscale][i] = (int)((UINT64_C(1) << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]));
|
||||
qmat16[qscale][0][i] = (1 << QMAT_SHIFT_MMX) / (qscale * quant_matrix[j]);
|
||||
|
||||
if(qmat16[qscale][0][i]==0 || qmat16[qscale][0][i]==128*256) qmat16[qscale][0][i]=128*256-1;
|
||||
|
Loading…
Reference in New Issue
Block a user