summaryrefslogtreecommitdiff
path: root/original-kernel-headers/media/msm_media_info.h
diff options
context:
space:
mode:
Diffstat (limited to 'original-kernel-headers/media/msm_media_info.h')
-rw-r--r--original-kernel-headers/media/msm_media_info.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/original-kernel-headers/media/msm_media_info.h b/original-kernel-headers/media/msm_media_info.h
index 0591ae4..9891531 100644
--- a/original-kernel-headers/media/msm_media_info.h
+++ b/original-kernel-headers/media/msm_media_info.h
@@ -137,6 +137,18 @@ enum color_fmts {
COLOR_FMT_NV12_MVTB,
};
+static inline unsigned int VENUS_EXTRADATA_SIZE(int width, int height)
+{
+ (void)height;
+ (void)width;
+
+ /*
+ * In the future, calculate the size based on the w/h but just
+ * hardcode it for now since 8K satisfies all current usecases.
+ */
+ return 8 * 1024;
+}
+
static inline unsigned int VENUS_Y_STRIDE(int color_fmt, int width)
{
unsigned int alignment, stride = 0;
@@ -220,7 +232,7 @@ invalid_input:
static inline unsigned int VENUS_BUFFER_SIZE(
int color_fmt, int width, int height)
{
- const unsigned int extra_size = 8*1024;
+ const unsigned int extra_size = VENUS_EXTRADATA_SIZE(width, height);
unsigned int uv_alignment = 0, size = 0;
unsigned int y_plane, uv_plane, y_stride,
uv_stride, y_sclines, uv_sclines;