sno_guo的编写: 不断更新中。。。。。。
1,const : 这个可以理解成只读的,但实际他的意义远远大于只读的含义。如编译器在看到这个const的时候,-O3操作后,程序会增加一个额外的优化,如在编译的时候就确定具体的值,这样程序中就无需频繁的计算变量等操作。
ffmpeg中有这样的使用:
对变量:
const int b_xy = h->mb2b_xy[left_xy[LTOP]] + 3;
对结构体 指针:
MpegEncContext *const s = &h->s;
对指针指向的内容:
static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)