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.
This commit is contained in:
parent
ea0d78e8e5
commit
abbce230e2
15
ChangeLog
15
ChangeLog
@ -1,3 +1,18 @@
|
|||||||
|
2008-05-02 Sebastian Dröge <slomo@circular-chaos.org>
|
||||||
|
|
||||||
|
* 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-01 Tim-Philipp Müller <tim.muller at collabora co uk>
|
2008-05-01 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* gst/playback/gstdecodebin.c: (free_pad_probe_for_element),
|
* gst/playback/gstdecodebin.c: (free_pad_probe_for_element),
|
||||||
|
@ -89,10 +89,6 @@ enum
|
|||||||
/* FILL ME */
|
/* FILL ME */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* can't handle width/height of 1 yet, since we divide a lot by (n-1) */
|
|
||||||
#undef GST_VIDEO_SIZE_RANGE
|
|
||||||
#define GST_VIDEO_SIZE_RANGE "(int) [ 2, MAX ]"
|
|
||||||
|
|
||||||
static GstStaticCaps gst_video_scale_format_caps[] = {
|
static GstStaticCaps gst_video_scale_format_caps[] = {
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx),
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_RGBx),
|
||||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB),
|
GST_STATIC_CAPS (GST_VIDEO_CAPS_xRGB),
|
||||||
|
@ -163,8 +163,15 @@ vs_image_scale_4tap_Y (const VSImage * dest, const VSImage * src,
|
|||||||
int xacc;
|
int xacc;
|
||||||
int k;
|
int k;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
k = 0;
|
k = 0;
|
||||||
for (i = 0; i < 4; i++) {
|
for (i = 0; i < 4; i++) {
|
||||||
|
@ -46,8 +46,16 @@ vs_image_scale_nearest_RGBA (const VSImage * dest, const VSImage * src,
|
|||||||
int x;
|
int x;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
|
|
||||||
acc = 0;
|
acc = 0;
|
||||||
for (i = 0; i < dest->height; i++) {
|
for (i = 0; i < dest->height; i++) {
|
||||||
@ -79,8 +87,15 @@ vs_image_scale_linear_RGBA (const VSImage * dest, const VSImage * src,
|
|||||||
int dest_size;
|
int dest_size;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = dest->width * 4;
|
dest_size = dest->width * 4;
|
||||||
|
|
||||||
@ -162,8 +177,15 @@ vs_image_scale_nearest_RGB (const VSImage * dest, const VSImage * src,
|
|||||||
int x;
|
int x;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
acc = 0;
|
acc = 0;
|
||||||
for (i = 0; i < dest->height; i++) {
|
for (i = 0; i < dest->height; i++) {
|
||||||
@ -195,8 +217,15 @@ vs_image_scale_linear_RGB (const VSImage * dest, const VSImage * src,
|
|||||||
int dest_size;
|
int dest_size;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = dest->width * 3;
|
dest_size = dest->width * 3;
|
||||||
|
|
||||||
@ -280,8 +309,15 @@ vs_image_scale_nearest_YUYV (const VSImage * dest, const VSImage * src,
|
|||||||
int xacc;
|
int xacc;
|
||||||
int n_quads;
|
int n_quads;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
n_quads = ROUND_UP_2 (dest->width) / 2;
|
n_quads = ROUND_UP_2 (dest->width) / 2;
|
||||||
acc = 0;
|
acc = 0;
|
||||||
@ -315,8 +351,15 @@ vs_image_scale_linear_YUYV (const VSImage * dest, const VSImage * src,
|
|||||||
int n_quads;
|
int n_quads;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = ROUND_UP_4 (dest->width * 2);
|
dest_size = ROUND_UP_4 (dest->width * 2);
|
||||||
n_quads = ROUND_UP_2 (dest->width) / 2;
|
n_quads = ROUND_UP_2 (dest->width) / 2;
|
||||||
@ -398,8 +441,15 @@ vs_image_scale_nearest_UYVY (const VSImage * dest, const VSImage * src,
|
|||||||
int xacc;
|
int xacc;
|
||||||
int n_quads;
|
int n_quads;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
n_quads = (dest->width + 1) / 2;
|
n_quads = (dest->width + 1) / 2;
|
||||||
acc = 0;
|
acc = 0;
|
||||||
@ -433,8 +483,15 @@ vs_image_scale_linear_UYVY (const VSImage * dest, const VSImage * src,
|
|||||||
int n_quads;
|
int n_quads;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = ROUND_UP_4 (dest->width * 2);
|
dest_size = ROUND_UP_4 (dest->width * 2);
|
||||||
n_quads = ROUND_UP_2 (dest->width) / 2;
|
n_quads = ROUND_UP_2 (dest->width) / 2;
|
||||||
@ -515,8 +572,15 @@ vs_image_scale_nearest_Y (const VSImage * dest, const VSImage * src,
|
|||||||
int x;
|
int x;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
acc = 0;
|
acc = 0;
|
||||||
for (i = 0; i < dest->height; i++) {
|
for (i = 0; i < dest->height; i++) {
|
||||||
@ -548,8 +612,15 @@ vs_image_scale_linear_Y (const VSImage * dest, const VSImage * src,
|
|||||||
int dest_size;
|
int dest_size;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = dest->width;
|
dest_size = dest->width;
|
||||||
|
|
||||||
@ -632,8 +703,15 @@ vs_image_scale_nearest_RGB565 (const VSImage * dest, const VSImage * src,
|
|||||||
int x;
|
int x;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
acc = 0;
|
acc = 0;
|
||||||
for (i = 0; i < dest->height; i++) {
|
for (i = 0; i < dest->height; i++) {
|
||||||
@ -665,8 +743,15 @@ vs_image_scale_linear_RGB565 (const VSImage * dest, const VSImage * src,
|
|||||||
int dest_size;
|
int dest_size;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = dest->width * 2;
|
dest_size = dest->width * 2;
|
||||||
|
|
||||||
@ -749,8 +834,15 @@ vs_image_scale_nearest_RGB555 (const VSImage * dest, const VSImage * src,
|
|||||||
int x;
|
int x;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
acc = 0;
|
acc = 0;
|
||||||
for (i = 0; i < dest->height; i++) {
|
for (i = 0; i < dest->height; i++) {
|
||||||
@ -782,8 +874,15 @@ vs_image_scale_linear_RGB555 (const VSImage * dest, const VSImage * src,
|
|||||||
int dest_size;
|
int dest_size;
|
||||||
int xacc;
|
int xacc;
|
||||||
|
|
||||||
y_increment = ((src->height - 1) << 16) / (dest->height - 1);
|
if (dest->height == 1)
|
||||||
x_increment = ((src->width - 1) << 16) / (dest->width - 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);
|
||||||
|
|
||||||
dest_size = dest->width * 2;
|
dest_size = dest->width * 2;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user