Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdd24947 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Expose extradata size to userspace"

parents 19bd5134 00d44b5b
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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;