MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / vk_prores_decode_slice

Function vk_prores_decode_slice

libavcodec/vulkan_prores.c:123–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123static int vk_prores_decode_slice(AVCodecContext *avctx,
124 const uint8_t *data,
125 uint32_t size)
126{
127 ProresContext *pr = avctx->priv_data;
128 ProresVulkanDecodePicture *pp = pr->hwaccel_picture_private;
129 FFVulkanDecodePicture *vp = &pp->vp;
130
131 FFVkBuffer *slice_offset = (FFVkBuffer *)pp->metadata_buf->data;
132 FFVkBuffer *slices_buf = vp->slices_buf ? (FFVkBuffer *)vp->slices_buf->data : NULL;
133
134 /* Skip picture header */
135 if (slices_buf && slices_buf->host_ref && !pp->slice_num)
136 pp->bitstream_size = data - slices_buf->mapped_mem;
137
138 AV_WN32(slice_offset->mapped_mem + (pp->slice_num + 0) * sizeof(uint32_t),
139 pp->bitstream_size);
140 AV_WN32(slice_offset->mapped_mem + (pp->slice_num + 1) * sizeof(uint32_t),
141 pp->bitstream_size += size);
142
143 if (!slices_buf || !slices_buf->host_ref) {
144 int err = ff_vk_decode_add_slice(avctx, vp, data, size, 0,
145 &pp->slice_num, NULL);
146 if (err < 0)
147 return err;
148 } else {
149 pp->slice_num++;
150 }
151
152 return 0;
153}
154
155static int vk_prores_end_frame(AVCodecContext *avctx)
156{

Callers

nothing calls this directly

Calls 1

ff_vk_decode_add_sliceFunction · 0.85

Tested by

no test coverage detected