Lines Matching refs:ctx

114     DDSContext *ctx = avctx->priv_data;
115 GetByteContext *gbc = &ctx->gbc;
136 ctx->compressed = flags & DDPF_FOURCC;
137 ctx->paletted = flags & DDPF_PALETTE;
141 if (ctx->compressed && ctx->paletted) {
144 ctx->paletted = 0;
147 bpp = ctx->bpp = bytestream2_get_le32(gbc); // rgbbitcount
164 if (ctx->compressed)
167 if (ctx->compressed) {
168 ctx->dec.raw_ratio = 16;
171 ctx->dec.tex_ratio = 8;
172 ctx->dec.tex_funct = ctx->texdsp.dxt1a_block;
175 ctx->dec.tex_ratio = 16;
176 ctx->dec.tex_funct = ctx->texdsp.dxt2_block;
179 ctx->dec.tex_ratio = 16;
180 ctx->dec.tex_funct = ctx->texdsp.dxt3_block;
183 ctx->dec.tex_ratio = 16;
184 ctx->dec.tex_funct = ctx->texdsp.dxt4_block;
187 ctx->dec.tex_ratio = 16;
189 ctx->dec.tex_funct = ctx->texdsp.dxt5ys_block;
191 ctx->dec.tex_funct = ctx->texdsp.dxt5y_block;
193 ctx->dec.tex_funct = ctx->texdsp.dxt5_block;
196 ctx->dec.tex_ratio = 16;
197 ctx->dec.tex_funct = ctx->texdsp.dxt5_block;
200 ctx->postproc = DDS_SWIZZLE_RXGB;
205 ctx->dec.tex_ratio = 8;
206 ctx->dec.tex_funct = ctx->texdsp.rgtc1u_block;
209 ctx->dec.tex_ratio = 8;
210 ctx->dec.tex_funct = ctx->texdsp.rgtc1s_block;
214 ctx->dec.tex_ratio = 16;
215 ctx->dec.tex_funct = ctx->texdsp.dxn3dc_block;
218 ctx->dec.tex_ratio = 16;
219 ctx->dec.tex_funct = ctx->texdsp.rgtc2u_block;
222 ctx->dec.tex_ratio = 16;
223 ctx->dec.tex_funct = ctx->texdsp.rgtc2s_block;
226 ctx->compressed = 0;
230 ctx->compressed = 0;
235 ctx->compressed = 0;
236 ctx->paletted = 1;
240 ctx->compressed = 0;
256 ctx->compressed = (dxgi >= 70) && (dxgi <= 84);
298 ctx->dec.tex_ratio = 8;
299 ctx->dec.tex_funct = ctx->texdsp.dxt1a_block;
305 ctx->dec.tex_ratio = 16;
306 ctx->dec.tex_funct = ctx->texdsp.dxt3_block;
312 ctx->dec.tex_ratio = 16;
313 ctx->dec.tex_funct = ctx->texdsp.dxt5_block;
317 ctx->dec.tex_ratio = 8;
318 ctx->dec.tex_funct = ctx->texdsp.rgtc1u_block;
321 ctx->dec.tex_ratio = 8;
322 ctx->dec.tex_funct = ctx->texdsp.rgtc1s_block;
326 ctx->dec.tex_ratio = 16;
327 ctx->dec.tex_funct = ctx->texdsp.rgtc2u_block;
330 ctx->dec.tex_ratio = 16;
331 ctx->dec.tex_funct = ctx->texdsp.rgtc2s_block;
343 } else if (ctx->paletted) {
364 ctx->postproc = DDS_SWAP_ALPHA;
396 ctx->postproc = DDS_ALPHA_EXP;
398 ctx->postproc = DDS_NORMAL_MAP;
399 else if (ycocg_classic && !ctx->compressed)
400 ctx->postproc = DDS_RAW_YCOCG;
405 ctx->postproc = DDS_SWIZZLE_A2XY;
408 ctx->postproc = DDS_SWIZZLE_XGBR;
411 ctx->postproc = DDS_SWIZZLE_XRBG;
414 ctx->postproc = DDS_SWIZZLE_RBXG;
417 ctx->postproc = DDS_SWIZZLE_RGXB;
420 ctx->postproc = DDS_SWIZZLE_RXBG;
423 ctx->postproc = DDS_SWIZZLE_XGXR;
426 ctx->postproc = DDS_NORMAL_MAP;
444 DDSContext *ctx = avctx->priv_data;
447 switch (ctx->postproc) {
475 x_off = ctx->dec.tex_ratio == 8 ? 0 : 3;
571 DDSContext *ctx = avctx->priv_data;
572 GetByteContext *gbc = &ctx->gbc;
577 ff_texturedsp_init(&ctx->texdsp);
623 if (ctx->compressed) {
625 (avctx->coded_width / TEXTURE_BLOCK_W) * ctx->dec.tex_ratio;
626 ctx->dec.slice_count = av_clip(avctx->thread_count, 1,
637 ctx->dec.tex_data.in = gbc->buffer;
638 ctx->dec.frame_data.out = frame->data[0];
639 ctx->dec.stride = frame->linesize[0];
640 avctx->execute2(avctx, ff_texturedsp_decompress_thread, &ctx->dec, NULL, ctx->dec.slice_count);
641 } else if (!ctx->paletted && ctx->bpp == 4 && avctx->pix_fmt == AV_PIX_FMT_PAL8) {
674 if (ctx->paletted) {
701 if (ctx->postproc != DDS_NONE)