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

Commit 12ae9fb5 authored by Vignesh Venkatasubramanian's avatar Vignesh Venkatasubramanian
Browse files

av1: Allow odd width/height for YUV420

Allow odd width/height values for the gav1 software decoder.

Notes:
* We already allocate the graphic block with a stride that is a
  multiple of 16, that behavior is retained.
* We also allocate the graphic buffer with a height alignment of 2 (this
  change is needed because fetchGraphicBlock fails for odd height
  values.
* We set the correct "crop" value in createGraphicBuffer() which will
  handle odd width/height appropriately.
* This change also enables decoding of AVIF images that have odd
  dimensions.

This CL contains changes to the non-mainline files.

Test: CtsMediaTestCases still pass
Bug: 175243729
Merged-In: Ia47fa8f9936873542a6e7f46e2f704b273a69b5c
Merged-In: I89a8d13a3faf172015b79083b40abe3b98ac9809
Change-Id: Ia47fa8f9936873542a6e7f46e2f704b273a69b5c
(cherry picked from commit 9a76ef08)
parent c971bbd9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@
        </MediaCodec>
        <MediaCodec name="c2.android.av1.decoder" type="video/av01">
            <Limit name="size" min="96x96" max="1920x1080" />
            <Limit name="alignment" value="2x2" />
            <Limit name="alignment" value="1x1" />
            <Limit name="block-size" value="16x16" />
            <Limit name="blocks-per-second" min="24" max="2073600" />
            <Limit name="bitrate" range="1-120000000" />
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@
        </MediaCodec>
        <MediaCodec name="c2.android.av1.decoder" type="video/av01" variant="!slow-cpu">
            <Limit name="size" min="2x2" max="2048x2048" />
            <Limit name="alignment" value="2x2" />
            <Limit name="alignment" value="1x1" />
            <Limit name="block-size" value="16x16" />
            <Limit name="block-count" range="1-16384" />
            <Limit name="blocks-per-second" range="1-2073600" />