summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc/dec
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-01-29 13:28:48 -0800
committerAndreas Huber <andih@google.com>2010-01-29 13:28:48 -0800
commit1846096f274048a5882402e12be7c47db91b3834 (patch)
treea3e21c9e87f8ec1910ff8c4cfae209c99bda253f /media/libstagefright/codecs/avc/dec
parent0fc863291096e9818fa83f8edc459f7f9c9cf794 (diff)
downloadframeworks_av-1846096f274048a5882402e12be7c47db91b3834.zip
frameworks_av-1846096f274048a5882402e12be7c47db91b3834.tar.gz
frameworks_av-1846096f274048a5882402e12be7c47db91b3834.tar.bz2
The AVC software decoder always aligns the decoded dimensions to 16 pixel boundaries, report this properly to callers.
Diffstat (limited to 'media/libstagefright/codecs/avc/dec')
-rw-r--r--media/libstagefright/codecs/avc/dec/AVCDecoder.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
index 36272ea..aa2a3d1 100644
--- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
+++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp
@@ -322,8 +322,10 @@ status_t AVCDecoder::read(
crop_top = crop_left = 0;
}
- mFormat->setInt32(kKeyWidth, crop_right - crop_left + 1);
- mFormat->setInt32(kKeyHeight, crop_bottom - crop_top + 1);
+ int32_t aligned_width = (crop_right - crop_left + 1 + 15) & ~15;
+ int32_t aligned_height = (crop_bottom - crop_top + 1 + 15) & ~15;
+ mFormat->setInt32(kKeyWidth, aligned_width);
+ mFormat->setInt32(kKeyHeight, aligned_height);
mInputBuffer->release();
mInputBuffer = NULL;