[PATCH v4 00/15] media: mtk-vcodec: support for MT8183 decoder
Dafna Hirschfeld
dafna.hirschfeld at collabora.com
Mon Jul 19 04:43:27 PDT 2021
On 13.05.21 10:21, Alexandre Courbot wrote:
> Hi Dafna,
>
> On Thu, Apr 29, 2021 at 9:07 PM Dafna Hirschfeld
> <dafna.hirschfeld at collabora.com> wrote:
>>
>> Hi,
>>
>> On 27.04.21 13:15, Alexandre Courbot wrote:
>>> This series adds support for the stateless API into mtk-vcodec, by first
>>> separating the stateful ops into their own source file, and introducing
>>> a new set of ops suitable for stateless decoding. As such, support for
>>> stateful decoders should remain completely unaffected.
>>>
>>> This series has been tested with both MT8183 and MT8173. Decoding was
>>> working for both chips, and in the case of MT8173 no regression has been
>>> noticed.
>>
>> I am trying to test the decoder with this patchset using v4l2-ctl on mt8173.
>>
>> I am trying to decode an h264 file into V4L2_PIX_FMT_MT21C format.
>> I am not able to do it. It seems that the driver expects each buffer to start
>> with a nal starting code, and the v4l2-ctl command just read the files into
>> buffers without any parsing.
>>
>> Can you share the command and the files you used for testing?
>
> I have been using the Chromium test suite (aka
> video_decode_accelerator_tests). I had doubts after reading your email
> but I tested the series again using this tool and confirmed it was
> working.
Hi, I have a chromeos userspace that I compiled. I use it to test the codec drivers on latest 5.14.
Could you share the exact command you use for your tests?
I used the command:
tast -verbose run -build=false 10.42.0.175 video.DecodeAccel*h264*
With that commands, all the tests that ends with 'VD' fail , the other tests pass.
The docs in [1] says that the command video_decode_accelerator_tests does not require the "full Chrome browser stack",
does that mean that it can be compiled and run on userspace other than chromeos?
I could not find the instructions of how to compile and install that command. Could you instruct me to it?
The mt8173 doc [2] says that the supported video decoders are "H.264, H.265 / HEVC, MPEG-1/2/4"
But running 'v4l2-ctl --list-formats-out -d0' shows:
ioctl: VIDIOC_ENUM_FMT
Type: Video Output Multiplanar
[0]: 'H264' (H.264, compressed)
[1]: 'VP80' (VP8, compressed)
[2]: 'VP90' (VP9, compressed)
So the source code shows support for vp8, vp9 which is not stated in the official doc.
Do you know the explanation for that difference? Do you know if elm device should support vp8, vp9?
[1] https://chromium.googlesource.com/chromium/src/+/HEAD/docs/media/gpu/video_decoder_test_usage.md
[2] https://www.mediatek.com/products/tablets/mt8173
Thanks,
Dafna
>
> Unfortunately this test is not easy to build, but maybe if you have a
> Chromium environment ready you can run it. mtk-vcodec does expect the
> input buffers to be split by NAL units (as per the spec [1] IIUC), so
> that would explain why v4l2-ctl failed (I assume that it also fails
> without this series?).
>
> Maybe ffmpeg can also be used to exercice this driver with properly
> split NAL units, but I am not familiar with its use with V4L2. I'm
> also not sure it would be happy about the MT21C format that the driver
> outputs, or that it could pick the MDP to convert it to something
> readable...
>
> Cheers,
> Alex.
>
> [1] https://www.kernel.org/doc/html/latest/userspace-api/media/v4l/pixfmt-compressed.html#compressed-formats
>
More information about the Linux-mediatek
mailing list