Lines Matching defs:image
37 AVFrame image;
40 static int check_image_attributes(opj_image_t *image)
42 return(image->comps[0].dx == image->comps[1].dx &&
43 image->comps[1].dx == image->comps[2].dx &&
44 image->comps[0].dy == image->comps[1].dy &&
45 image->comps[1].dy == image->comps[2].dy &&
46 image->comps[0].prec == image->comps[1].prec &&
47 image->comps[1].prec == image->comps[2].prec);
55 avctx->coded_frame = &ctx->image;
64 AVFrame *picture = &ctx->image, *output = data;
67 opj_image_t *image;
100 image = opj_decode_with_info(dec, stream, NULL);
102 if(!image) {
107 width = image->comps[0].w;
108 height = image->comps[0].h;
115 switch(image->numcomps)
119 case 3: if(check_image_attributes(image)) {
129 default: av_log(avctx, AV_LOG_ERROR, "%d components unsupported.\n", image->numcomps);
137 av_log(avctx, AV_LOG_ERROR, "Couldn't allocate image buffer.\n");
141 for(x = 0; x < image->numcomps; x++) {
142 adjust[x] = FFMAX(image->comps[x].prec - 8, 0);
149 *img_ptr++ = image->comps[0].data[index] >> adjust[0];
150 if(image->numcomps > 2 && check_image_attributes(image)) {
151 *img_ptr++ = image->comps[1].data[index] >> adjust[1];
152 *img_ptr++ = image->comps[2].data[index] >> adjust[2];
154 *img_ptr++ = image->comps[3].data[index] >> adjust[3];
159 *output = ctx->image;
164 opj_image_destroy(image);
173 if(ctx->image.data[0])
174 avctx->release_buffer(avctx, &ctx->image);