26 int slice,
int thread_nb)
29 uint8_t *d =
ctx->tex_data.out;
33 int start_slice, end_slice;
34 int base_blocks_per_slice = h_block /
ctx->slice_count;
35 int remainder_blocks = h_block %
ctx->slice_count;
40 start_slice = slice * base_blocks_per_slice;
42 start_slice +=
FFMIN(slice, remainder_blocks);
44 end_slice = start_slice + base_blocks_per_slice;
46 if (slice < remainder_blocks)
49 for (y = start_slice; y < end_slice; y++) {
51 int off = y * w_block;
52 for (x = 0; x < w_block; x++) {
53 ctx->TEXTUREDSP_TEX_FUNC(p + x *
ctx->raw_ratio,
ctx->stride,
54 d + (off + x) *
ctx->tex_ratio);
main external API structure.
int(* execute2)(struct AVCodecContext *c, int(*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count)
The codec may call this to execute several independent things.
#define TEXTUREDSP_FUNC_NAME
static int exec_func(AVCodecContext *avctx, void *arg, int slice, int thread_nb)