Lines Matching refs:ctx
47 NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
48 CUVIDPICPARAMS *pp = &ctx->pic_params;
291 NVDECContext *ctx = avctx->internal->hwaccel_priv_data;
294 ctx->nb_slices = frame_header->tile_cols * frame_header->tile_rows;
296 tmp = av_fast_realloc(ctx->slice_offsets, &ctx->slice_offsets_allocated,
297 ctx->nb_slices * 2 * sizeof(*ctx->slice_offsets));
301 ctx->slice_offsets = tmp;
304 if (ctx->nb_slices == s->tg_end - s->tg_start + 1) {
305 ctx->bitstream = (uint8_t*)buffer;
306 ctx->bitstream_len = size;
308 for (int i = 0; i < ctx->nb_slices; ++i) {
309 ctx->slice_offsets[i*2 ] = s->tile_group_info[i].tile_offset;
310 ctx->slice_offsets[i*2 + 1] = ctx->slice_offsets[i*2] + s->tile_group_info[i].tile_size;
316 tmp = av_fast_realloc(ctx->bitstream_internal, &ctx->bitstream_allocated,
317 ctx->bitstream_len + size);
321 ctx->bitstream = ctx->bitstream_internal = tmp;
323 memcpy(ctx->bitstream + ctx->bitstream_len, buffer, size);
326 ctx->slice_offsets[tile_num*2 ] = ctx->bitstream_len + s->tile_group_info[tile_num].tile_offset;
327 ctx->slice_offsets[tile_num*2 + 1] = ctx->slice_offsets[tile_num*2] + s->tile_group_info[tile_num].tile_size;
329 ctx->bitstream_len += size;