MCPcopy Create free account
hub / github.com/HandBrake/HandBrake / hb_lapsharp_work

Function hb_lapsharp_work

libhb/lapsharp.c:318–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static int hb_lapsharp_work(hb_filter_object_t *filter,
319 hb_buffer_t ** buf_in,
320 hb_buffer_t ** buf_out)
321{
322 hb_filter_private_t *pv = filter->private_data;
323 hb_buffer_t *in = *buf_in, *out;
324
325 if (in->s.flags & HB_BUF_FLAG_EOF)
326 {
327 *buf_out = in;
328 *buf_in = NULL;
329 return HB_FILTER_DONE;
330 }
331
332 hb_frame_buffer_mirror_stride(in);
333 out = hb_frame_buffer_init(pv->output.pix_fmt, in->f.width, in->f.height);
334 out->f.color_prim = pv->output.color_prim;
335 out->f.color_transfer = pv->output.color_transfer;
336 out->f.color_matrix = pv->output.color_matrix;
337 out->f.color_range = pv->output.color_range;
338 out->f.chroma_location = pv->output.chroma_location;
339
340 int c;
341 for (c = 0; c < 3; c++)
342 {
343 lapsharp_plane_context_t * ctx = &pv->plane_ctx[c];
344 hb_lapsharp(in->plane[c].data,
345 out->plane[c].data,
346 in->plane[c].width,
347 in->plane[c].height,
348 in->plane[c].stride,
349 out->plane[c].stride,
350 ctx);
351 }
352
353 hb_buffer_copy_props(out, in);
354 *buf_out = out;
355
356 return HB_FILTER_OK;
357}

Callers

nothing calls this directly

Calls 3

hb_frame_buffer_initFunction · 0.85
hb_buffer_copy_propsFunction · 0.85

Tested by

no test coverage detected