vdec: av1 add sidebind interface for decoder [2/2]
authorjintao xu <jintao.xu@amlogic.com>
Thu, 5 Nov 2020 04:06:25 +0000 (12:06 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Fri, 6 Nov 2020 05:14:38 +0000 (22:14 -0700)
PD#SWPL-34152

Problem:
decoder receive sidebind type id and set to vf

Solution:
add this new feature

Verify:
AH-212

Change-Id: I093f5ae7ac5dce506947d7e92158700f7b774581
Signed-off-by: jintao xu <jintao.xu@amlogic.com>
drivers/frame_provider/decoder/vav1/vav1.c

index 853c2e2467621a2aef1a0a88af61d29b18b1099f..e53a7c4a4db8ce751d6d2acdb56b06a1e42ccf67 100644 (file)
@@ -805,6 +805,8 @@ struct AV1HW_s {
        struct vframe_s vframe_dummy;
        u32 res_ch_flag;
        int buffer_wrap[FRAME_BUFFERS];
+       int sidebind_type;
+       int sidebind_channel_id;
 };
 static void av1_dump_state(struct vdec_s *vdec);
 
@@ -5603,6 +5605,9 @@ static void set_frame_info(struct AV1HW_s *hw, struct vframe_s *vf)
                hdr.color_parms = hw->vf_dp;
                vdec_v4l_set_hdr_infos(ctx, &hdr);
        }
+
+       vf->sidebind_type = hw->sidebind_type;
+       vf->sidebind_channel_id = hw->sidebind_channel_id;
 }
 
 static int vav1_vf_states(struct vframe_states *states, void *op_arg)
@@ -10254,6 +10259,14 @@ static int ammvdec_av1_probe(struct platform_device *pdev)
                        av1_print(hw, 0, "use buf resolution\n");
                }
 
+               if (get_config_int(pdata->config, "sidebind_type",
+                               &config_val) == 0)
+                       hw->sidebind_type = config_val;
+
+               if (get_config_int(pdata->config, "sidebind_channel_id",
+                               &config_val) == 0)
+                       hw->sidebind_channel_id = config_val;
+
                if (get_config_int(pdata->config,
                        "parm_v4l_codec_enable",
                        &config_val) == 0)