media_modules: enable ge2d for sc2 hcode h264 [1/1]
authorRico Yang <wei.yang@amlogic.com>
Sun, 12 Jul 2020 16:04:16 +0000 (00:04 +0800)
committergerrit autosubmit <gerrit.autosubmit@scgit.amlogic.com>
Thu, 30 Jul 2020 10:44:17 +0000 (03:44 -0700)
PD#SWPL-29388

Problem:
cts case android.media.cts.EncodeVirtualDisplayTest#testEncodeVirtualDisplay
failed because of color space mismatch

Solution:
use ge2d to convert color space before encoding

Verify:
verified on S905X4

Change-Id: I0488ca1f0d6bdbfa439268917cbd6c932b294f61
Signed-off-by: Rico Yang <wei.yang@amlogic.com>
drivers/frame_sink/encoder/h264/encoder.c

index 549788d036fd1babc0bc9be7ac2a56833ffcada3..66a3f6c8552ae6264e4f0f9c4c32479e84beef9c 100644 (file)
@@ -2762,7 +2762,7 @@ static void encode_isr_tasklet(ulong data)
 {
        struct encode_manager_s *manager = (struct encode_manager_s *)data;
 
-       enc_pr(LOG_ERROR, "encoder is done %d\n", manager->encode_hw_status);
+       enc_pr(LOG_INFO, "encoder is done %d\n", manager->encode_hw_status);
        if (((manager->encode_hw_status == ENCODER_IDR_DONE)
                || (manager->encode_hw_status == ENCODER_NON_IDR_DONE)
                || (manager->encode_hw_status == ENCODER_SEQUENCE_DONE)
@@ -2858,11 +2858,6 @@ static s32 convert_request(struct encode_wq_s *wq, u32 *cmd_info)
                        enc_pr(LOG_INFO, "hwenc: force wq->request.scale_enable=%d\n", wq->request.scale_enable);
                }
 
-               if (get_cpu_type() >= MESON_CPU_MAJOR_ID_SC2) {
-                       enc_pr(LOG_INFO, "disable ge2d scale for sc2\n");
-                       wq->request.scale_enable = 0;
-               }
-
                wq->request.nr_mode =
                        (nr_mode > 0) ? nr_mode : cmd_info[16];
                if (cmd == ENCODER_IDR)