summaryrefslogtreecommitdiff
path: root/thirdparty/libvpx/vp9/common/vp9_entropymv.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2021-10-15 12:05:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2021-10-15 12:09:11 +0200
commitae74e78909ae0bc476112fb43b9580e969879dcd (patch)
tree49144c84e18719a7ca54a243effc319ea128ab70 /thirdparty/libvpx/vp9/common/vp9_entropymv.h
parente2bfb27efb858c4a1314d314386531cbcdfcf335 (diff)
Remove WebM support (and deps libvpx and opus)
We've had many issues with WebM support and specifically the libvpx library over the years, mostly due to its poor integration in Godot's buildsystem, but without anyone really interested in improving this state. With the new GDExtensions in Godot 4.0, we intend to move video decoding to first-party extensions, and this would likely be done using something like libvlc to expose more codecs. Removing the `webm` module means we can remove libsimplewebm, libvpx and opus, which we were only used for that purpose. Both libvpx and opus were fairly complex pieces of the buildsystem, so this is a nice cleanup. This also removes the compile-time dependency on `yasm`. Fixes lots of compilation or non-working WebM issues which will be linked in the PR.
Diffstat (limited to 'thirdparty/libvpx/vp9/common/vp9_entropymv.h')
-rw-r--r--thirdparty/libvpx/vp9/common/vp9_entropymv.h140
1 files changed, 0 insertions, 140 deletions
diff --git a/thirdparty/libvpx/vp9/common/vp9_entropymv.h b/thirdparty/libvpx/vp9/common/vp9_entropymv.h
deleted file mode 100644
index 2f05ad44b6..0000000000
--- a/thirdparty/libvpx/vp9/common/vp9_entropymv.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-
-#ifndef VP9_COMMON_VP9_ENTROPYMV_H_
-#define VP9_COMMON_VP9_ENTROPYMV_H_
-
-#include "./vpx_config.h"
-
-#include "vpx_dsp/prob.h"
-
-#include "vp9/common/vp9_mv.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct VP9Common;
-
-void vp9_init_mv_probs(struct VP9Common *cm);
-
-void vp9_adapt_mv_probs(struct VP9Common *cm, int usehp);
-
-// Integer pel reference mv threshold for use of high-precision 1/8 mv
-#define COMPANDED_MVREF_THRESH 8
-
-static INLINE int use_mv_hp(const MV *ref) {
- return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH &&
- (abs(ref->col) >> 3) < COMPANDED_MVREF_THRESH;
-}
-
-#define MV_UPDATE_PROB 252
-
-/* Symbols for coding which components are zero jointly */
-#define MV_JOINTS 4
-typedef enum {
- MV_JOINT_ZERO = 0, /* Zero vector */
- MV_JOINT_HNZVZ = 1, /* Vert zero, hor nonzero */
- MV_JOINT_HZVNZ = 2, /* Hor zero, vert nonzero */
- MV_JOINT_HNZVNZ = 3, /* Both components nonzero */
-} MV_JOINT_TYPE;
-
-static INLINE int mv_joint_vertical(MV_JOINT_TYPE type) {
- return type == MV_JOINT_HZVNZ || type == MV_JOINT_HNZVNZ;
-}
-
-static INLINE int mv_joint_horizontal(MV_JOINT_TYPE type) {
- return type == MV_JOINT_HNZVZ || type == MV_JOINT_HNZVNZ;
-}
-
-/* Symbols for coding magnitude class of nonzero components */
-#define MV_CLASSES 11
-typedef enum {
- MV_CLASS_0 = 0, /* (0, 2] integer pel */
- MV_CLASS_1 = 1, /* (2, 4] integer pel */
- MV_CLASS_2 = 2, /* (4, 8] integer pel */
- MV_CLASS_3 = 3, /* (8, 16] integer pel */
- MV_CLASS_4 = 4, /* (16, 32] integer pel */
- MV_CLASS_5 = 5, /* (32, 64] integer pel */
- MV_CLASS_6 = 6, /* (64, 128] integer pel */
- MV_CLASS_7 = 7, /* (128, 256] integer pel */
- MV_CLASS_8 = 8, /* (256, 512] integer pel */
- MV_CLASS_9 = 9, /* (512, 1024] integer pel */
- MV_CLASS_10 = 10, /* (1024,2048] integer pel */
-} MV_CLASS_TYPE;
-
-#define CLASS0_BITS 1 /* bits at integer precision for class 0 */
-#define CLASS0_SIZE (1 << CLASS0_BITS)
-#define MV_OFFSET_BITS (MV_CLASSES + CLASS0_BITS - 2)
-#define MV_FP_SIZE 4
-
-#define MV_MAX_BITS (MV_CLASSES + CLASS0_BITS + 2)
-#define MV_MAX ((1 << MV_MAX_BITS) - 1)
-#define MV_VALS ((MV_MAX << 1) + 1)
-
-#define MV_IN_USE_BITS 14
-#define MV_UPP ((1 << MV_IN_USE_BITS) - 1)
-#define MV_LOW (-(1 << MV_IN_USE_BITS))
-
-extern const vpx_tree_index vp9_mv_joint_tree[];
-extern const vpx_tree_index vp9_mv_class_tree[];
-extern const vpx_tree_index vp9_mv_class0_tree[];
-extern const vpx_tree_index vp9_mv_fp_tree[];
-
-typedef struct {
- vpx_prob sign;
- vpx_prob classes[MV_CLASSES - 1];
- vpx_prob class0[CLASS0_SIZE - 1];
- vpx_prob bits[MV_OFFSET_BITS];
- vpx_prob class0_fp[CLASS0_SIZE][MV_FP_SIZE - 1];
- vpx_prob fp[MV_FP_SIZE - 1];
- vpx_prob class0_hp;
- vpx_prob hp;
-} nmv_component;
-
-typedef struct {
- vpx_prob joints[MV_JOINTS - 1];
- nmv_component comps[2];
-} nmv_context;
-
-static INLINE MV_JOINT_TYPE vp9_get_mv_joint(const MV *mv) {
- if (mv->row == 0) {
- return mv->col == 0 ? MV_JOINT_ZERO : MV_JOINT_HNZVZ;
- } else {
- return mv->col == 0 ? MV_JOINT_HZVNZ : MV_JOINT_HNZVNZ;
- }
-}
-
-MV_CLASS_TYPE vp9_get_mv_class(int z, int *offset);
-
-typedef struct {
- unsigned int sign[2];
- unsigned int classes[MV_CLASSES];
- unsigned int class0[CLASS0_SIZE];
- unsigned int bits[MV_OFFSET_BITS][2];
- unsigned int class0_fp[CLASS0_SIZE][MV_FP_SIZE];
- unsigned int fp[MV_FP_SIZE];
- unsigned int class0_hp[2];
- unsigned int hp[2];
-} nmv_component_counts;
-
-typedef struct {
- unsigned int joints[MV_JOINTS];
- nmv_component_counts comps[2];
-} nmv_context_counts;
-
-void vp9_inc_mv(const MV *mv, nmv_context_counts *mvctx);
-
-#ifdef __cplusplus
-} // extern "C"
-#endif
-
-#endif // VP9_COMMON_VP9_ENTROPYMV_H_