ChinaFFmpeg

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 6246|回复: 0

[Windows] 编译x264遇到的问题

[复制链接]
发表于 2020-6-16 18:01:05 | 显示全部楼层 |阅读模式
下面的代码gcc可以轻易的通过,VS无法通过,换了2015也不行。

#ifdef __ICL
#define DECLARE_ALIGNED( var, n ) __declspec(align(n)) var
#else
#define DECLARE_ALIGNED( var, n ) var __attribute__((aligned(n)))
#endif
#define ALIGNED_16( var ) DECLARE_ALIGNED( var, 16 )
#define ALIGNED_8( var )  DECLARE_ALIGNED( var, 8 )
#define ALIGNED_4( var )  DECLARE_ALIGNED( var, 4 )

#include <stdint.h>

typedef uint16_t pixel;

struct x264_weight_t;

typedef struct x264_weight_t
{
    /* aligning the first member is a gcc hack to force the struct to be
     * 16 byte aligned, as well as force sizeof(struct) to be a multiple of 16
*/
    ALIGNED_16(int16_t cachea[8]);
    int16_t cacheb[8];
    int32_t i_denom;
    int32_t i_scale;
    int32_t i_offset;
}x264_weight;

==============

只要把宏ALIGNED_16注释掉,cl也是可以通过的。
什么问题啊?

请教如何解决问题,谢谢!


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|Archiver|ChinaFFmpeg

GMT+8, 2024-4-20 13:18 , Processed in 0.044990 second(s), 14 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表