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

Function decode_argb_frame

libavcodec/cllc.c:216–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216static int decode_argb_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
217{
218 AVCodecContext *avctx = ctx->avctx;
219 uint8_t *dst;
220 int pred[4];
221 int ret;
222 int i, j;
223 VLC vlc[4];
224
225 pred[0] = 0;
226 pred[1] = 0x80;
227 pred[2] = 0x80;
228 pred[3] = 0x80;
229
230 dst = pic->data[0];
231
232 skip_bits(gb, 16);
233
234 /* Read in code table for each plane */
235 for (i = 0; i < 4; i++) {
236 ret = read_code_table(ctx, gb, &vlc[i]);
237 if (ret < 0) {
238 for (j = 0; j < i; j++)
239 ff_vlc_free(&vlc[j]);
240
241 av_log(ctx->avctx, AV_LOG_ERROR,
242 "Could not read code table %d.\n", i);
243 return ret;
244 }
245 }
246
247 /* Read in and restore every line */
248 for (i = 0; i < avctx->height; i++) {
249 read_argb_line(ctx, gb, pred, vlc, dst);
250
251 dst += pic->linesize[0];
252 }
253
254 for (i = 0; i < 4; i++)
255 ff_vlc_free(&vlc[i]);
256
257 return 0;
258}
259
260static int decode_rgb24_frame(CLLCContext *ctx, GetBitContext *gb, AVFrame *pic)
261{

Callers 1

cllc_decode_frameFunction · 0.85

Calls 5

skip_bitsFunction · 0.85
read_code_tableFunction · 0.85
ff_vlc_freeFunction · 0.85
av_logFunction · 0.85
read_argb_lineFunction · 0.85

Tested by

no test coverage detected