video-scaler: add where orc functions could go

Add the disabled orc functions in #if 0 lines for when we can enable
them.
This commit is contained in:
Wim Taymans 2014-12-02 11:48:11 +01:00
parent d03136f1ea
commit fc1d24ec45

View file

@ -376,20 +376,20 @@ static void
video_scale_h_near_u32 (GstVideoScaler * scale, video_scale_h_near_u32 (GstVideoScaler * scale,
gpointer src, gpointer dest, guint dest_offset, guint width) gpointer src, gpointer dest, guint dest_offset, guint width)
{ {
guint32 *s, *d; guint32 *s, *d, *offset;
d = (guint32 *) dest + dest_offset; d = (guint32 *) dest + dest_offset;
s = (guint32 *) src; s = (guint32 *) src;
offset = scale->resampler.offset + dest_offset;
#if 0 #if 0
/* ORC is slower on this */ /* ORC is slower on this */
video_orc_resample_h_near_u32_lq (d, s, 0, scale->inc, width); video_orc_resample_h_near_u32_lq (d, s, 0, scale->inc, width);
#elif 0
video_orc_resample_h_near_u32 (d, s, offset, width);
#else #else
{ {
gint i; gint i;
guint32 *offset;
offset = scale->resampler.offset + dest_offset;
for (i = 0; i < width; i++) for (i = 0; i < width; i++)
d[i] = s[offset[i]]; d[i] = s[offset[i]];
} }
@ -430,8 +430,8 @@ video_scale_h_ntap_4u8 (GstVideoScaler * scale,
gpointer src, gpointer dest, guint dest_offset, guint width) gpointer src, gpointer dest, guint dest_offset, guint width)
{ {
gint16 *taps; gint16 *taps;
gint i, max_taps, count; gint max_taps, count;
guint32 *d; guint32 *d, *s;
guint32 *offset_n; guint32 *offset_n;
guint32 *pixels; guint32 *pixels;
gint32 *temp; gint32 *temp;
@ -447,12 +447,20 @@ video_scale_h_ntap_4u8 (GstVideoScaler * scale,
offset_n = scale->offset_n; offset_n = scale->offset_n;
d = (guint32 *) dest + dest_offset; d = (guint32 *) dest + dest_offset;
s = (guint32 *) src;
/* prepare the arrays FIXME, we can add this into ORC */ /* prepare the arrays */
count = width * max_taps; count = width * max_taps;
pixels = (guint32 *) scale->tmpline1; pixels = (guint32 *) scale->tmpline1;
#if 0
video_orc_resample_h_near_u32 (pixels, s, offset_n, count);
#else
{
gint i;
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
pixels[i] = ((guint32 *) src)[offset_n[i]]; pixels[i] = s[offset_n[i]];
}
#endif
temp = (gint32 *) scale->tmpline2; temp = (gint32 *) scale->tmpline2;
taps = scale->taps_s16_4; taps = scale->taps_s16_4;