Add support for handling odd dimensions

Test: poc in bug
Bug: 137798382

Change-Id: I9df6b869eeb9857799789397615dcb264f73614f
(cherry picked from commit 6f9b564b9e407e401bc2e6c1c24ff50a3ca00fde)
4 files changed