video-scaler: add horizontal 2tap u16 orc function

Add slightly faster u16 horizontal resampler orc function.
This commit is contained in:
Wim Taymans 2015-03-04 16:45:35 +01:00
parent 72fd1345ad
commit 6602861d00
2 changed files with 34 additions and 7 deletions

View file

@ -1802,6 +1802,28 @@ addw w1, w1, 32
shrsw w1, w1, 6
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
.source 1 src1 guint8
.source 1 src2 guint8

View file

@ -752,6 +752,10 @@ video_scale_h_ntap_u16 (GstVideoScaler * scale,
taps = scale->taps_s16_4;
count = width * n_elems;
if (max_taps == 2) {
video_orc_resample_h_2tap_u16 (d, pixels, pixels + count, taps,
taps + count, count);
} else {
/* first pixels with first tap to t4 */
video_orc_resample_h_multaps_u16 (temp, pixels, taps, count);
/* add other pixels with other taps to t4 */
@ -760,6 +764,7 @@ video_scale_h_ntap_u16 (GstVideoScaler * scale,
/* scale and write final result */
video_orc_resample_scaletaps_u16 (d, temp, count);
}
}
static void
video_scale_v_near_u8 (GstVideoScaler * scale,