Lines Matching refs:planes

262  *  Free planes, bands and macroblocks buffers.
264 * @param[in] planes pointer to the array of the plane descriptors
266 static av_cold void ivi_free_buffers(IVIPlaneDesc *planes)
271 if (planes[p].bands) {
272 for (b = 0; b < planes[p].num_bands; b++) {
273 IVIBandDesc *band = &planes[p].bands[b];
286 av_freep(&planes[p].bands);
287 planes[p].num_bands = 0;
291 av_cold int ff_ivi_init_planes(AVCodecContext *avctx, IVIPlaneDesc *planes, const IVIPicConfig *cfg,
299 ivi_free_buffers(planes);
306 planes[0].width = cfg->pic_width;
307 planes[0].height = cfg->pic_height;
308 planes[0].num_bands = cfg->luma_bands;
310 /* fill in the descriptors of the chrominance planes */
311 planes[1].width = planes[2].width = (cfg->pic_width + 3) >> 2;
312 planes[1].height = planes[2].height = (cfg->pic_height + 3) >> 2;
313 planes[1].num_bands = planes[2].num_bands = cfg->chroma_bands;
316 planes[p].bands = av_calloc(planes[p].num_bands, sizeof(*planes[p].bands));
317 if (!planes[p].bands)
323 b_width = planes[p].num_bands == 1 ? planes[p].width
324 : (planes[p].width + 1) >> 1;
325 b_height = planes[p].num_bands == 1 ? planes[p].height
326 : (planes[p].height + 1) >> 1;
335 for (b = 0; b < planes[p].num_bands; b++) {
336 band = &planes[p].bands[b]; /* select appropriate plane/band */
349 planes[p].bands[0].blk_vlc.cust_desc.num_rows = 0;
395 av_cold int ff_ivi_init_tiles(IVIPlaneDesc *planes,
405 if (!p && planes[0].num_bands == 4) {
416 for (b = 0; b < planes[p].num_bands; b++) {
417 band = &planes[p].bands[b];
439 ret = ivi_init_tiles(band, planes[0].bands[0].tiles,
1004 (ctx->planes[0].bands[0].mb_size >> 3) - (band->mb_size >> 3));
1107 if (!ctx->planes[0].bands) {
1108 av_log(avctx, AV_LOG_ERROR, "Color planes not initialized yet\n");
1117 for (b = 0; b < ctx->planes[p].num_bands; b++) {
1118 result = decode_band(ctx, &ctx->planes[p].bands[b], avctx);
1132 if (!ctx->planes[p].bands[0].buf)
1142 result = ff_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
1151 ff_ivi_recompose_haar(&ctx->planes[0], frame->data[0], frame->linesize[0]);
1153 ff_ivi_recompose53 (&ctx->planes[0], frame->data[0], frame->linesize[0]);
1155 ivi_output_plane(&ctx->planes[0], frame->data[0], frame->linesize[0]);
1158 ivi_output_plane(&ctx->planes[2], frame->data[1], frame->linesize[1]);
1159 ivi_output_plane(&ctx->planes[1], frame->data[2], frame->linesize[2]);
1215 ivi_free_buffers(&ctx->planes[0]);