Skip to content
Snippets Groups Projects
Commit b132d095 authored by Alexandre Janniaux's avatar Alexandre Janniaux Committed by Felix Paul Kühne
Browse files

vpx_alpha: reindent after last changes

parent e3cad491
No related branches found
No related tags found
1 merge request!6018vpx_alpha: fix leaks and refactor merging
Pipeline #513246 passed with stage
in 11 minutes and 52 seconds
...@@ -135,34 +135,30 @@ static picture_t *CombinePicturesCPU(decoder_t *bdec, picture_t *opaque, picture ...@@ -135,34 +135,30 @@ static picture_t *CombinePicturesCPU(decoder_t *bdec, picture_t *opaque, picture
return out; return out;
} }
// use the dummy opaque plane attached in the picture context
struct pic_alpha_plane *p = alpha_ctx->plane;
if (p == NULL)
{ {
// use the dummy opaque plane attached in the picture context int plane_size = bdec->fmt_out.video.i_width * bdec->fmt_out.video.i_height;
struct pic_alpha_plane *p = alpha_ctx->plane; p = malloc(sizeof(*p) + plane_size);
if (p == NULL) if (unlikely(p == NULL))
{ {
int plane_size = bdec->fmt_out.video.i_width * bdec->fmt_out.video.i_height; picture_Release(out);
p = malloc(sizeof(*p) + plane_size); return NULL;
if (unlikely(p == NULL)) }
{
picture_Release(out);
return NULL;
}
{ p->p.i_lines = bdec->fmt_out.video.i_height;
p->p.i_lines = bdec->fmt_out.video.i_height; p->p.i_visible_lines = bdec->fmt_out.video.i_y_offset + bdec->fmt_out.video.i_visible_height;
p->p.i_visible_lines = bdec->fmt_out.video.i_y_offset + bdec->fmt_out.video.i_visible_height;
p->p.i_pitch = bdec->fmt_out.video.i_width; p->p.i_pitch = bdec->fmt_out.video.i_width;
p->p.i_visible_pitch = bdec->fmt_out.video.i_x_offset + bdec->fmt_out.video.i_visible_width; p->p.i_visible_pitch = bdec->fmt_out.video.i_x_offset + bdec->fmt_out.video.i_visible_width;
p->p.i_pixel_pitch = 1; p->p.i_pixel_pitch = 1;
p->p.p_pixels = p->buffer; p->p.p_pixels = p->buffer;
memset(p->p.p_pixels, 0xFF, plane_size); memset(p->p.p_pixels, 0xFF, plane_size);
alpha_ctx->plane = p; alpha_ctx->plane = p;
}
}
out->p[opaque->i_planes] = p->p;
} }
out->p[opaque->i_planes] = p->p;
return out; return out;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment