sde: resource config: rectangle alignment for video and rotator
1. Align rectangle to be even for video format input. 2. Align width and height for rotator downscaling case. 3. Validate scaling again after config is done because scaling ratio might be changed. 4. Make sure layer count doesn't exceed mixer stage number. 5. Add sde.disable_rotator_downscaling property for disabling rotator downscaling. 6. Add sde.disable_decimation property for disabling decimation 7. Disable 2 pipes on non-display_split case temporarily as z-order needs be different Change-Id: Iec20c292552b23ff1a4135a6be1695fa8fb737de
This commit is contained in:
@@ -64,16 +64,11 @@ void LogRect(DebugTag debug_tag, const char *prefix, const LayerRect &roi) {
|
||||
prefix, roi.left, roi.top, roi.right, roi.bottom);
|
||||
}
|
||||
|
||||
void NormalizeRect(const uint32_t &factor, LayerRect *rect) {
|
||||
uint32_t left = UINT32(ceilf(rect->left));
|
||||
uint32_t top = UINT32(ceilf(rect->top));
|
||||
uint32_t right = UINT32(floorf(rect->right));
|
||||
uint32_t bottom = UINT32(floorf(rect->bottom));
|
||||
|
||||
rect->left = FLOAT(CeilToMultipleOf(left, factor));
|
||||
rect->top = FLOAT(CeilToMultipleOf(top, factor));
|
||||
rect->right = FLOAT(FloorToMultipleOf(right, factor));
|
||||
rect->bottom = FLOAT(FloorToMultipleOf(bottom, factor));
|
||||
void NormalizeRect(const uint32_t &align_x, const uint32_t &align_y, LayerRect *rect) {
|
||||
rect->left = ROUND_UP_ALIGN_UP(rect->left, align_x);
|
||||
rect->right = ROUND_UP_ALIGN_DOWN(rect->right, align_x);
|
||||
rect->top = ROUND_UP_ALIGN_UP(rect->top, align_y);
|
||||
rect->bottom = ROUND_UP_ALIGN_DOWN(rect->bottom, align_y);
|
||||
}
|
||||
|
||||
} // namespace sde
|
||||
|
||||
Reference in New Issue
Block a user