summaryrefslogtreecommitdiff
path: root/src/libxinevdec
diff options
context:
space:
mode:
Diffstat (limited to 'src/libxinevdec')
-rw-r--r--src/libxinevdec/cinepak.c8
-rw-r--r--src/libxinevdec/cyuv.c8
-rw-r--r--src/libxinevdec/fli.c8
-rw-r--r--src/libxinevdec/foovideo.c8
-rw-r--r--src/libxinevdec/idcinvideo.c8
-rw-r--r--src/libxinevdec/image.c6
-rw-r--r--src/libxinevdec/interplayvideo.c8
-rw-r--r--src/libxinevdec/msrle.c8
-rw-r--r--src/libxinevdec/msvc.c8
-rw-r--r--src/libxinevdec/qtrle.c8
-rw-r--r--src/libxinevdec/qtrpza.c9
-rw-r--r--src/libxinevdec/qtsmc.c9
-rw-r--r--src/libxinevdec/rgb.c9
-rw-r--r--src/libxinevdec/roqvideo.c8
-rw-r--r--src/libxinevdec/svq1.c8
-rw-r--r--src/libxinevdec/wc3video.c10
-rw-r--r--src/libxinevdec/yuv.c16
-rw-r--r--src/libxinevdec/yuv_frames.c6
18 files changed, 95 insertions, 58 deletions
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index ad22a7d89..f11f9e46c 100644
--- a/src/libxinevdec/cinepak.c
+++ b/src/libxinevdec/cinepak.c
@@ -22,7 +22,7 @@
* based on overview of Cinepak algorithm and example decoder
* by Tim Ferguson: http://www.csse.monash.edu.au/~timf/
*
- * $Id: cinepak.c,v 1.29 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: cinepak.c,v 1.30 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdlib.h>
@@ -79,6 +79,7 @@ typedef struct cvid_decoder_s {
unsigned int width;
unsigned int height;
+ double ratio;
} cvid_decoder_t;
static unsigned char yuv_palette[256 * 4];
@@ -396,6 +397,7 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->width = (bih->biWidth + 1) & ~0x1;
this->height = (bih->biHeight + 1) & ~0x1;
+ this->ratio = (double)this->width/(double)this->height;
this->coded_width = (this->width + 3) & ~0x3;
this->coded_height = (this->height + 3) & ~0x3;
this->luma_pitch = this->coded_width;
@@ -444,7 +446,7 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_SQUARE,
+ this->ratio,
XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
img->duration = this->video_step;
@@ -558,6 +560,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "cinepak", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "cinepak", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/cyuv.c b/src/libxinevdec/cyuv.c
index 22871cd82..570a94787 100644
--- a/src/libxinevdec/cyuv.c
+++ b/src/libxinevdec/cyuv.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: cyuv.c,v 1.16 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: cyuv.c,v 1.17 2003/08/04 03:47:10 miguelfreitas Exp $
*/
/* And this is the header that came with the CYUV decoder: */
@@ -74,6 +74,7 @@ typedef struct cyuv_decoder_s {
int size;
int width;
int height;
+ double ratio;
} cyuv_decoder_t;
/* ------------------------------------------------------------------------
@@ -159,6 +160,7 @@ static void cyuv_decode_data (video_decoder_t *this_gen,
this->size = 0;
this->width = *(unsigned int *)&buf->content[4];
this->height = *(unsigned int *)&buf->content[8];
+ this->ratio = (double)this->width/(double)this->height;
this->skipframes = 0;
this->video_step = buf->decoder_info[1];
@@ -182,7 +184,7 @@ static void cyuv_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* time to decode a frame */
img = this->stream->video_out->get_frame (this->stream->video_out,
- this->width, this->height, XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YUY2,
+ this->width, this->height, this->ratio, XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
img->pts = buf->pts;
@@ -281,6 +283,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "cyuv", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "cyuv", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c
index 12045a760..5684aa93f 100644
--- a/src/libxinevdec/fli.c
+++ b/src/libxinevdec/fli.c
@@ -23,7 +23,7 @@
* avoid when implementing a FLI decoder, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: fli.c,v 1.18 2003/02/08 15:39:07 tmmm Exp $
+ * $Id: fli.c,v 1.19 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -76,6 +76,7 @@ typedef struct fli_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
/* FLI decoding parameters */
unsigned char yuv_palette[PALETTE_SIZE];
@@ -436,6 +437,7 @@ static void fli_decode_data (video_decoder_t *this_gen,
/* RGB -> YUV converter requires even width */
this->width = (LE_16(&buf->content[8]) + 1) & ~0x1;
this->height = LE_16(&buf->content[10]);
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
this->magic_number = LE_16(&buf->content[4]);
@@ -473,7 +475,7 @@ static void fli_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -596,7 +598,7 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "fli", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "fli", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/foovideo.c b/src/libxinevdec/foovideo.c
index 57c603f84..842158a07 100644
--- a/src/libxinevdec/foovideo.c
+++ b/src/libxinevdec/foovideo.c
@@ -23,7 +23,7 @@
* value from the last frame. This creates a slowly rotating solid color
* frame when the frames are played in succession.
*
- * $Id: foovideo.c,v 1.14 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: foovideo.c,v 1.15 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -61,6 +61,7 @@ typedef struct foovideo_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
/* these are variables exclusive to the foo video decoder */
unsigned char current_yuv_byte;
@@ -100,6 +101,7 @@ static void foovideo_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = bih->biWidth;
this->height = bih->biHeight;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -135,7 +137,7 @@ static void foovideo_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
@@ -295,6 +297,6 @@ static decoder_info_t dec_info_video = {
*/
plugin_info_t xine_plugin_info[] = {
/* { type, API, "name", version, special_info, init_function } */
- { PLUGIN_VIDEO_DECODER, 14, "foovideo", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "foovideo", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/idcinvideo.c b/src/libxinevdec/idcinvideo.c
index 27fbc8931..97dd8cb93 100644
--- a/src/libxinevdec/idcinvideo.c
+++ b/src/libxinevdec/idcinvideo.c
@@ -21,7 +21,7 @@
* the Id CIN format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: idcinvideo.c,v 1.12 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: idcinvideo.c,v 1.13 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct idcinvideo_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
unsigned char yuv_palette[256 * 4];
yuv_planes_t yuv_planes;
@@ -253,6 +254,7 @@ static void idcinvideo_decode_data (video_decoder_t *this_gen,
this->width = (buf->content[0] << 8) | buf->content[1];
this->height = (buf->content[2] << 8) | buf->content[3];
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -288,7 +290,7 @@ static void idcinvideo_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -402,6 +404,6 @@ static decoder_info_t video_decoder_info = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "idcinvideo", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "idcinvideo", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c
index 8595493ad..c67d09fa4 100644
--- a/src/libxinevdec/image.c
+++ b/src/libxinevdec/image.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: image.c,v 1.4 2003/05/11 22:00:09 holstsn Exp $
+ * $Id: image.c,v 1.5 2003/08/04 03:47:10 miguelfreitas Exp $
*
* a image video decoder
*/
@@ -226,7 +226,7 @@ void end_callback(png_structp png_ptr, png_infop info) {
if (this->rows_valid) {
img = this->stream->video_out->get_frame (this->stream->video_out, this->width,
- this->height, XINE_VO_ASPECT_DONT_TOUCH,
+ this->height, (double)this->width/(double)this->height,
XINE_IMGFMT_YUY2,
VO_BOTH_FIELDS);
@@ -439,6 +439,6 @@ static decoder_info_t dec_info_image = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "image", XINE_VERSION_CODE, &dec_info_image, init_class },
+ { PLUGIN_VIDEO_DECODER, 15, "image", XINE_VERSION_CODE, &dec_info_image, init_class },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/interplayvideo.c b/src/libxinevdec/interplayvideo.c
index 23680a147..df770c10a 100644
--- a/src/libxinevdec/interplayvideo.c
+++ b/src/libxinevdec/interplayvideo.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: interplayvideo.c,v 1.2 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: interplayvideo.c,v 1.3 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -67,6 +67,7 @@ typedef struct interplay_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
unsigned char yuv_palette[256 * 4];
@@ -1157,6 +1158,7 @@ static void interplay_decode_data (video_decoder_t *this_gen,
this->width = (buf->content[0] << 8) | buf->content[1];
this->height = (buf->content[2] << 8) | buf->content[3];
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -1206,7 +1208,7 @@ static void interplay_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
@@ -1379,6 +1381,6 @@ static decoder_info_t dec_info_video = {
*/
plugin_info_t xine_plugin_info[] = {
/* { type, API, "name", version, special_info, init_function } */
- { PLUGIN_VIDEO_DECODER, 14, "interplay", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "interplay", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c
index fbc327ead..aae46dba8 100644
--- a/src/libxinevdec/msrle.c
+++ b/src/libxinevdec/msrle.c
@@ -21,7 +21,7 @@
* For more information on the MS RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: msrle.c,v 1.16 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: msrle.c,v 1.17 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct msrle_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
unsigned char yuv_palette[256 * 4];
yuv_planes_t yuv_planes;
@@ -211,6 +212,7 @@ static void msrle_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -246,7 +248,7 @@ static void msrle_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -365,6 +367,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "msrle", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "msrle", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c
index ba8e06acc..2a1d60bf7 100644
--- a/src/libxinevdec/msvc.c
+++ b/src/libxinevdec/msvc.c
@@ -22,7 +22,7 @@
* based on overview of Microsoft Video-1 algorithm
* by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt
*
- * $Id: msvc.c,v 1.22 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: msvc.c,v 1.23 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdlib.h>
@@ -67,6 +67,7 @@ typedef struct msvc_decoder_s {
unsigned int width;
unsigned int height;
+ double ratio;
} msvc_decoder_t;
/* taken from libw32dll */
@@ -231,6 +232,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->width = (bih->biWidth + 1) & ~0x1;
this->height = bih->biHeight;
+ this->ratio = (double)this->width/(double)this->height;
this->coded_width = (this->width + 3) & ~0x3;
this->coded_height = (this->height + 3) & ~0x3;
this->pitch = 2*this->coded_width;
@@ -279,7 +281,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
@@ -407,6 +409,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "msvc", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "msvc", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/qtrle.c b/src/libxinevdec/qtrle.c
index f609183df..96b8150df 100644
--- a/src/libxinevdec/qtrle.c
+++ b/src/libxinevdec/qtrle.c
@@ -21,7 +21,7 @@
* For more information on the QT RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrle.c,v 1.12 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: qtrle.c,v 1.13 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct qtrle_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
int depth; /* color depth (bits/pixel) */
unsigned char yuv_palette[256 * 4];
@@ -845,6 +846,7 @@ static void qtrle_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = bih->biWidth;
this->height = bih->biHeight;
+ this->ratio = (double)this->width/(double)this->height;
this->depth = bih->biBitCount;
this->video_step = buf->decoder_info[1];
@@ -881,7 +883,7 @@ static void qtrle_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->ratio,
XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
switch (this->depth & 0x1F) {
@@ -1032,6 +1034,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "qtrle", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "qtrle", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/qtrpza.c b/src/libxinevdec/qtrpza.c
index ee80bb33a..429b04dd5 100644
--- a/src/libxinevdec/qtrpza.c
+++ b/src/libxinevdec/qtrpza.c
@@ -21,7 +21,7 @@
* For more information about the RPZA format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrpza.c,v 1.14 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: qtrpza.c,v 1.15 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct qtrpza_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
yuv_planes_t yuv_planes;
@@ -305,6 +306,7 @@ static void qtrpza_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -340,7 +342,8 @@ static void qtrpza_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2,
+ VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -454,6 +457,6 @@ static decoder_info_t video_decoder_info = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "rpza", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "rpza", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/qtsmc.c b/src/libxinevdec/qtsmc.c
index 1df557d33..f658bf2a9 100644
--- a/src/libxinevdec/qtsmc.c
+++ b/src/libxinevdec/qtsmc.c
@@ -23,7 +23,7 @@
* For more information on the SMC format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtsmc.c,v 1.14 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: qtsmc.c,v 1.15 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -68,6 +68,7 @@ typedef struct qtsmc_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
/* SMC color tables */
unsigned char color_pairs[COLORS_PER_TABLE * BYTES_PER_COLOR * CPAIR];
@@ -537,6 +538,7 @@ static void qtsmc_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -572,7 +574,8 @@ static void qtsmc_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2,
+ VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -686,7 +689,7 @@ static decoder_info_t video_decoder_info = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "smc", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "smc", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c
index 6b040ffd8..a45ba574a 100644
--- a/src/libxinevdec/rgb.c
+++ b/src/libxinevdec/rgb.c
@@ -21,7 +21,7 @@
* Actually, this decoder just converts a raw RGB image to a YUY2 map
* suitable for display under xine.
*
- * $Id: rgb.c,v 1.18 2003/01/08 01:02:32 miguelfreitas Exp $
+ * $Id: rgb.c,v 1.19 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct rgb_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
int bytes_per_pixel;
unsigned char yuv_palette[256 * 4];
@@ -107,6 +108,7 @@ static void rgb_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
/* round this number up in case of 15 */
this->bytes_per_pixel = (bih->biBitCount + 1) / 8;
@@ -144,7 +146,8 @@ static void rgb_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2,
+ VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -311,6 +314,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "rgb", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "rgb", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/roqvideo.c b/src/libxinevdec/roqvideo.c
index 2f2fb6bd6..104828058 100644
--- a/src/libxinevdec/roqvideo.c
+++ b/src/libxinevdec/roqvideo.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: roqvideo.c,v 1.18 2003/01/08 01:02:32 miguelfreitas Exp $
+ * $Id: roqvideo.c,v 1.19 2003/08/04 03:47:10 miguelfreitas Exp $
*/
/* And this is the header that came with the RoQ video decoder: */
@@ -100,6 +100,7 @@ typedef struct roq_decoder_s {
int size;
int width;
int height;
+ double ratio;
roq_cell cells[256];
roq_qcell qcells[256];
@@ -401,6 +402,7 @@ static void roqvideo_decode_data (video_decoder_t *this_gen,
this->size = 0;
this->width = (buf->content[0] << 8) | buf->content[1];
this->height = (buf->content[2] << 8) | buf->content[3];
+ this->ratio = (double)this->width/(double)this->height;
this->skipframes = 0;
this->video_step = buf->decoder_info[1];
this->current_planes = 0;
@@ -444,7 +446,7 @@ static void roqvideo_decode_data (video_decoder_t *this_gen,
if (buf->decoder_flags & BUF_FLAG_FRAME_END) { /* time to decode a frame */
img = this->stream->video_out->get_frame (this->stream->video_out,
- this->width, this->height, XINE_VO_ASPECT_SQUARE, XINE_IMGFMT_YV12,
+ this->width, this->height, this->ratio, XINE_IMGFMT_YV12,
VO_BOTH_FIELDS);
img->pts = buf->pts;
@@ -569,6 +571,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "roq", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "roq", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/svq1.c b/src/libxinevdec/svq1.c
index c92795b6a..959efa283 100644
--- a/src/libxinevdec/svq1.c
+++ b/src/libxinevdec/svq1.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: svq1.c,v 1.24 2003/01/31 18:29:47 miguelfreitas Exp $
+ * $Id: svq1.c,v 1.25 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -84,6 +84,7 @@ typedef struct svq1_s {
uint8_t *base[3];
int width;
int height;
+ double ratio;
} svq1_t;
typedef struct {
@@ -1230,6 +1231,7 @@ static int svq1_decode_frame (svq1_t *svq1, uint8_t *buffer, int length) {
svq1->width = (svq1->frame_width + 3) & ~0x3;
svq1->height = (svq1->frame_height + 3) & ~0x3;
+ svq1->ratio = (double)svq1->width/(double)svq1->height;
svq1->luma_width = (svq1->width + 15) & ~0xF;
svq1->luma_height = (svq1->height + 15) & ~0xF;
svq1->chroma_width = ((svq1->width / 4) + 15) & ~0xF;
@@ -1366,7 +1368,7 @@ static void svq1dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
img = this->stream->video_out->get_frame (this->stream->video_out,
this->svq1->width,
this->svq1->height,
- XINE_VO_ASPECT_DONT_TOUCH,
+ this->svq1->ratio,
XINE_IMGFMT_YV12,
VO_BOTH_FIELDS);
@@ -1500,6 +1502,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "svq1", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "svq1", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/wc3video.c b/src/libxinevdec/wc3video.c
index 57286f02f..e0dd4b539 100644
--- a/src/libxinevdec/wc3video.c
+++ b/src/libxinevdec/wc3video.c
@@ -22,7 +22,7 @@
* For more information on the WC3 Movie format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: wc3video.c,v 1.13 2003/01/08 01:02:32 miguelfreitas Exp $
+ * $Id: wc3video.c,v 1.14 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -73,6 +73,8 @@ typedef struct wc3video_decoder_s {
* structure 1 or 2 */
int current_planes;
+ double ratio;
+
} wc3video_decoder_t;
/**************************************************************************
@@ -406,7 +408,7 @@ static void wc3video_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
WC3_WIDTH, WC3_HEIGHT,
- 42, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YUY2, VO_BOTH_FIELDS);
img->duration = this->video_step;
img->pts = buf->pts;
@@ -491,6 +493,8 @@ static video_decoder_t *open_plugin (video_decoder_class_t *class_gen, xine_stre
this->decoder_ok = 0;
this->buf = NULL;
+ this->ratio = (double)WC3_WIDTH/(double)WC3_HEIGHT;
+
return &this->video_decoder;
}
@@ -530,6 +534,6 @@ static decoder_info_t video_decoder_info = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "wc3video", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "wc3video", XINE_VERSION_CODE, &video_decoder_info, &init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index 257df022b..b2e655030 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -21,7 +21,7 @@
* Actually, this decoder just reorganizes chunks of raw YUV data in such
* a way that xine can display them.
*
- * $Id: yuv.c,v 1.19 2003/05/28 13:16:43 jstembridge Exp $
+ * $Id: yuv.c,v 1.20 2003/08/04 03:47:10 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -59,6 +59,7 @@ typedef struct yuv_decoder_s {
int width; /* the width of a video frame */
int height; /* the height of a video frame */
+ double ratio; /* the width to height ratio */
} yuv_decoder_t;
@@ -91,6 +92,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
bih = (xine_bmiheader *) buf->content;
this->width = (bih->biWidth + 3) & ~0x03;
this->height = (bih->biHeight + 3) & ~0x03;
+ this->ratio = (double)this->width/(double)this->height;
this->video_step = buf->decoder_info[1];
if (this->buf)
@@ -142,7 +144,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
xine_fast_memcpy(img->base[1],
@@ -156,7 +158,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
xine_fast_memcpy(img->base[1], this->buf + this->width * this->height,
@@ -170,7 +172,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
yuv9_to_yv12(
@@ -198,7 +200,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- 42, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
xine_fast_memcpy(img->base[0], this->buf, this->width * this->height);
memset( img->base[1], 0x80, this->width * this->height / 4 );
@@ -209,7 +211,7 @@ static void yuv_decode_data (video_decoder_t *this_gen,
/* just allocate something to avoid compiler warnings */
img = this->stream->video_out->get_frame (this->stream->video_out,
this->width, this->height,
- XINE_VO_ASPECT_DONT_TOUCH, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
+ this->ratio, XINE_IMGFMT_YV12, VO_BOTH_FIELDS);
}
@@ -330,6 +332,6 @@ static decoder_info_t dec_info_video = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "yuv", XINE_VERSION_CODE, &dec_info_video, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "yuv", XINE_VERSION_CODE, &dec_info_video, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};
diff --git a/src/libxinevdec/yuv_frames.c b/src/libxinevdec/yuv_frames.c
index 7f4ab6c2c..2b55928db 100644
--- a/src/libxinevdec/yuv_frames.c
+++ b/src/libxinevdec/yuv_frames.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: yuv_frames.c,v 1.4 2003/06/11 23:08:55 miguelfreitas Exp $
+ * $Id: yuv_frames.c,v 1.5 2003/08/04 03:47:10 miguelfreitas Exp $
*
* dummy video decoder for uncompressed video frames as delivered by v4l
*/
@@ -61,7 +61,7 @@ static void yuv_frames_decode_data (video_decoder_t *this_gen, buf_element_t *bu
img = this->stream->video_out->get_frame (this->stream->video_out,
buf->decoder_info[0],
buf->decoder_info[1],
- ASPECT_FULL,
+ (double)buf->decoder_info[0]/(double)buf->decoder_info[1],
XINE_IMGFMT_YV12,
VO_BOTH_FIELDS | VO_INTERLACED_FLAG);
@@ -172,6 +172,6 @@ static decoder_info_t dec_info_yuv_frames = {
plugin_info_t xine_plugin_info[] = {
/* type, API, "name", version, special_info, init_function */
- { PLUGIN_VIDEO_DECODER, 14, "yuv_frames", XINE_VERSION_CODE, &dec_info_yuv_frames, init_plugin },
+ { PLUGIN_VIDEO_DECODER, 15, "yuv_frames", XINE_VERSION_CODE, &dec_info_yuv_frames, init_plugin },
{ PLUGIN_NONE, 0, "", 0, NULL, NULL }
};