Lines Matching refs:image
39 AVFrame image;
42 static int check_image_attributes(opj_image_t *image)
44 return image->comps[0].dx == image->comps[1].dx &&
45 image->comps[1].dx == image->comps[2].dx &&
46 image->comps[0].dy == image->comps[1].dy &&
47 image->comps[1].dy == image->comps[2].dy &&
48 image->comps[0].prec == image->comps[1].prec &&
49 image->comps[1].prec == image->comps[2].prec;
57 avctx->coded_frame = &ctx->image;
65 avctx->coded_frame = &ctx->image;
76 AVFrame *picture = &ctx->image, *output = data;
79 opj_image_t *image;
117 image = opj_decode_with_info(dec, stream, NULL);
119 if(!image) {
124 width = image->x1 - image->x0;
125 height = image->y1 - image->y0;
132 switch(image->numcomps)
136 case 3: if(check_image_attributes(image)) {
146 default: av_log(avctx, AV_LOG_ERROR, "%d components unsupported.\n", image->numcomps);
172 image = opj_decode_with_info(dec, stream, NULL);
175 for(x = 0; x < image->numcomps; x++) {
176 adjust[x] = FFMAX(image->comps[x].prec - 8, 0);
183 *img_ptr++ = image->comps[0].data[index] >> adjust[0];
184 if(image->numcomps > 2 && check_image_attributes(image)) {
185 *img_ptr++ = image->comps[1].data[index] >> adjust[1];
186 *img_ptr++ = image->comps[2].data[index] >> adjust[2];
188 *img_ptr++ = image->comps[3].data[index] >> adjust[3];
193 *output = ctx->image;
198 opj_image_destroy(image);
207 if(ctx->image.data[0])
208 ff_thread_release_buffer(avctx, &ctx->image);