mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-25 11:11:08 +00:00
deinterlace: greedy, improve quality
scanlines->m1 = same line of the previous field scanlines->t0 = line above of the current field scanlines->b0 = line below of the current field scanlines->mp = same line of the next field Deinterlacing a field weaved frame: When deinterlacing the top field, the next bottom field is available (part of the same frame). but when deinterlacing the bottom field, the next top field (part of the next frame) is not available and scanlines->mp equals NULL. In this case it's better to use greedy algorithm using the prevous field (twice) rather then linear interpolation of the current field. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5331>
This commit is contained in:
parent
be9d9371b7
commit
4bda59f88d
1 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ deinterlace_greedy_interpolate_scanline_orc (GstDeinterlaceSimpleMethod * self,
|
|||
{
|
||||
guint max_comb = GST_DEINTERLACE_METHOD_GREEDY_L (self)->max_comb;
|
||||
|
||||
if (scanlines->m1 == NULL || scanlines->mp == NULL) {
|
||||
if (scanlines->m1 == NULL) {
|
||||
deinterlace_line_linear (out, scanlines->t0, scanlines->b0, size);
|
||||
} else {
|
||||
deinterlace_line_greedy (out, scanlines->m1, scanlines->t0, scanlines->b0,
|
||||
|
@ -89,7 +89,7 @@ deinterlace_greedy_interpolate_scanline_orc_planar_u (GstDeinterlaceSimpleMethod
|
|||
{
|
||||
guint max_comb = GST_DEINTERLACE_METHOD_GREEDY_L (self)->max_comb;
|
||||
|
||||
if (scanlines->m1 == NULL || scanlines->mp == NULL) {
|
||||
if (scanlines->m1 == NULL) {
|
||||
deinterlace_line_linear (out, scanlines->t0, scanlines->b0, size);
|
||||
} else {
|
||||
deinterlace_line_greedy (out, scanlines->m1, scanlines->t0, scanlines->b0,
|
||||
|
@ -104,7 +104,7 @@ deinterlace_greedy_interpolate_scanline_orc_planar_v (GstDeinterlaceSimpleMethod
|
|||
{
|
||||
guint max_comb = GST_DEINTERLACE_METHOD_GREEDY_L (self)->max_comb;
|
||||
|
||||
if (scanlines->m1 == NULL || scanlines->mp == NULL) {
|
||||
if (scanlines->m1 == NULL) {
|
||||
deinterlace_line_linear (out, scanlines->t0, scanlines->b0, size);
|
||||
} else {
|
||||
deinterlace_line_greedy (out, scanlines->m1, scanlines->t0, scanlines->b0,
|
||||
|
|
Loading…
Reference in a new issue