x264_image_t与x264_picture_t

typedef struct

{

    int     i_csp;

    int     i_plane;

    int     i_stride[4];

    uint8_t *plane[4];

} x264_image_t;

x264_image_t 是原始数据的存放格式(猜测)。

i_csp: color space parameter 色彩空间参数 X264只支持I420。

i_plane 代表色彩空间的个数。一般为3。

i_stride 不太清楚(猜测:plane数组中的指针 plane[0]亮度信息,plane[1]cb信息,plane[2]cr信息)

x264_picture_tx264_frame_t的区别.前者是说明一个视频序列中每帧的特点.后者存放每帧实际的象素值.注意区分



typedef struct
{
    /* In: force picture type (if not auto) XXX: ignored for now
     * Out: type of the picture encoded */
    int     i_type;
    /* In: force quantizer for > 0 */
    int     i_qpplus1;
    /* In: user pts, Out: pts of encoded picture (user)*/
    int64_t i_pts;

    /* In: raw data */
    x264_image_t img;
} x264_picture_t;

具体的含义理解参考了read_frame_yuv()    x264_picture_alloc();

i_type 指明被编码图像的类型,有X264_TYPE_AUTO X264_TYPE_IDR X264_TYPE_I X264_TYPE_P X264_TYPE_BREF X264_TYPE_B可供选择,初始化为AUTO,说明由x264在编码过程中自行控制。

i_qpplus1 :此参数减1代表当前画面的量化参数值。

i_pts program time stamp 程序时间戳,指示这幅画面编码的时间戳。

img :存放真正一副图像的原始数据。

原文地址:https://www.cnblogs.com/cplusplus/p/2456583.html