You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
vp9: read all 4x4 blocks in sub8x8 blocks individually with scalability.
This commit is contained in:
@@ -2833,6 +2833,7 @@ static av_always_inline void mc_chroma_scaled(VP9Context *s, vp9_scaled_mc_func
|
|||||||
mc_chroma_scaled(s, s->dsp.s##mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
|
mc_chroma_scaled(s, s->dsp.s##mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
|
||||||
row, col, mv, bw, bh, w, h, bytesperpixel, \
|
row, col, mv, bw, bh, w, h, bytesperpixel, \
|
||||||
s->mvscale[b->ref[i]], s->mvstep[b->ref[i]])
|
s->mvscale[b->ref[i]], s->mvstep[b->ref[i]])
|
||||||
|
#define SCALED 1
|
||||||
#define FN(x) x##_scaled_8bpp
|
#define FN(x) x##_scaled_8bpp
|
||||||
#define BYTES_PER_PIXEL 1
|
#define BYTES_PER_PIXEL 1
|
||||||
#include "vp9_mc_template.c"
|
#include "vp9_mc_template.c"
|
||||||
@@ -2845,6 +2846,7 @@ static av_always_inline void mc_chroma_scaled(VP9Context *s, vp9_scaled_mc_func
|
|||||||
#undef mc_chroma_dir
|
#undef mc_chroma_dir
|
||||||
#undef FN
|
#undef FN
|
||||||
#undef BYTES_PER_PIXEL
|
#undef BYTES_PER_PIXEL
|
||||||
|
#undef SCALED
|
||||||
|
|
||||||
static av_always_inline void mc_luma_unscaled(VP9Context *s, vp9_mc_func (*mc)[2],
|
static av_always_inline void mc_luma_unscaled(VP9Context *s, vp9_mc_func (*mc)[2],
|
||||||
uint8_t *dst, ptrdiff_t dst_stride,
|
uint8_t *dst, ptrdiff_t dst_stride,
|
||||||
@@ -2930,6 +2932,7 @@ static av_always_inline void mc_chroma_unscaled(VP9Context *s, vp9_mc_func (*mc)
|
|||||||
row, col, mv, bw, bh, w, h, i) \
|
row, col, mv, bw, bh, w, h, i) \
|
||||||
mc_chroma_unscaled(s, s->dsp.mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
|
mc_chroma_unscaled(s, s->dsp.mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
|
||||||
row, col, mv, bw, bh, w, h, bytesperpixel)
|
row, col, mv, bw, bh, w, h, bytesperpixel)
|
||||||
|
#define SCALED 0
|
||||||
#define FN(x) x##_8bpp
|
#define FN(x) x##_8bpp
|
||||||
#define BYTES_PER_PIXEL 1
|
#define BYTES_PER_PIXEL 1
|
||||||
#include "vp9_mc_template.c"
|
#include "vp9_mc_template.c"
|
||||||
@@ -2942,6 +2945,7 @@ static av_always_inline void mc_chroma_unscaled(VP9Context *s, vp9_mc_func (*mc)
|
|||||||
#undef mc_chroma_dir_dir
|
#undef mc_chroma_dir_dir
|
||||||
#undef FN
|
#undef FN
|
||||||
#undef BYTES_PER_PIXEL
|
#undef BYTES_PER_PIXEL
|
||||||
|
#undef SCALED
|
||||||
|
|
||||||
static av_always_inline void inter_recon(AVCodecContext *ctx, int bytesperpixel)
|
static av_always_inline void inter_recon(AVCodecContext *ctx, int bytesperpixel)
|
||||||
{
|
{
|
||||||
|
@@ -53,6 +53,7 @@ static void FN(inter_pred)(AVCodecContext *ctx)
|
|||||||
if (b->bs > BS_8x8) {
|
if (b->bs > BS_8x8) {
|
||||||
VP56mv uvmv;
|
VP56mv uvmv;
|
||||||
|
|
||||||
|
#if SCALED == 0
|
||||||
if (b->bs == BS_8x4) {
|
if (b->bs == BS_8x4) {
|
||||||
mc_luma_dir(s, mc[3][b->filter][0], s->dst[0], ls_y,
|
mc_luma_dir(s, mc[3][b->filter][0], s->dst[0], ls_y,
|
||||||
ref1->data[0], ref1->linesize[0], tref1,
|
ref1->data[0], ref1->linesize[0], tref1,
|
||||||
@@ -201,7 +202,9 @@ static void FN(inter_pred)(AVCodecContext *ctx)
|
|||||||
&b->mv[1][1], 4, 8 >> s->ss_v, w2, h2, 1);
|
&b->mv[1][1], 4, 8 >> s->ss_v, w2, h2, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
av_assert2(b->bs == BS_4x4);
|
av_assert2(b->bs == BS_4x4);
|
||||||
|
|
||||||
// FIXME if two horizontally adjacent blocks have the same MV,
|
// FIXME if two horizontally adjacent blocks have the same MV,
|
||||||
|
Reference in New Issue
Block a user