x264编码速度问题
使用x264编码时测试发现encoder_encode 编码时间太长
(19700102 08:59:12.077) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:34 //从队列中提取一帧640 480的yuv422数据
(19700102 08:59:12.077) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.080) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end //yuv422 中分离yuv数据开始
(19700102 08:59:12.129) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 42
(19700102 08:59:12.130) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 42!
(19700102 08:59:12.193) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 34//调用x264_encoder_encode完毕 时间193-80=113ms
(19700102 08:59:12.193) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:35
(19700102 08:59:12.193) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.195) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end
(19700102 08:59:12.213) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 43
(19700102 08:59:12.214) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 43!
(19700102 08:59:12.297) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 44
(19700102 08:59:12.298) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 44!
(19700102 08:59:12.315) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 35
(19700102 08:59:12.315) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:36
(19700102 08:59:12.315) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.317) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end
(19700102 08:59:12.352) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 36
(19700102 08:59:12.352) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:37
(19700102 08:59:12.352) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.355) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end
(19700102 08:59:12.378) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 45
(19700102 08:59:12.378) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 45!
(19700102 08:59:12.424) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 37
(19700102 08:59:12.425) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:38
(19700102 08:59:12.425) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.427) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end
(19700102 08:59:12.462) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 46
(19700102 08:59:12.463) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 46!
(19700102 08:59:12.527) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 38
(19700102 08:59:12.527) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:39
(19700102 08:59:12.527) encode_oneFrame[ 173]<DEBUG>: i422 enc yuv start
(19700102 08:59:12.530) encode_oneFrame[ 188]<DEBUG>: i422 enc get yuv end
(19700102 08:59:12.545) read_video_frame[ 77]<DEBUG>: buffers.length=614400,count_flag = 47
(19700102 08:59:12.546) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 47!
(19700102 08:59:12.629) encode_oneFrame[ 209]<DEBUG>: Succeed encode frame: 39
上面的红色字体可以看到,编码x264_encoder_encode 这个函数的时间基本都在100ms-120ms左右,1秒钟编码8-10帧,很是慢。这里的是通过
x264_param_default_preset(pParam, "fast" , "zerolatency" );
提高编码时效可以分析一下这个函数如下
通过x264_param_apply_preset(x264_param_t *param, const char *preset )函数设置设置编码参数。
preset 接受取值为:x264_preset_names[] = { "ultrafast", "superfast", "veryfast", "faster", "fast", "medium", "slow", "slower", "veryslow", "placebo", 0 };
此步骤通过速度设定某些参数。
static int x264_param_apply_preset( x264_param_t param, const char preset )
{
char end;
int i = strtol( preset, &end, 10 );
if( end == 0 && i >= 0 && i < sizeof(x264_preset_names)/sizeof(*x264_preset_names)-1 )
preset = x264_preset_names[i];
if( !strcasecmp( preset, "ultrafast" ) )
{
param->i_frame_reference = 1;//参考帧的最大帧数设为1
param->i_scenecut_threshold = 0;
param->b_deblocking_filter = 0;//不使用去块滤波
param->b_cabac = 0;//关闭cabac
param->i_bframe = 0;//关闭b帧
param->analyse.intra = 0;
param->analyse.inter = 0;
param->analyse.b_transform_8x8 = 0;
param->analyse.i_me_method = X264_ME_DIA;;////运动估算法的选择
param->analyse.i_subpel_refine = 0;
param->rc.i_aq_mode = 0;
param->analyse.b_mixed_references = 0;
param->analyse.i_trellis = 0;
param->i_bframe_adaptive = X264_B_ADAPT_NONE;//关闭b帧判定选项
param->rc.b_mb_tree = 0;
param->analyse.i_weighted_pred = X264_WEIGHTP_NONE;
param->analyse.b_weighted_bipred = 0;
param->rc.i_lookahead = 0;
}
else if( !strcasecmp( preset, "superfast" ) )
{
param->analyse.inter = X264_ANALYSE_I8x8|X264_ANALYSE_I4x4;
param->analyse.i_me_method = X264_ME_DIA;;//钻石模板
param->analyse.i_subpel_refine = 1;/亚像素运动估计质量为1
param->i_frame_reference = 1;//参考帧的最大帧数设为1
param->analyse.b_mixed_references = 0;
param->analyse.i_trellis = 0;
param->rc.b_mb_tree = 0;
param->analyse.i_weighted_pred = X264_WEIGHTP_SIMPLE;
param->rc.i_lookahead = 0;
}
else if( !strcasecmp( preset, "veryfast" ) )
{
param->analyse.i_me_method = X264_ME_HEX;
param->analyse.i_subpel_refine = 2;
param->i_frame_reference = 1;//参考帧的最大帧数设为1
param->analyse.b_mixed_references = 0;
param->analyse.i_trellis = 0;
param->analyse.i_weighted_pred = X264_WEIGHTP_SIMPLE;
param->rc.i_lookahead = 10;
}
else if( !strcasecmp( preset, "faster" ) )
{
param->analyse.b_mixed_references = 0;
param->i_frame_reference = 2;//参考帧的最大帧数设为2
param->analyse.i_subpel_refine = 4;
param->analyse.i_weighted_pred = X264_WEIGHTP_SIMPLE;
param->rc.i_lookahead = 20;
}
else if( !strcasecmp( preset, "fast" ) )
{
param->i_frame_reference = 2;//参考帧的最大帧数设为2
param->analyse.i_subpel_refine = 6;
param->analyse.i_weighted_pred = X264_WEIGHTP_SIMPLE;
param->rc.i_lookahead = 30;
}
else if( !strcasecmp( preset, "medium" ) )
{
/ Default is medium
默认参考 set_param_default();
*/
}
else if( !strcasecmp( preset, "slow" ) )
{
param->analyse.i_me_method = X264_ME_UMH;//运动估算发的选择
param->analyse.i_subpel_refine = 8;
param->i_frame_reference = 5;//参考帧的最大帧数设为5
param->i_bframe_adaptive = X264_B_ADAPT_TRELLIS;
param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_AUTO;
param->rc.i_lookahead = 50;
}
else if( !strcasecmp( preset, "slower" ) )
{
param->analyse.i_me_method = X264_ME_UMH;//运动估算发的选择
param->analyse.i_subpel_refine = 9;
param->i_frame_reference = 8;//参考帧的最大帧数设为8
param->i_bframe_adaptive = X264_B_ADAPT_TRELLIS;
param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_AUTO;
param->analyse.inter |= X264_ANALYSE_PSUB8x8;
param->analyse.i_trellis = 2;
param->rc.i_lookahead = 60;
}
else if( !strcasecmp( preset, "veryslow" ) )
{
param->analyse.i_me_method = X264_ME_UMH;//运动估算发的选择
param->analyse.i_subpel_refine = 10;
param->analyse.i_me_range = 24;
param->i_frame_reference = 16;//参考帧的最大帧数设为16
param->i_bframe_adaptive = X264_B_ADAPT_TRELLIS;
param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_AUTO;
param->analyse.inter |= X264_ANALYSE_PSUB8x8;
param->analyse.i_trellis = 2;
param->i_bframe = 8;//两个参考帧之间b帧为8
param->rc.i_lookahead = 60;
}
else if( !strcasecmp( preset, "placebo" ) )
{
param->analyse.i_me_method = X264_ME_TESA;//运动估算发的选择
param->analyse.i_subpel_refine = 11;
param->analyse.i_me_range = 24;//运动估计范围设为24
param->i_frame_reference = 16;//参考帧的最大帧数设为16
param->i_bframe_adaptive = X264_B_ADAPT_TRELLIS;
param->analyse.i_direct_mv_pred = X264_DIRECT_PRED_AUTO;
param->analyse.inter |= X264_ANALYSE_PSUB8x8;
param->analyse.b_fast_pskip = 0;
param->analyse.i_trellis = 2;
param->i_bframe = 16;//参考帧之间b帧为16
param->rc.i_lookahead = 60;
}
else
{
x264_log( NULL, X264_LOG_ERROR, "invalid preset '%s'\n", preset );
return -1;
}
return 0;
}
设置成veryfast的打印,下面的log是1秒中的1秒钟18帧
(19700103 02:20:44.085) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 230
(19700103 02:20:44.089) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 230!
(19700103 02:20:44.089) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 231
(19700103 02:20:44.091) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 231!
(19700103 02:20:44.092) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 232
(19700103 02:20:44.094) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 232!
(19700103 02:20:44.124) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 233
(19700103 02:20:44.126) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 233!
(19700103 02:20:44.159) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 234
(19700103 02:20:44.160) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 234!
(19700103 02:20:44.166) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 220
start to pop in queue's packet size: 0xe75
(19700103 02:20:44.167) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:221
(19700103 02:20:44.167) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.170) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.191) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 235
(19700103 02:20:44.192) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 235!
(19700103 02:20:44.226) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 236
(19700103 02:20:44.228) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 236!
(19700103 02:20:44.233) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 221
start to pop in queue's packet size: 0xf66
(19700103 02:20:44.234) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:222
(19700103 02:20:44.234) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.237) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.259) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 237
(19700103 02:20:44.260) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 237!
(19700103 02:20:44.277) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 222
start to pop in queue's packet size: 0xf8a
(19700103 02:20:44.277) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:223
(19700103 02:20:44.277) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.280) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.291) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 238
(19700103 02:20:44.292) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 238!
(19700103 02:20:44.327) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 239
(19700103 02:20:44.327) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 239!
(19700103 02:20:44.347) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 223
start to pop in queue's packet size: 0xe31
(19700103 02:20:44.347) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:224
(19700103 02:20:44.347) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.350) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.359) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 240
(19700103 02:20:44.360) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 240!
(19700103 02:20:44.371) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 224
start to pop in queue's packet size: 0x3caa
(19700103 02:20:44.371) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:225
(19700103 02:20:44.371) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.374) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.394) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 241
(19700103 02:20:44.395) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 241!
(19700103 02:20:44.407) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 225
start to pop in queue's packet size: 0xd24
(19700103 02:20:44.408) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:226
(19700103 02:20:44.408) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.410) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.427) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 242
(19700103 02:20:44.427) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 242!
(19700103 02:20:44.447) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 226
start to pop in queue's packet size: 0xe7f
(19700103 02:20:44.447) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:227
(19700103 02:20:44.447) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.450) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.459) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 243
(19700103 02:20:44.460) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 243!
(19700103 02:20:44.485) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 227
start to pop in queue's packet size: 0xf2b
(19700103 02:20:44.485) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:228
(19700103 02:20:44.485) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.488) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.495) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 244
(19700103 02:20:44.496) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 244!
(19700103 02:20:44.527) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 245
(19700103 02:20:44.528) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 245!
(19700103 02:20:44.530) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 228
start to pop in queue's packet size: 0x10e3
(19700103 02:20:44.530) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:229
(19700103 02:20:44.530) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.533) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.562) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 246
(19700103 02:20:44.563) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 246!
(19700103 02:20:44.574) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 229
start to pop in queue's packet size: 0xfe8
(19700103 02:20:44.574) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:230
(19700103 02:20:44.574) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.577) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.601) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 247
(19700103 02:20:44.602) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 247!
(19700103 02:20:44.617) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 230
start to pop in queue's packet size: 0xfb0
(19700103 02:20:44.617) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:231
(19700103 02:20:44.617) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.620) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.627) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 248
(19700103 02:20:44.628) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 248!
(19700103 02:20:44.663) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 249
(19700103 02:20:44.664) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 249!
(19700103 02:20:44.664) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 231
start to pop in queue's packet size: 0x1190
(19700103 02:20:44.665) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:232
(19700103 02:20:44.665) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.667) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.695) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 250
(19700103 02:20:44.696) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 250!
(19700103 02:20:44.708) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 232
start to pop in queue's packet size: 0x102b
(19700103 02:20:44.708) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:233
(19700103 02:20:44.708) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.711) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.731) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 251
(19700103 02:20:44.732) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 251!
(19700103 02:20:44.750) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 233
start to pop in queue's packet size: 0x3e3a
(19700103 02:20:44.751) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:234
(19700103 02:20:44.751) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.754) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.763) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 252
(19700103 02:20:44.768) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 252!
(19700103 02:20:44.798) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 253
(19700103 02:20:44.800) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 253!
(19700103 02:20:44.818) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 234
start to pop in queue's packet size: 0xdc4
(19700103 02:20:44.818) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:235
(19700103 02:20:44.818) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.821) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.831) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 254
(19700103 02:20:44.832) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 254!
(19700103 02:20:44.855) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 235
start to pop in queue's packet size: 0xeb1
(19700103 02:20:44.855) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:236
(19700103 02:20:44.855) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.858) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.863) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 255
(19700103 02:20:44.864) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 255!
(19700103 02:20:44.894) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 236
start to pop in queue's packet size: 0xe95
(19700103 02:20:44.894) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:237
(19700103 02:20:44.894) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.897) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.898) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 256
(19700103 02:20:44.899) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 256!
(19700103 02:20:44.931) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 257
(19700103 02:20:44.932) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 257!
(19700103 02:20:44.935) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 237
start to pop in queue's packet size: 0x1036
(19700103 02:20:44.936) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:238
(19700103 02:20:44.936) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.938) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:20:44.966) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 258
(19700103 02:20:44.967) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 258!
(19700103 02:20:44.973) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 238
start to pop in queue's packet size: 0x10b8
(19700103 02:20:44.973) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:239
(19700103 02:20:44.973) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:20:44.976) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
设置成superfast时20帧的样子
(19700103 02:24:45.033) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 455
start to pop in queue's packet size: 0x1177
(19700103 02:24:45.037) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 456
(19700103 02:24:45.038) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 456!
(19700103 02:24:45.038) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:456
(19700103 02:24:45.038) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.041) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.085) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 457
(19700103 02:24:45.087) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 457!
(19700103 02:24:45.092) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 456
start to pop in queue's packet size: 0xecd
(19700103 02:24:45.092) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:457
(19700103 02:24:45.092) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.096) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.136) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 457
start to pop in queue's packet size: 0xd91
(19700103 02:24:45.137) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 458
(19700103 02:24:45.138) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 458!
(19700103 02:24:45.138) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:458
(19700103 02:24:45.138) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.142) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.174) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 458
start to pop in queue's packet size: 0xe49
(19700103 02:24:45.185) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 459
(19700103 02:24:45.186) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 459!
(19700103 02:24:45.186) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:459
(19700103 02:24:45.186) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.191) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.235) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 459
start to pop in queue's packet size: 0x49c3
(19700103 02:24:45.237) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 460
(19700103 02:24:45.238) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 460!
(19700103 02:24:45.238) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:460
(19700103 02:24:45.238) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.242) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.278) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 460
start to pop in queue's packet size: 0x88c
(19700103 02:24:45.288) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 461
(19700103 02:24:45.289) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 461!
(19700103 02:24:45.289) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:461
(19700103 02:24:45.289) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.292) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.334) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 461
start to pop in queue's packet size: 0xc2d
(19700103 02:24:45.337) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 462
(19700103 02:24:45.338) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 462!
(19700103 02:24:45.338) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:462
(19700103 02:24:45.338) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.342) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.388) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 463
(19700103 02:24:45.389) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 463!
(19700103 02:24:45.391) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 462
start to pop in queue's packet size: 0x102f
(19700103 02:24:45.391) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:463
(19700103 02:24:45.391) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.394) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.437) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 464
(19700103 02:24:45.439) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 464!
(19700103 02:24:45.446) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 463
start to pop in queue's packet size: 0x13fd
(19700103 02:24:45.446) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:464
(19700103 02:24:45.447) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.450) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.489) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 465
(19700103 02:24:45.490) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 465!
(19700103 02:24:45.497) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 464
start to pop in queue's packet size: 0x1708
(19700103 02:24:45.497) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:465
(19700103 02:24:45.497) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.500) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.540) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 466
(19700103 02:24:45.541) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 466!
(19700103 02:24:45.542) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 465
start to pop in queue's packet size: 0x1671
(19700103 02:24:45.542) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:466
(19700103 02:24:45.542) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.544) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.572) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 466
start to pop in queue's packet size: 0x177d
(19700103 02:24:45.589) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 467
(19700103 02:24:45.590) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 467!
(19700103 02:24:45.590) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:467
(19700103 02:24:45.590) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.592) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.641) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 468
(19700103 02:24:45.641) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 467
start to pop in queue's packet size: 0x15c6
(19700103 02:24:45.642) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 468!
(19700103 02:24:45.642) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:468
(19700103 02:24:45.642) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.646) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.687) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 468
start to pop in queue's packet size: 0x1427
(19700103 02:24:45.689) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 469
(19700103 02:24:45.690) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 469!
(19700103 02:24:45.690) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:469
(19700103 02:24:45.691) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.694) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.737) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 469
start to pop in queue's packet size: 0x47ae
(19700103 02:24:45.741) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 470
(19700103 02:24:45.742) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 470!
(19700103 02:24:45.742) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:470
(19700103 02:24:45.742) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.745) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.789) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 471
(19700103 02:24:45.790) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 471!
(19700103 02:24:45.805) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 470
start to pop in queue's packet size: 0xed0
(19700103 02:24:45.806) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:471
(19700103 02:24:45.806) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.808) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.841) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 472
(19700103 02:24:45.842) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 471
(19700103 02:24:45.842) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 472!
start to pop in queue's packet size: 0x1128
(19700103 02:24:45.842) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:472
(19700103 02:24:45.842) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.845) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.888) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 472
start to pop in queue's packet size: 0x1393
(19700103 02:24:45.892) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 473
(19700103 02:24:45.893) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 473!
(19700103 02:24:45.893) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:473
(19700103 02:24:45.893) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.895) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.941) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 474
(19700103 02:24:45.942) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 474!
(19700103 02:24:45.944) encode_oneFrame[ 213]<DEBUG>: Succeed encode frame: 473
start to pop in queue's packet size: 0x1124
(19700103 02:24:45.945) YUVEnc_Main[ 119]<DEBUG>: start to pull in queue's packet size: 0x96000 cout:474
(19700103 02:24:45.945) encode_oneFrame[ 177]<DEBUG>: i422 enc yuv start
(19700103 02:24:45.947) encode_oneFrame[ 192]<DEBUG>: i422 enc get yuv end
(19700103 02:24:45.993) read_video_frame[ 78]<DEBUG>: buffers.length=614400,count_flag = 475
(19700103 02:24:45.994) YUVSend_Queue[ 87]<DEBUG>: [ yuvsend ] : yuv queue push 475!
以上编码速度都会在动态下有马赛克。