amstream.c: Tweak video buffers
authorRay <1458889+rayelec@users.noreply.github.com>
Fri, 3 May 2019 09:51:29 +0000 (11:51 +0200)
committerNick Xie <nick@khadas.com>
Fri, 12 Jul 2019 05:36:47 +0000 (13:36 +0800)
drivers/amlogic/media_modules/stream_input/amports/amstream.c

index c3c3095..92bd8a0 100644 (file)
@@ -105,8 +105,8 @@ u32 amstream_audio_reset = 0;
 #endif
 #define NO_VDEC2_INIT 1
 
-#define DEFAULT_VIDEO_BUFFER_SIZE       (1024 * 1024 * 3)
-#define DEFAULT_VIDEO_BUFFER_SIZE_4K       (1024 * 1024 * 6)
+#define DEFAULT_VIDEO_BUFFER_SIZE       (1024 * 1024 * 10)
+#define DEFAULT_VIDEO_BUFFER_SIZE_4K       (1024 * 1024 * 15)
 #define DEFAULT_VIDEO_BUFFER_SIZE_TVP       (1024 * 1024 * 10)
 #define DEFAULT_VIDEO_BUFFER_SIZE_4K_TVP       (1024 * 1024 * 15)
 
@@ -524,6 +524,7 @@ static void amstream_change_vbufsize(struct port_priv_s *priv,
                        pvbuf->buf_size = pvbuf->buf_size >> 1;
                }
        } else if (pvbuf->buf_size > def_vstreambuf_sizeM * SZ_1M) {
+               pvbuf->buf_size = def_vstreambuf_sizeM * SZ_1M;
                if (priv->vdec->port_flag & PORT_FLAG_DRM)
                        pvbuf->buf_size = DEFAULT_VIDEO_BUFFER_SIZE_TVP;
        } else {