GE2D_FORMAT_M24_NV21 | GE2D_LITTLE_ENDIAN;
if (wq->pic.encoder_width >= 1280 && wq->pic.encoder_height >= 720) {
- ge2d_config->dst_para.format |= GE2D_FORMAT_BT_STANDARD;
+ ge2d_config->dst_para.format |= wq->pic.color_space;
}
ge2d_config->dst_para.fill_color_en = 0;
enc_pr(LOG_INFO, "wq->pic.encoder_height:%d, request fmt=%d\n",
wq->pic.encoder_height, wq->request.fmt);
- if (wq->pic.encoder_width >= 1280 && wq->pic.encoder_height >= 720 && wq->request.fmt == FMT_RGBA8888) {
+ if (wq->pic.encoder_width >= 1280 && wq->pic.encoder_height >= 720
+ && wq->request.fmt == FMT_RGBA8888 && wq->pic.color_space != GE2D_FORMAT_BT601) {
wq->request.scale_enable = 1;
wq->request.src_w = wq->pic.encoder_width;
wq->request.src_h = wq->pic.encoder_height;
- pr_err("hwenc: force wq->request.scale_enable=%d\n", wq->request.scale_enable);
+ enc_pr(LOG_DEBUG, "hwenc: force wq->request.scale_enable=%d\n", wq->request.scale_enable);
}
wq->request.nr_mode =
pr_err("hwenc: AMVENC_AVC_IOC_CONFIG_INIT: w:%d, h:%d\n", wq->pic.encoder_width, wq->pic.encoder_height);
wq->pic.encoder_width = addr_info[2];
wq->pic.encoder_height = addr_info[3];
+
+ wq->pic.color_space = addr_info[4];
+ pr_err("hwenc: AMVENC_AVC_IOC_CONFIG_INIT, wq->pic.color_space=%#x\n", wq->pic.color_space);
if (wq->pic.encoder_width *
wq->pic.encoder_height >= 1280 * 720)
clock_level = 6;