diff options
author | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
---|---|---|
committer | Boyuan Yang <byang@debian.org> | 2022-07-14 15:56:57 -0400 |
commit | d4dbf19f6b0181ee78034bfe4caf189d1c016998 (patch) | |
tree | 47d5d28d2ab770a10e6c48788725c51dffeb84a9 /src/dsp/mask_blend.cc | |
parent | 320ef65362608ee1148c299d8d5d7618af34e470 (diff) | |
download | libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.gz libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.tar.bz2 libgav1-d4dbf19f6b0181ee78034bfe4caf189d1c016998.zip |
New upstream version 0.18.0
Diffstat (limited to 'src/dsp/mask_blend.cc')
-rw-r--r-- | src/dsp/mask_blend.cc | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/dsp/mask_blend.cc b/src/dsp/mask_blend.cc index 207fde0..34d7fe8 100644 --- a/src/dsp/mask_blend.cc +++ b/src/dsp/mask_blend.cc @@ -197,7 +197,50 @@ void Init10bpp() { dsp->inter_intra_mask_blend_8bpp[2] = nullptr; #endif // LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS } +#endif // LIBGAV1_MAX_BITDEPTH >= 10 + +#if LIBGAV1_MAX_BITDEPTH == 12 +void Init12bpp() { + Dsp* const dsp = dsp_internal::GetWritableDspTable(12); + assert(dsp != nullptr); +#if LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS + dsp->mask_blend[0][0] = MaskBlend_C<12, uint16_t, false, 0, 0>; + dsp->mask_blend[1][0] = MaskBlend_C<12, uint16_t, false, 1, 0>; + dsp->mask_blend[2][0] = MaskBlend_C<12, uint16_t, false, 1, 1>; + dsp->mask_blend[0][1] = MaskBlend_C<12, uint16_t, true, 0, 0>; + dsp->mask_blend[1][1] = MaskBlend_C<12, uint16_t, true, 1, 0>; + dsp->mask_blend[2][1] = MaskBlend_C<12, uint16_t, true, 1, 1>; + // These are only used with 8-bit. + dsp->inter_intra_mask_blend_8bpp[0] = nullptr; + dsp->inter_intra_mask_blend_8bpp[1] = nullptr; + dsp->inter_intra_mask_blend_8bpp[2] = nullptr; +#else // !LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS + static_cast<void>(dsp); +#ifndef LIBGAV1_Dsp12bpp_MaskBlend444 + dsp->mask_blend[0][0] = MaskBlend_C<12, uint16_t, false, 0, 0>; +#endif +#ifndef LIBGAV1_Dsp12bpp_MaskBlend422 + dsp->mask_blend[1][0] = MaskBlend_C<12, uint16_t, false, 1, 0>; +#endif +#ifndef LIBGAV1_Dsp12bpp_MaskBlend420 + dsp->mask_blend[2][0] = MaskBlend_C<12, uint16_t, false, 1, 1>; #endif +#ifndef LIBGAV1_Dsp12bpp_MaskBlendInterIntra444 + dsp->mask_blend[0][1] = MaskBlend_C<12, uint16_t, true, 0, 0>; +#endif +#ifndef LIBGAV1_Dsp12bpp_MaskBlendInterIntra422 + dsp->mask_blend[1][1] = MaskBlend_C<12, uint16_t, true, 1, 0>; +#endif +#ifndef LIBGAV1_Dsp12bpp_MaskBlendInterIntra420 + dsp->mask_blend[2][1] = MaskBlend_C<12, uint16_t, true, 1, 1>; +#endif + // These are only used with 8-bit. + dsp->inter_intra_mask_blend_8bpp[0] = nullptr; + dsp->inter_intra_mask_blend_8bpp[1] = nullptr; + dsp->inter_intra_mask_blend_8bpp[2] = nullptr; +#endif // LIBGAV1_ENABLE_ALL_DSP_FUNCTIONS +} +#endif // LIBGAV1_MAX_BITDEPTH == 12 } // namespace @@ -206,6 +249,9 @@ void MaskBlendInit_C() { #if LIBGAV1_MAX_BITDEPTH >= 10 Init10bpp(); #endif +#if LIBGAV1_MAX_BITDEPTH == 12 + Init12bpp(); +#endif } } // namespace dsp |