0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

vf_dint, vf_divtc: fix code assuming "char" is signed

Use int as type, there is no reason to use char which also
causes issues since it may be either signed or unsigned.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33529 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix code assuming that "char" is signed.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33530 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix code incorrectly assuming "char" is signed.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33531 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2011-05-30 21:16:37 +00:00 committed by Uoti Urpala
parent ab1544b74d
commit be4d3d3491
2 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ struct vf_priv_s {
float sense; // first parameter
float level; // second parameter
unsigned int imgfmt;
char diff;
int diff;
uint32_t max;
// int dfr;
// int rdfr;
@ -73,7 +73,7 @@ static int config (struct vf_instance *vf,
vf->priv->diff = 31;
mp_msg (MSGT_VFILTER, MSGL_INFO, "Drop-interlaced: %dx%d diff %d / level %u\n",
vf->priv->pmpi->width, vf->priv->pmpi->height,
(int)vf->priv->diff, (unsigned int)vf->priv->max);
vf->priv->diff, (unsigned int)vf->priv->max);
// vf->priv->rdfr = vf->priv->dfr = 0;
vf->priv->was_dint = 0;
return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
@ -81,10 +81,10 @@ static int config (struct vf_instance *vf,
static int put_image (struct vf_instance *vf, mp_image_t *mpi, double pts)
{
char rrow0[MAXROWSIZE];
char rrow1[MAXROWSIZE];
char rrow2[MAXROWSIZE];
char *row0 = rrow0, *row1 = rrow1, *row2 = rrow2/*, *row3 = rrow3*/;
int8_t rrow0[MAXROWSIZE];
int8_t rrow1[MAXROWSIZE];
int8_t rrow2[MAXROWSIZE];
int8_t *row0 = rrow0, *row1 = rrow1, *row2 = rrow2/*, *row3 = rrow3*/;
int rowsize = mpi->width;
uint32_t nok = 0, max = vf->priv->max;
int diff = vf->priv->diff;

View File

@ -42,7 +42,7 @@ struct vf_priv_s
ocount, sum[5];
double threshold;
FILE *file;
char *bdata;
int8_t *bdata;
unsigned int *csdata;
int *history;
struct vf_detc_pts_buf ptsbuf;
@ -386,8 +386,8 @@ static int analyze(struct vf_priv_s *p)
{
int *buf=0, *bp, bufsize=0, n, b, f, i, j, m, s;
unsigned int *cbuf=0, *cp;
char *pbuf;
char lbuf[256];
int8_t *pbuf;
int8_t lbuf[256];
int sum[5];
double d;