mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
video-scaler: add horizontal 2tap u16 orc function
Add slightly faster u16 horizontal resampler orc function.
This commit is contained in:
parent
72fd1345ad
commit
6602861d00
2 changed files with 34 additions and 7 deletions
|
@ -1802,6 +1802,28 @@ addw w1, w1, 32
|
||||||
shrsw w1, w1, 6
|
shrsw w1, w1, 6
|
||||||
convsuswb d, w1
|
convsuswb d, w1
|
||||||
|
|
||||||
|
.function video_orc_resample_h_2tap_u16
|
||||||
|
.source 2 s1 guint16
|
||||||
|
.source 2 s2 guint16
|
||||||
|
.source 2 t1 gint16
|
||||||
|
.source 2 t2 gint16
|
||||||
|
.dest 2 d guint16
|
||||||
|
.temp 4 w1
|
||||||
|
.temp 4 w2
|
||||||
|
.temp 4 tl1
|
||||||
|
.temp 4 tl2
|
||||||
|
|
||||||
|
convuwl w1, s1
|
||||||
|
convswl tl1, t1
|
||||||
|
mulll w1, w1, tl1
|
||||||
|
convuwl w2, s2
|
||||||
|
convswl tl2, t2
|
||||||
|
mulll w2, w2, tl2
|
||||||
|
addl w1, w1, w2
|
||||||
|
addl w1, w1, 4096
|
||||||
|
shrsl w1, w1, 12
|
||||||
|
convsuslw d, w1
|
||||||
|
|
||||||
.function video_orc_resample_v_2tap_u8_lq
|
.function video_orc_resample_v_2tap_u8_lq
|
||||||
.source 1 src1 guint8
|
.source 1 src1 guint8
|
||||||
.source 1 src2 guint8
|
.source 1 src2 guint8
|
||||||
|
|
|
@ -752,13 +752,18 @@ video_scale_h_ntap_u16 (GstVideoScaler * scale,
|
||||||
taps = scale->taps_s16_4;
|
taps = scale->taps_s16_4;
|
||||||
count = width * n_elems;
|
count = width * n_elems;
|
||||||
|
|
||||||
/* first pixels with first tap to t4 */
|
if (max_taps == 2) {
|
||||||
video_orc_resample_h_multaps_u16 (temp, pixels, taps, count);
|
video_orc_resample_h_2tap_u16 (d, pixels, pixels + count, taps,
|
||||||
/* add other pixels with other taps to t4 */
|
taps + count, count);
|
||||||
video_orc_resample_h_muladdtaps_u16 (temp, 0, pixels + count, count * 2,
|
} else {
|
||||||
taps + count, count * 2, count, max_taps - 1);
|
/* first pixels with first tap to t4 */
|
||||||
/* scale and write final result */
|
video_orc_resample_h_multaps_u16 (temp, pixels, taps, count);
|
||||||
video_orc_resample_scaletaps_u16 (d, temp, count);
|
/* add other pixels with other taps to t4 */
|
||||||
|
video_orc_resample_h_muladdtaps_u16 (temp, 0, pixels + count, count * 2,
|
||||||
|
taps + count, count * 2, count, max_taps - 1);
|
||||||
|
/* scale and write final result */
|
||||||
|
video_orc_resample_scaletaps_u16 (d, temp, count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue