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

Commit 1846096f authored by Andreas Huber's avatar Andreas Huber
Browse files

The AVC software decoder always aligns the decoded dimensions to 16 pixel...

The AVC software decoder always aligns the decoded dimensions to 16 pixel boundaries, report this properly to callers.
parent 0fc86329
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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;