27 # define MCFUNC(n) FUNC(n ## _420)
29 # define MCFUNC(n) FUNC(n ## _422)
31 # define MCFUNC(n) FUNC(n ## _444)
35 #define mc_part MCFUNC(mc_part)
42 int x_offset,
int y_offset,
55 x_offset, y_offset, qpix_put, chroma_put,
56 weight_op[0], weight_op[1], weight_avg[0],
59 mc_part_std(h, sl, n, square, height, delta, dest_y, dest_cb, dest_cr,
60 x_offset, y_offset, qpix_put, chroma_put, qpix_avg,
74 const int mb_xy = sl->mb_xy;
75 const int mb_type =
h->cur_pic.mb_type[mb_xy];
84 mc_part(
h, sl, 0, 1, 16, 0, dest_y, dest_cb, dest_cr, 0, 0,
85 qpix_put[0], chroma_put[0], qpix_avg[0], chroma_avg[0],
86 weight_op, weight_avg,
89 mc_part(
h, sl, 0, 0, 8, 8 <<
PIXEL_SHIFT, dest_y, dest_cb, dest_cr, 0, 0,
90 qpix_put[1], chroma_put[0], qpix_avg[1], chroma_avg[0],
91 weight_op, weight_avg,
93 mc_part(
h, sl, 8, 0, 8, 8 <<
PIXEL_SHIFT, dest_y, dest_cb, dest_cr, 0, 4,
94 qpix_put[1], chroma_put[0], qpix_avg[1], chroma_avg[0],
95 weight_op, weight_avg,
98 mc_part(
h, sl, 0, 0, 16, 8 * sl->mb_linesize, dest_y, dest_cb, dest_cr, 0, 0,
99 qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1],
100 &weight_op[1], &weight_avg[1],
102 mc_part(
h, sl, 4, 0, 16, 8 * sl->mb_linesize, dest_y, dest_cb, dest_cr, 4, 0,
103 qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1],
104 &weight_op[1], &weight_avg[1],
111 for (i = 0; i < 4; i++) {
112 const int sub_mb_type = sl->sub_mb_type[i];
114 int x_offset = (i & 1) << 2;
115 int y_offset = (i & 2) << 1;
118 mc_part(
h, sl, n, 1, 8, 0, dest_y, dest_cb, dest_cr,
120 qpix_put[1], chroma_put[1], qpix_avg[1], chroma_avg[1],
121 &weight_op[1], &weight_avg[1],
126 qpix_put[2], chroma_put[1], qpix_avg[2], chroma_avg[1],
127 &weight_op[1], &weight_avg[1],
130 dest_y, dest_cb, dest_cr, x_offset, y_offset + 2,
131 qpix_put[2], chroma_put[1], qpix_avg[2], chroma_avg[1],
132 &weight_op[1], &weight_avg[1],
135 mc_part(
h, sl, n, 0, 8, 4 * sl->mb_linesize,
136 dest_y, dest_cb, dest_cr, x_offset, y_offset,
137 qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2],
138 &weight_op[2], &weight_avg[2],
140 mc_part(
h, sl, n + 1, 0, 8, 4 * sl->mb_linesize,
141 dest_y, dest_cb, dest_cr, x_offset + 2, y_offset,
142 qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2],
143 &weight_op[2], &weight_avg[2],
148 for (j = 0; j < 4; j++) {
149 int sub_x_offset = x_offset + 2 * (j & 1);
150 int sub_y_offset = y_offset + (j & 2);
152 dest_y, dest_cb, dest_cr, sub_x_offset, sub_y_offset,
153 qpix_put[2], chroma_put[2], qpix_avg[2], chroma_avg[2],
154 &weight_op[2], &weight_avg[2],
static void await_references(const H264Context *h, H264SliceContext *sl)
Wait until all reference frames are available for MC operations.
static av_always_inline void prefetch_motion(const H264Context *h, H264SliceContext *sl, int list, int pixel_shift, int chroma_idc)
void(* h264_chroma_mc_func)(uint8_t *dst, uint8_t *src, ptrdiff_t srcStride, int h, int x, int y)
void(* qpel_mc_func)(uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
#define USES_LIST(a, list)
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define IS_DIR(a, part, list)
static av_always_inline void mc_part_weighted(const H264Context *h, H264SliceContext *sl, int n, int square, int height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, const qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, h264_weight_func luma_weight_op, h264_weight_func chroma_weight_op, h264_biweight_func luma_weight_avg, h264_biweight_func chroma_weight_avg, int list0, int list1, int pixel_shift, int chroma_idc)
static void MCFUNC() hl_motion(const H264Context *h, H264SliceContext *sl, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, const qpel_mc_func(*qpix_put)[16], const h264_chroma_mc_func(*chroma_put), const qpel_mc_func(*qpix_avg)[16], const h264_chroma_mc_func(*chroma_avg), const h264_weight_func *weight_op, const h264_biweight_func *weight_avg)
#define FF_THREAD_FRAME
Decode more than one frame at once.
H.264 / AVC / MPEG-4 part10 codec.
void(* h264_weight_func)(uint8_t *block, ptrdiff_t stride, int height, int log2_denom, int weight, int offset)
int implicit_weight[48][48][2]
static const uint8_t scan8[16 *3+3]
int8_t ref_cache[2][5 *8]
static void mc_part_std(AVSContext *h, int chroma_height, int delta, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int x_offset, int y_offset, qpel_mc_func *qpix_put, h264_chroma_mc_func chroma_put, qpel_mc_func *qpix_avg, h264_chroma_mc_func chroma_avg, cavs_vector *mv)
void(* h264_biweight_func)(uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weightd, int weights, int offset)