mirror of
https://github.com/mpv-player/mpv
synced 2025-05-04 17:19:29 +00:00
correct handling of sgi compressed images on amd64, patch by Paul-Francois Fontigny - pff AT filmik-be
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18860 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e0a094555d
commit
a97779a3de
@ -155,7 +155,7 @@ static void
|
|||||||
decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
|
decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
|
||||||
{
|
{
|
||||||
unsigned char *rle_data, *dest_row;
|
unsigned char *rle_data, *dest_row;
|
||||||
unsigned long *starttab;
|
uint32_t *starttab;
|
||||||
int y, z, xsize, ysize, zsize, chan_offset;
|
int y, z, xsize, ysize, zsize, chan_offset;
|
||||||
long start_offset;
|
long start_offset;
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
|
|||||||
zsize = info->zsize;
|
zsize = info->zsize;
|
||||||
|
|
||||||
/* rle offset table is right after the header */
|
/* rle offset table is right after the header */
|
||||||
starttab = (long*)(data + SGI_HEADER_LEN);
|
starttab = (uint32_t*)(data + SGI_HEADER_LEN);
|
||||||
|
|
||||||
for (z = 0; z < zsize; z++) {
|
for (z = 0; z < zsize; z++) {
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ decode_rle_sgi(SGIInfo *info, unsigned char *data, mp_image_t *mpi)
|
|||||||
dest_row = mpi->planes[0] + mpi->stride[0] * (ysize - 1 - y);
|
dest_row = mpi->planes[0] + mpi->stride[0] * (ysize - 1 - y);
|
||||||
|
|
||||||
/* set start of next run (offsets are from start of header) */
|
/* set start of next run (offsets are from start of header) */
|
||||||
start_offset = be2me_32(*(unsigned long*) &starttab[y + z * ysize]);
|
start_offset = be2me_32(*(uint32_t*) &starttab[y + z * ysize]);
|
||||||
|
|
||||||
rle_data = &data[start_offset];
|
rle_data = &data[start_offset];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user