overlay: Add support for rotator downscale
Add support for rotator downscale. This is enabled from 8994 onwards
Constraints:
--Downscale should be a power of 2, max upto 32
--Both directions should have equal downscale
--{src_w, src_h} mod downscale = 0
--No BWC
--No Interlaced video support
The rotator's destination rect is modified to reflect the presence of
downscale. Any downscale calcs should be done only after adjusting
crop to meet rotator's requirements.
Smaller downscale is used if we need to chop off any more than 1
line or pixel.
Change-Id: Id07d62fefa3213035f16cca49497800716484a95
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 66fdc65..28289d5 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -161,8 +161,8 @@
};
struct BwcPM {
- static void setBwc(const hwc_rect_t& crop,
- const hwc_rect_t& dst, const int& transform,
+ static void setBwc(const hwc_rect_t& crop, const hwc_rect_t& dst,
+ const int& transform, const int& downscale,
ovutils::eMdpFlags& mdpFlags);
};
@@ -387,6 +387,8 @@
bool isDisplaySplit(hwc_context_t* ctx, int dpy);
+int getRotDownscale(hwc_context_t *ctx, const hwc_layer_1_t *layer);
+
// Set the GPU hint flag to high for MIXED/GPU composition only for
// first frame after MDP to GPU/MIXED mode transition.
// Set the GPU hint to default if the current composition type is GPU