2006-11-14 23:08:38 +00:00
|
|
|
/*
|
|
|
|
* Image Scaling Functions (4 tap)
|
|
|
|
* Copyright (c) 2005 David A. Schleef <ds@schleef.org>
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
|
|
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
|
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "vs_image.h"
|
|
|
|
#include "vs_scanline.h"
|
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type):
* ext/alsa/gstalsasink.c: (set_hwparams):
* ext/alsa/gstalsasrc.c: (set_hwparams):
* ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri):
* ext/ogg/gstoggmux.h:
* ext/ogg/gstogmparse.c:
* gst-libs/gst/audio/audio.c:
* gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new):
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_bye_get_reason):
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
* gst/typefind/gsttypefindfunctions.c:
* gst/videoscale/vs_4tap.c:
* gst/videoscale/vs_4tap.h:
* sys/v4l/gstv4lelement.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps):
* sys/v4l/v4l_calls.c:
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init),
(gst_v4lsrc_try_capture):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
(fail_unless_perfect_stream):
* tests/check/elements/audiotestsrc.c: (setup_audiotestsrc):
* tests/check/elements/decodebin.c:
* tests/check/elements/gdpdepay.c: (setup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST),
(setup_gdppay_streamheader):
* tests/check/elements/gnomevfssink.c: (setup_gnomevfssink):
* tests/check/elements/multifdsink.c: (setup_multifdsink):
* tests/check/elements/textoverlay.c:
* tests/check/elements/videorate.c: (setup_videorate):
* tests/check/elements/videotestsrc.c: (setup_videotestsrc):
* tests/check/elements/volume.c: (setup_volume):
* tests/check/elements/vorbisdec.c: (setup_vorbisdec):
* tests/check/elements/vorbistag.c:
* tests/check/generic/clock-selection.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/libs/cddabasesrc.c:
* tests/check/libs/video.c:
* tests/check/pipelines/gio.c:
* tests/check/pipelines/oggmux.c:
* tests/check/pipelines/simple-launch-lines.c:
(simple_launch_lines_suite):
* tests/check/pipelines/streamheader.c:
* tests/check/pipelines/theoraenc.c:
* tests/check/pipelines/vorbisdec.c:
* tests/check/pipelines/vorbisenc.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c: (query_positions_elems),
(query_positions_pads):
* tests/icles/stress-xoverlay.c: (myclock):
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers and using "foo (void)" instead
of "foo ()" for declarations.
* win32/common/libgstrtp.def:
Add gst_rtp_buffer_set_extension_data to the symbol definition file.
2008-03-03 06:04:31 +00:00
|
|
|
#include "vs_4tap.h"
|
|
|
|
|
2006-11-14 23:08:38 +00:00
|
|
|
#include <liboil/liboil.h>
|
|
|
|
#include <math.h>
|
|
|
|
|
|
|
|
#define SHIFT 10
|
|
|
|
|
|
|
|
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
|
|
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
|
|
#define CLAMP(x,a,b) MAX(MIN((x),(b)),(a))
|
|
|
|
|
2006-12-01 10:27:54 +00:00
|
|
|
#ifndef M_PI
|
|
|
|
#define M_PI 3.14159265358979323846
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
#define rint(x) (floor((x)+0.5))
|
|
|
|
#endif
|
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type):
* ext/alsa/gstalsasink.c: (set_hwparams):
* ext/alsa/gstalsasrc.c: (set_hwparams):
* ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri):
* ext/ogg/gstoggmux.h:
* ext/ogg/gstogmparse.c:
* gst-libs/gst/audio/audio.c:
* gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new):
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_bye_get_reason):
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
* gst/typefind/gsttypefindfunctions.c:
* gst/videoscale/vs_4tap.c:
* gst/videoscale/vs_4tap.h:
* sys/v4l/gstv4lelement.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps):
* sys/v4l/v4l_calls.c:
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init),
(gst_v4lsrc_try_capture):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
(fail_unless_perfect_stream):
* tests/check/elements/audiotestsrc.c: (setup_audiotestsrc):
* tests/check/elements/decodebin.c:
* tests/check/elements/gdpdepay.c: (setup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST),
(setup_gdppay_streamheader):
* tests/check/elements/gnomevfssink.c: (setup_gnomevfssink):
* tests/check/elements/multifdsink.c: (setup_multifdsink):
* tests/check/elements/textoverlay.c:
* tests/check/elements/videorate.c: (setup_videorate):
* tests/check/elements/videotestsrc.c: (setup_videotestsrc):
* tests/check/elements/volume.c: (setup_volume):
* tests/check/elements/vorbisdec.c: (setup_vorbisdec):
* tests/check/elements/vorbistag.c:
* tests/check/generic/clock-selection.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/libs/cddabasesrc.c:
* tests/check/libs/video.c:
* tests/check/pipelines/gio.c:
* tests/check/pipelines/oggmux.c:
* tests/check/pipelines/simple-launch-lines.c:
(simple_launch_lines_suite):
* tests/check/pipelines/streamheader.c:
* tests/check/pipelines/theoraenc.c:
* tests/check/pipelines/vorbisdec.c:
* tests/check/pipelines/vorbisenc.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c: (query_positions_elems),
(query_positions_pads):
* tests/icles/stress-xoverlay.c: (myclock):
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers and using "foo (void)" instead
of "foo ()" for declarations.
* win32/common/libgstrtp.def:
Add gst_rtp_buffer_set_extension_data to the symbol definition file.
2008-03-03 06:04:31 +00:00
|
|
|
static int16_t vs_4tap_taps[256][4];
|
2006-11-14 23:08:38 +00:00
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* ext/alsa/gstalsamixertrack.c: (gst_alsa_mixer_track_get_type):
* ext/alsa/gstalsasink.c: (set_hwparams):
* ext/alsa/gstalsasrc.c: (set_hwparams):
* ext/gio/gstgio.c: (gst_gio_uri_handler_get_uri):
* ext/ogg/gstoggmux.h:
* ext/ogg/gstogmparse.c:
* gst-libs/gst/audio/audio.c:
* gst-libs/gst/fft/kiss_fft_f64.c: (kiss_fft_f64_alloc):
* gst-libs/gst/pbutils/missing-plugins.c:
(gst_missing_uri_sink_message_new),
(gst_missing_element_message_new),
(gst_missing_decoder_message_new),
(gst_missing_encoder_message_new):
* gst-libs/gst/rtp/gstbasertppayload.c:
* gst-libs/gst/rtp/gstrtcpbuffer.c:
(gst_rtcp_packet_bye_get_reason):
* gst/audioconvert/gstaudioconvert.c:
* gst/audioresample/gstaudioresample.c:
* gst/ffmpegcolorspace/imgconvert.c:
* gst/playback/test.c: (gen_video_element), (gen_audio_element):
* gst/typefind/gsttypefindfunctions.c:
* gst/videoscale/vs_4tap.c:
* gst/videoscale/vs_4tap.h:
* sys/v4l/gstv4lelement.c:
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_get_any_caps):
* sys/v4l/v4l_calls.c:
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_capture_init),
(gst_v4lsrc_try_capture):
* sys/ximage/ximagesink.c: (gst_ximagesink_check_xshm_calls),
(gst_ximagesink_ximage_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_check_xshm_calls),
(gst_xvimagesink_xvimage_new):
* tests/check/elements/audioconvert.c:
* tests/check/elements/audioresample.c:
(fail_unless_perfect_stream):
* tests/check/elements/audiotestsrc.c: (setup_audiotestsrc):
* tests/check/elements/decodebin.c:
* tests/check/elements/gdpdepay.c: (setup_gdpdepay),
(setup_gdpdepay_streamheader):
* tests/check/elements/gdppay.c: (setup_gdppay), (GST_START_TEST),
(setup_gdppay_streamheader):
* tests/check/elements/gnomevfssink.c: (setup_gnomevfssink):
* tests/check/elements/multifdsink.c: (setup_multifdsink):
* tests/check/elements/textoverlay.c:
* tests/check/elements/videorate.c: (setup_videorate):
* tests/check/elements/videotestsrc.c: (setup_videotestsrc):
* tests/check/elements/volume.c: (setup_volume):
* tests/check/elements/vorbisdec.c: (setup_vorbisdec):
* tests/check/elements/vorbistag.c:
* tests/check/generic/clock-selection.c:
* tests/check/generic/states.c: (setup), (teardown):
* tests/check/libs/cddabasesrc.c:
* tests/check/libs/video.c:
* tests/check/pipelines/gio.c:
* tests/check/pipelines/oggmux.c:
* tests/check/pipelines/simple-launch-lines.c:
(simple_launch_lines_suite):
* tests/check/pipelines/streamheader.c:
* tests/check/pipelines/theoraenc.c:
* tests/check/pipelines/vorbisdec.c:
* tests/check/pipelines/vorbisenc.c:
* tests/examples/seek/scrubby.c:
* tests/examples/seek/seek.c: (query_positions_elems),
(query_positions_pads):
* tests/icles/stress-xoverlay.c: (myclock):
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers and using "foo (void)" instead
of "foo ()" for declarations.
* win32/common/libgstrtp.def:
Add gst_rtp_buffer_set_extension_data to the symbol definition file.
2008-03-03 06:04:31 +00:00
|
|
|
static double
|
2006-11-14 23:08:38 +00:00
|
|
|
vs_4tap_func (double x)
|
|
|
|
{
|
|
|
|
#if 0
|
|
|
|
if (x < -1)
|
|
|
|
return 0;
|
|
|
|
if (x > 1)
|
|
|
|
return 0;
|
|
|
|
if (x < 0)
|
|
|
|
return 1 + x;
|
|
|
|
return 1 - x;
|
|
|
|
#endif
|
|
|
|
#if 0
|
|
|
|
if (x == 0)
|
|
|
|
return 1;
|
|
|
|
return sin (M_PI * x) / (M_PI * x) * (1 - 0.25 * x * x);
|
|
|
|
#endif
|
|
|
|
#if 1
|
|
|
|
if (x == 0)
|
|
|
|
return 1;
|
|
|
|
return sin (M_PI * x) / (M_PI * x);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
vs_4tap_init (void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
double a, b, c, d;
|
|
|
|
double sum;
|
|
|
|
|
|
|
|
for (i = 0; i < 256; i++) {
|
|
|
|
a = vs_4tap_func (-1 - i / 256.0);
|
|
|
|
b = vs_4tap_func (0 - i / 256.0);
|
|
|
|
c = vs_4tap_func (1 - i / 256.0);
|
|
|
|
d = vs_4tap_func (2 - i / 256.0);
|
|
|
|
sum = a + b + c + d;
|
|
|
|
|
|
|
|
vs_4tap_taps[i][0] = rint ((1 << SHIFT) * (a / sum));
|
|
|
|
vs_4tap_taps[i][1] = rint ((1 << SHIFT) * (b / sum));
|
|
|
|
vs_4tap_taps[i][2] = rint ((1 << SHIFT) * (c / sum));
|
|
|
|
vs_4tap_taps[i][3] = rint ((1 << SHIFT) * (d / sum));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
vs_scanline_resample_4tap_Y (uint8_t * dest, uint8_t * src,
|
2008-01-14 01:19:34 +00:00
|
|
|
int n, int src_width, int *xacc, int increment)
|
2006-11-14 23:08:38 +00:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
int acc;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
|
|
|
|
acc = *xacc;
|
|
|
|
for (i = 0; i < n; i++) {
|
|
|
|
j = acc >> 16;
|
|
|
|
x = (acc & 0xff00) >> 8;
|
2008-01-14 01:19:34 +00:00
|
|
|
if (j - 1 >= 0 && j + 2 < src_width) {
|
|
|
|
y = vs_4tap_taps[x][0] * src[MAX (j - 1, 0)];
|
|
|
|
y += vs_4tap_taps[x][1] * src[j];
|
|
|
|
y += vs_4tap_taps[x][2] * src[j + 1];
|
|
|
|
y += vs_4tap_taps[x][3] * src[j + 2];
|
|
|
|
} else {
|
|
|
|
y = vs_4tap_taps[x][0] * src[CLAMP (j - 1, 0, src_width - 1)];
|
|
|
|
y += vs_4tap_taps[x][1] * src[CLAMP (j, 0, src_width - 1)];
|
|
|
|
y += vs_4tap_taps[x][2] * src[CLAMP (j + 1, 0, src_width - 1)];
|
|
|
|
y += vs_4tap_taps[x][3] * src[CLAMP (j + 2, 0, src_width - 1)];
|
|
|
|
}
|
|
|
|
y += (1 << (SHIFT - 1));
|
|
|
|
dest[i] = CLAMP (y >> SHIFT, 0, 255);
|
2006-11-14 23:08:38 +00:00
|
|
|
acc += increment;
|
|
|
|
}
|
|
|
|
*xacc = acc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
vs_scanline_merge_4tap_Y (uint8_t * dest, uint8_t * src1, uint8_t * src2,
|
|
|
|
uint8_t * src3, uint8_t * src4, int n, int acc)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int y;
|
2008-01-14 01:19:34 +00:00
|
|
|
int a, b, c, d;
|
2006-11-14 23:08:38 +00:00
|
|
|
|
|
|
|
acc = (acc >> 8) & 0xff;
|
2008-01-14 01:19:34 +00:00
|
|
|
a = vs_4tap_taps[acc][0];
|
|
|
|
b = vs_4tap_taps[acc][1];
|
|
|
|
c = vs_4tap_taps[acc][2];
|
|
|
|
d = vs_4tap_taps[acc][3];
|
2006-11-14 23:08:38 +00:00
|
|
|
for (i = 0; i < n; i++) {
|
2008-01-14 01:19:34 +00:00
|
|
|
y = a * src1[i];
|
|
|
|
y += b * src2[i];
|
|
|
|
y += c * src3[i];
|
|
|
|
y += d * src4[i];
|
|
|
|
y += (1 << (SHIFT - 1));
|
|
|
|
dest[i] = CLAMP (y >> SHIFT, 0, 255);
|
2006-11-14 23:08:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void
|
|
|
|
vs_image_scale_4tap_Y (const VSImage * dest, const VSImage * src,
|
|
|
|
uint8_t * tmpbuf)
|
|
|
|
{
|
|
|
|
int yacc;
|
|
|
|
int y_increment;
|
|
|
|
int x_increment;
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
int xacc;
|
|
|
|
int k;
|
|
|
|
|
gst/videoscale/: Support 1x1 images as input and output as for example the BBC HQ new streams have 1x1 GIFs in the pl...
Original commit message from CVS:
* gst/videoscale/gstvideoscale.c:
* gst/videoscale/vs_4tap.c: (vs_image_scale_4tap_Y):
* gst/videoscale/vs_image.c: (vs_image_scale_nearest_RGBA),
(vs_image_scale_linear_RGBA), (vs_image_scale_nearest_RGB),
(vs_image_scale_linear_RGB), (vs_image_scale_nearest_YUYV),
(vs_image_scale_linear_YUYV), (vs_image_scale_nearest_UYVY),
(vs_image_scale_linear_UYVY), (vs_image_scale_nearest_Y),
(vs_image_scale_linear_Y), (vs_image_scale_nearest_RGB565),
(vs_image_scale_linear_RGB565), (vs_image_scale_nearest_RGB555),
(vs_image_scale_linear_RGB555):
Support 1x1 images as input and output as for example the BBC HQ new
streams have 1x1 GIFs in the playlists for some reason.
2008-05-02 10:02:05 +00:00
|
|
|
if (dest->height == 1)
|
|
|
|
y_increment = 0;
|
|
|
|
else
|
|
|
|
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
|
|
|
|
|
|
|
if (dest->width == 1)
|
|
|
|
x_increment = 0;
|
|
|
|
else
|
|
|
|
x_increment = ((src->width - 1) << 16) / (dest->width - 1);
|
2006-11-14 23:08:38 +00:00
|
|
|
|
|
|
|
k = 0;
|
|
|
|
for (i = 0; i < 4; i++) {
|
|
|
|
xacc = 0;
|
|
|
|
vs_scanline_resample_4tap_Y (tmpbuf + i * dest->width,
|
2008-01-14 01:19:34 +00:00
|
|
|
src->pixels + i * src->stride, dest->width, src->width,
|
|
|
|
&xacc, x_increment);
|
2006-11-14 23:08:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
yacc = 0;
|
|
|
|
for (i = 0; i < dest->height; i++) {
|
|
|
|
uint8_t *t0, *t1, *t2, *t3;
|
|
|
|
|
|
|
|
j = yacc >> 16;
|
|
|
|
|
2007-06-15 15:23:36 +00:00
|
|
|
while (j > k) {
|
2006-11-14 23:08:38 +00:00
|
|
|
k++;
|
|
|
|
if (k + 3 < src->height) {
|
|
|
|
xacc = 0;
|
|
|
|
vs_scanline_resample_4tap_Y (tmpbuf + ((k + 3) & 3) * dest->width,
|
|
|
|
src->pixels + (k + 3) * src->stride,
|
2008-01-14 01:19:34 +00:00
|
|
|
dest->width, src->width, &xacc, x_increment);
|
2006-11-14 23:08:38 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
t0 = tmpbuf + (CLAMP (j - 1, 0, src->height - 1) & 3) * dest->width;
|
|
|
|
t1 = tmpbuf + (CLAMP (j, 0, src->height - 1) & 3) * dest->width;
|
|
|
|
t2 = tmpbuf + (CLAMP (j + 1, 0, src->height - 1) & 3) * dest->width;
|
|
|
|
t3 = tmpbuf + (CLAMP (j + 2, 0, src->height - 1) & 3) * dest->width;
|
|
|
|
vs_scanline_merge_4tap_Y (dest->pixels + i * dest->stride,
|
|
|
|
t0, t1, t2, t3, dest->width, yacc & 0xffff);
|
|
|
|
|
|
|
|
yacc += y_increment;
|
|
|
|
}
|
|
|
|
}
|