i have ported ffmpeg-x264 for android but the issue is encoder takes more time to encode a frame .It takes above 100ms to encode and cpu rises to 85% in some devices like LG and samsung.i am using the following avcodeccontext settings
c->bit_rate = 256000;
c->width = width;
c->height = height;
c->gop_size = 2;//75;
c->pix_fmt = PIX_FMT_YUV420P;
c->codec_type=AVMEDIA_TYPE_VIDEO;
c->codec_id=CODEC_ID_H264;
c->cqp=36;
is there any other settings that makes the ffmpeg-encoding faster and utilizing less cpu percentage