[vlc-commits] [Git][videolan/vlc][master] mp4: essetup: fix QTRLE decoding

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sun Mar 3 20:44:27 UTC 2024



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
a3896968 by Alexandre Janniaux at 2024-03-03T20:24:55+00:00
mp4: essetup: fix QTRLE decoding

Video using the ffmpeg qtrle decoder are failing to play with:

    [qtrle @ 0x76117804fc00] Unsupported colorspace: 0 bits/sample?
    [0000761178024760] avcodec decoder error: cannot start codec (qtrle)
    [0000761178024760] main decoder error: Codec `rle ' (Apple QuickTime RLE Video) is not supported.
    [0000761178024760] main decoder error: Codec not supported
    [0000761178024760] main decoder error: VLC could not decode the format "rle " (Apple QuickTime RLE Video)

Indeed, QTRLE format can compress source with either 1, 2, 4, 8, 16, 24
or 32 bpp, and the actual bpp is stored in the stst atom, not in the
decoder payload. The demux has to forward this value to the decoder one
way or another.

Regression from 12030f5ccac852aaa3f9f66b20606d2fc344f8f4, which starts
setting the bpp to zero in avcodec because there is no chroma yet.
Defining a chroma instead of forwarding the bpp would be possible for 8,
16, 24 RLE data cases, but would not work for lower RLE data cases.

The correct i_bits_per_pixel field being removed in commit
1d46d8b7ce6220311198013f0172ff3af9e66dab, a hack is implemented instead.
The hack is from 3e5f2e5d208ac66126cda01f05b2ca3cffd3a9ee and other
places that needed it.

Fixes #28550

- - - - -


1 changed file:

- modules/demux/mp4/essetup.c


Changes:

=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -815,6 +815,10 @@ int SetupVideoES( demux_t *p_demux, const mp4_track_t *p_track, const MP4_Box_t
             break;
     }
 
+    /* Codec like QTRLE will need to provide depth. */
+    if (p_fmt->i_profile == -1 && p_fmt->i_level == -1 &&
+        p_fmt->video.i_chroma == 0)
+        p_fmt->i_level = p_vide->i_depth;
     return 1;
 }
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a3896968128d16df4e279af8003b5a8f4bcc6bc0

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/a3896968128d16df4e279af8003b5a8f4bcc6bc0
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list