diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-23 02:01:41 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-07-28 03:49:54 +0200 |
commit | 6f7d3bde11b439da106e4226b7d115afded4086d (patch) | |
tree | b80ff2a259077622b7f79512b64e45548273e5a5 /libavcodec/vp9mvs.c | |
parent | 7ab9b30800c0847133fa23fc86d05029d0415fe2 (diff) |
avcodec/vp8, vp9: Avoid using VP56mv and VP56Frame in VP8/9
Instead replace VP56mv by new and identical structures VP8mv and VP9mv.
Also replace VP56Frame by VP8FrameType in vp8.h and use that
in VP8 code. Also remove VP56_FRAME_GOLDEN2, as this has only
been used by VP8, and use VP8_FRAME_ALTREF as replacement for
its usage in VP8 as this is more in line with VP8 verbiage.
This allows to remove all inclusions of vp56.h from everything
that is not VP5/6. This also removes implicit inclusions
of hpeldsp.h, h264chroma.h, vp3dsp.h and vp56dsp.h from all VP8/9
files.
(This also fixes a build issue: If one compiles with -O0 and disables
everything except the VP8-VAAPI encoder, the file containing
ff_vpx_norm_shift is not compiled, yet this is used implicitly
by vp56_rac_gets_nn() which is defined in vp56.h; it is unused
by the VP8-VAAPI encoder and declared as av_unused, yet with -O0
unused noninline functions are not optimized away, leading to
linking failures. With this patch, said function is not included
in vaapi_encode_vp8.c any more.)
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/vp9mvs.c')
-rw-r--r-- | libavcodec/vp9mvs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libavcodec/vp9mvs.c b/libavcodec/vp9mvs.c index c604ec7cb6..8b682166e4 100644 --- a/libavcodec/vp9mvs.c +++ b/libavcodec/vp9mvs.c @@ -22,13 +22,12 @@ */ #include "threadframe.h" -#include "vp56.h" #include "vp89_rac.h" #include "vp9data.h" #include "vp9dec.h" #include "vpx_rac.h" -static av_always_inline void clamp_mv(VP56mv *dst, const VP56mv *src, +static av_always_inline void clamp_mv(VP9mv *dst, const VP9mv *src, VP9TileData *td) { dst->x = av_clip(src->x, td->min_mv.x, td->max_mv.x); @@ -36,7 +35,7 @@ static av_always_inline void clamp_mv(VP56mv *dst, const VP56mv *src, } static void find_ref_mvs(VP9TileData *td, - VP56mv *pmv, int ref, int z, int idx, int sb) + VP9mv *pmv, int ref, int z, int idx, int sb) { static const int8_t mv_ref_blk_off[N_BS_SIZES][8][2] = { [BS_64x64] = { { 3, -1 }, { -1, 3 }, { 4, -1 }, { -1, 4 }, @@ -100,7 +99,7 @@ static void find_ref_mvs(VP9TileData *td, #define RETURN_MV(mv) \ do { \ if (sb > 0) { \ - VP56mv tmp; \ + VP9mv tmp; \ uint32_t m; \ av_assert2(idx == 1); \ av_assert2(mem != INVALID_MV); \ @@ -186,7 +185,7 @@ static void find_ref_mvs(VP9TileData *td, #define RETURN_SCALE_MV(mv, scale) \ do { \ if (scale) { \ - VP56mv mv_temp = { -mv.x, -mv.y }; \ + VP9mv mv_temp = { -mv.x, -mv.y }; \ RETURN_MV(mv_temp); \ } else { \ RETURN_MV(mv); \ @@ -289,7 +288,7 @@ static av_always_inline int read_mv_component(VP9TileData *td, int idx, int hp) return sign ? -(n + 1) : (n + 1); } -void ff_vp9_fill_mv(VP9TileData *td, VP56mv *mv, int mode, int sb) +void ff_vp9_fill_mv(VP9TileData *td, VP9mv *mv, int mode, int sb) { VP9Context *s = td->s; VP9Block *b = td->b; |