Hi Dafna, On Thu, Apr 29, 2021 at 9:07 PM Dafna Hirschfeld <dafna.hirschfeld@xxxxxxxxxxxxx> 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. 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