mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-28 08:17:29 +00:00
The class is virtual and has one subclass, SubsampledYUVFrame, which is used by the VP9 decoder to return a single frame. The output_to_bitmap(Bitmap&) function can be used to set pixels on an existing bitmap of the correct size to the RGB values that should be displayed. The to_bitmap() function will allocate a new bitmap and fill it using output_to_bitmap. This new class also implements bilinear scaling of the subsampled U and V planes so that subsampled videos' colors will appear smoother.
17 lines
395 B
C++
17 lines
395 B
C++
/*
|
|
* Copyright (c) 2022, the SerenityOS developers.
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <LibVideo/VP9/Decoder.h>
|
|
#include <stddef.h>
|
|
|
|
extern "C" int LLVMFuzzerTestOneInput(u8 const* data, size_t size)
|
|
{
|
|
Video::VP9::Decoder vp9_decoder;
|
|
if (auto decode_error = vp9_decoder.receive_sample({ data, size }); decode_error.is_error())
|
|
return -1;
|
|
return 0;
|
|
}
|