vdec: fix h264 and h265 jitter problem [1/1]
authorgan.zhang <gan.zhang@amlogic.com>
Thu, 22 Oct 2020 06:03:02 +0000 (14:03 +0800)
committerHui Zhang <hui.zhang@amlogic.com>
Fri, 23 Oct 2020 05:11:03 +0000 (22:11 -0700)
PD#SWPL-33158

Problem:
During the start of the playback, due to the inconsistent variable type
between poc and loop_playback_poc_threshold, it enters the logic of loop
playback and sets some frames that are not decoded as output, which
causes the number of frames to be less than the number of decoded frames

Solution:
Set the relevant variables of poc to int type.

Verify:
AK301

Change-Id: Ib3a030b373e98c64ac238211b33529816f7eedcd
Signed-off-by: gan.zhang <gan.zhang@amlogic.com>
drivers/frame_provider/decoder/h264_multi/vmh264.c
drivers/frame_provider/decoder/h265/vh265.c

index 402b5c25cf87187cd7c28ed2ff756a6535310624..f441234098d985e3c14624d94e0ce554762b0c9d 100644 (file)
@@ -342,8 +342,8 @@ static unsigned int mb_count_threshold = 5; /*percentage*/
 static u32 double_write_mode;
 static u32 without_display_mode;
 
-static u32 loop_playback_poc_threshold = 400;
-static u32 poc_threshold = 50;
+static int loop_playback_poc_threshold = 400;
+static int poc_threshold = 50;
 
 /*
  *[3:0] 0: default use config from omx.
@@ -10544,10 +10544,10 @@ MODULE_PARM_DESC(check_slice_num, "\n check_slice_num\n");
 module_param(mb_count_threshold, uint, 0664);
 MODULE_PARM_DESC(mb_count_threshold, "\n mb_count_threshold\n");
 
-module_param(loop_playback_poc_threshold, uint, 0664);
+module_param(loop_playback_poc_threshold, int, 0664);
 MODULE_PARM_DESC(loop_playback_poc_threshold, "\n loop_playback_poc_threshold\n");
 
-module_param(poc_threshold, uint, 0664);
+module_param(poc_threshold, int, 0664);
 MODULE_PARM_DESC(poc_threshold, "\n poc_threshold\n");
 
 module_param(force_config_fence, uint, 0664);
index e905fe1ade3b0af34d4cc212e768b7d055b9cde9..132a3d0776b4f36e3bc724cf9231ba14cbf17089 100644 (file)
@@ -197,8 +197,8 @@ static u32 print_lcu_error = 1;
        bit 0, stream base resend data when decoding buf empty
 */
 static u32 data_resend_policy = 1;
-static u32 poc_num_margin = 1000;
-static u32 poc_error_limit = 30;
+static int poc_num_margin = 1000;
+static int poc_error_limit = 30;
 
 static u32 dirty_time_threshold = 2000;
 static u32 dirty_count_threshold = 200;
@@ -14480,11 +14480,11 @@ module_param(data_resend_policy, uint, 0664);
 MODULE_PARM_DESC(data_resend_policy,
        "\n h265 data_resend_policy\n");
 
-module_param(poc_num_margin, uint, 0664);
+module_param(poc_num_margin, int, 0664);
 MODULE_PARM_DESC(poc_num_margin,
        "\n h265 poc_num_margin\n");
 
-module_param(poc_error_limit, uint, 0664);
+module_param(poc_error_limit, int, 0664);
 MODULE_PARM_DESC(poc_error_limit,
        "\n h265 poc_error_limit\n");