[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: packetizer/av1: fill the full extradata if it doesn't have the optional OBU
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Dec 3 08:17:46 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
13c0f6d5 by Steve Lhomme at 2024-12-03T08:01:02+00:00
packetizer/av1: fill the full extradata if it doesn't have the optional OBU
The optional part needed by the decoders.
This will restart the decoders if needed, but they should have received no frames yet
or the hardware decoder may be usable again or not (after a sequence header change).
(cherry picked from commit a95213e20de69d584324f6d0c9f37c7a7cdfe3e3) (edited)
edited:
- fmt_in was not a pointer in 3.0
- - - - -
79422b98 by Steve Lhomme at 2024-12-03T08:01:02+00:00
demux/mkv: force the packetizer to fill AV1 extradata without optional OBUs
The hardware decoders need it and the packetizer can fill it for us.
(cherry picked from commit f05f3388d32bfff5c20de710f79a87a914dcd166)
- - - - -
3afe1216 by Steve Lhomme at 2024-12-03T08:01:02+00:00
demux/mp4: force the packetizer to fill AV1 extradata without optional OBUs
The hardware decoders need it and the packetizer can fill it for us.
(cherry picked from commit fe8b4bf937ad08d17d69de07ae21e9f326e2bd96) (edited)
edited:
- the extradata handling is missing many backports, adapting the to 3.0 code
- - - - -
3 changed files:
- modules/demux/mkv/matroska_segment_parse.cpp
- modules/demux/mp4/essetup.c
- modules/packetizer/av1.c
Changes:
=====================================
modules/demux/mkv/matroska_segment_parse.cpp
=====================================
@@ -1621,6 +1621,8 @@ bool matroska_segment_c::TrackInit( mkv_track_t * p_tk )
vars.p_tk->b_pts_only = true;
fill_extra_data( vars.p_tk, 0 );
+ if (vars.p_fmt->i_extra <= 4)
+ vars.p_fmt->b_packetized = false; // force full extradata by the packetizer
}
S_CASE("V_MPEG4/MS/V3") {
vars.p_fmt->i_codec = VLC_CODEC_DIV3;
=====================================
modules/demux/mp4/essetup.c
=====================================
@@ -545,6 +545,8 @@ int SetupVideoES( demux_t *p_demux, mp4_track_t *p_track, MP4_Box_t *p_sample )
BOXDATA(p_av1C)->i_av1C );
p_track->fmt.i_extra = BOXDATA(p_av1C)->i_av1C;
}
+ if (p_track->fmt.i_extra <= 4)
+ p_track->fmt.b_packetized = false; // force full extradata by the packetizer
}
}
break;
=====================================
modules/packetizer/av1.c
=====================================
@@ -158,8 +158,9 @@ static void UpdateDecoderFormat(decoder_t *p_dec)
p_dec->fmt_out.i_extra = 0;
}
- if(!p_dec->fmt_in.i_extra && !p_dec->fmt_out.i_extra)
+ if(p_dec->fmt_out.i_extra <= 4)
{
+ free(p_dec->fmt_out.p_extra);
p_dec->fmt_out.i_extra =
AV1_create_DecoderConfigurationRecord((uint8_t **)&p_dec->fmt_out.p_extra,
p_sys->p_sequence_header,
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1c0be0c3b9ed76f0fc52d08371d5498cebbc74e1...3afe12167a72af766740b8277d878167e9366508
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/1c0be0c3b9ed76f0fc52d08371d5498cebbc74e1...3afe12167a72af766740b8277d878167e9366508
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