[FFmpeg-devel] [PATCH 1/3] libavcodec/mmaldec: enable MJPEG decoding

Lluís Batlle i Rossell viric at viric.name
Fri Feb 12 00:47:19 EET 2021


On Thu, Feb 11, 2021 at 10:19:01PM +0000, Mark Thompson wrote:
> On 11/02/2021 21:48, Lluís Batlle i Rossel wrote:
> > From: Lluís Batlle i Rossell <viric at viric.name>
> > 
> > From: Cosmin Gorgovan <cosmin at linux-geek.org>
> > 
> > ---
> >   configure              | 1 +
> >   libavcodec/allcodecs.c | 1 +
> >   libavcodec/mmaldec.c   | 4 ++++
> >   3 files changed, 6 insertions(+)
> 
> This seems reasonable.  But, what does it do with non-4:2:0 JPEGs?  Does it fail; convert them to 4:2:0 (like downsampling 4:2:2); have a different non-yuv420p output format?

It works fine here in the Pi:
ffprobe says for a file I created:
  Stream #0:0: Video: mjpeg (Baseline), yuvj422p(pc, bt470bg/unknown/unknown), 640x480, 30 fps, 30 tbr, 1k tbn, 1k tbc (default)

And I can decode it fine with mjpeg_mmal.

I tried to do the same with "-hwaccel vaapi" in intel, and the mjpeg
decoder failed for me.

$ ffmpeg -hwaccel vaapi -i mjpeg422.mkv -y  -f null -
....
[AVHWFramesContext @ 0x192ec40] Failed to read image from surface
0x4000005: 20 (the requested function is not implemented).

while the command above works with the regular yuvj420p mjpeg input.

-- 
(Escriu-me xifrat si saps PGP / Write ciphered if you know PGP)
PGP key 7CBD1DA5 - https://emailselfdefense.fsf.org/


More information about the ffmpeg-devel mailing list