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

Function hb_decomb_close

libhb/decomb.c:436–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

434}
435
436static void hb_decomb_close(hb_filter_object_t *filter)
437{
438 hb_filter_private_t *pv = filter->private_data;
439
440 if (!pv)
441 {
442 return;
443 }
444
445 if (pv->frames > 1)
446 {
447 hb_log("decomb: deinterlaced %i | blended %i | unfiltered %i | total %i",
448 pv->deinterlaced, pv->blended, pv->unfiltered, pv->frames);
449 }
450
451 taskset_fini(&pv->yadif_taskset);
452
453 if (pv->mode & MODE_DECOMB_EEDI2)
454 {
455 taskset_fini(&pv->eedi2_taskset);
456 }
457
458 hb_buffer_list_close(&pv->out_list);
459
460 // Cleanup reference buffers
461 for (int ii = 0; ii < 3; ii++)
462 {
463 hb_buffer_close(&pv->ref[ii]);
464 }
465
466 if (pv->mode & MODE_DECOMB_EEDI2)
467 {
468 // Cleanup eedi-half buffers
469 for (int ii = 0; ii < 4; ii++)
470 {
471 hb_buffer_close(&pv->eedi_half[ii]);
472 }
473
474 // Cleanup eedi-full buffers
475 for (int ii = 0; ii < 5; ii++)
476 {
477 hb_buffer_close(&pv->eedi_full[ii]);
478 }
479 }
480
481 if (pv->post_processing > 1 && (pv->mode & MODE_DECOMB_EEDI2))
482 {
483 if (pv->cx2) eedi2_aligned_free(pv->cx2);
484 if (pv->cy2) eedi2_aligned_free(pv->cy2);
485 if (pv->cxy) eedi2_aligned_free(pv->cxy);
486 if (pv->tmpc) eedi2_aligned_free(pv->tmpc);
487 }
488
489 free((void *)pv->eedi_limlut);
490 free((void *)pv->crop_table);
491
492 // free memory for yadif structs
493 free(pv->yadif_arguments);

Callers

nothing calls this directly

Calls 5

hb_logFunction · 0.85
taskset_finiFunction · 0.85
hb_buffer_list_closeFunction · 0.85
hb_buffer_closeFunction · 0.85
eedi2_aligned_freeFunction · 0.85

Tested by

no test coverage detected