1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

LibGfx+LibVideo: Make BooleanDecoder usable for both VP8 and VP9

The marker bit is VP9-only, so move that into a new initialize_vp9()
function.

finish_decode() is VP9-only, so rename that to finish_decode_vp9().
This commit is contained in:
Nico Weber 2023-05-26 15:08:22 -04:00 committed by Andreas Kling
parent fbc53c1ec3
commit 1dfb065a9c
4 changed files with 19 additions and 9 deletions

View file

@ -229,7 +229,7 @@ public:
auto context_view = frame_context.m_block_contexts.view(rows_start, columns_start, height, width);
auto bit_stream = DECODER_TRY_ALLOC(try_make<BigEndianInputBitStream>(DECODER_TRY_ALLOC(try_make<FixedMemoryStream>(*frame_context.stream))));
auto decoder = DECODER_TRY(DecoderErrorCategory::Corrupted, BooleanDecoder::initialize(move(bit_stream), tile_size));
auto decoder = DECODER_TRY(DecoderErrorCategory::Corrupted, BooleanDecoder::initialize_vp9(move(bit_stream), tile_size));
return TileContext {
frame_context,