Mercurial > libavcodec.hg
changeset 9304:94d7289c656e libavcodec
Deduplicate code by moving it outside the if/else
author | reimar |
---|---|
date | Tue, 31 Mar 2009 14:06:22 +0000 |
parents | 2ae6ab3fa3ba |
children | be07610b4407 |
files | interplayvideo.c |
diffstat | 1 files changed, 2 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/interplayvideo.c Tue Mar 31 14:04:54 2009 +0000 +++ b/interplayvideo.c Tue Mar 31 14:06:22 2009 +0000 @@ -421,13 +421,13 @@ } } else { - if (P[2] <= P[3]) { uint64_t flags; - /* 1 of 4 colors for each 2x1 block, need 8 more bytes */ + /* 1 of 4 colors for each 2x1 or 1x2 block, need 8 more bytes */ CHECK_STREAM_PTR(8); flags = bytestream_get_le64(&s->stream_ptr); + if (P[2] <= P[3]) { for (y = 0; y < 8; y++) { for (x = 0; x < 8; x += 2, flags >>= 2) { s->pixel_ptr[x ] = @@ -436,12 +436,6 @@ s->pixel_ptr += s->stride; } } else { - uint64_t flags; - - /* 1 of 4 colors for each 1x2 block, need 8 more bytes */ - CHECK_STREAM_PTR(8); - - flags = bytestream_get_le64(&s->stream_ptr); for (y = 0; y < 8; y += 2) { for (x = 0; x < 8; x++, flags >>= 2) { s->pixel_ptr[x ] =