Mercurial > libavformat.hg
comparison asfdec.c @ 5108:44a0fab134a9 libavformat
Replace WORDS_BIGENDIAN with HAVE_BIGENDIAN
author | mru |
---|---|
date | Sun, 26 Jul 2009 12:20:04 +0000 |
parents | 7d589bcd9b1f |
children | 293c03f0d47f |
comparison
equal
deleted
inserted
replaced
5107:d5972242053c | 5108:44a0fab134a9 |
---|---|
362 /* Extract palette from extradata if bpp <= 8 */ | 362 /* Extract palette from extradata if bpp <= 8 */ |
363 /* This code assumes that extradata contains only palette */ | 363 /* This code assumes that extradata contains only palette */ |
364 /* This is true for all paletted codecs implemented in ffmpeg */ | 364 /* This is true for all paletted codecs implemented in ffmpeg */ |
365 if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { | 365 if (st->codec->extradata_size && (st->codec->bits_per_coded_sample <= 8)) { |
366 st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); | 366 st->codec->palctrl = av_mallocz(sizeof(AVPaletteControl)); |
367 #ifdef WORDS_BIGENDIAN | 367 #if HAVE_BIGENDIAN |
368 for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++) | 368 for (i = 0; i < FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)/4; i++) |
369 st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]); | 369 st->codec->palctrl->palette[i] = bswap_32(((uint32_t*)st->codec->extradata)[i]); |
370 #else | 370 #else |
371 memcpy(st->codec->palctrl->palette, st->codec->extradata, | 371 memcpy(st->codec->palctrl->palette, st->codec->extradata, |
372 FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)); | 372 FFMIN(st->codec->extradata_size, AVPALETTE_SIZE)); |