Commit 2f146bb5 authored by mru's avatar mru

replace endian detection hack with #ifdef WORDS_BIGENDIAN


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@9335 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ccf76f5c
...@@ -583,16 +583,14 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx, ...@@ -583,16 +583,14 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
* during decompression. So if it is required (i.e., this is not a LE target, we do * during decompression. So if it is required (i.e., this is not a LE target, we do
* a second pass over the line here, swapping the bytes. * a second pass over the line here, swapping the bytes.
*/ */
pixel = 0xFF00; #ifdef WORDS_BIGENDIAN
if (0xFF00 != AV_RL16(&pixel)) /* Check if it is not an LE target */
{
pixel_ptr = y_ptr; pixel_ptr = y_ptr;
pixel_countdown = s->avctx->width; pixel_countdown = s->avctx->width;
while (pixel_countdown > 0) { while (pixel_countdown > 0) {
*((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[pixel_ptr]); *((signed short*)(&pixels[pixel_ptr])) = AV_RL16(&buf[pixel_ptr]);
pixel_ptr += 2; pixel_ptr += 2;
} }
} #endif
y_ptr += s->frame.linesize[0]; y_ptr += s->frame.linesize[0];
} }
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment