History

Deduplicate code by moving it outside the if/else

Originally committed as revision 18269 to svn://svn.ffmpeg.org/ffmpeg/trunk

Reimar Döffinger committed 17 years ago

Commit 15488391 parent 268a6181 file · +2 −8Browse files

Unified · Split

libavcodec/interplayvideo.c+2−8
@@ -421,13 +421,13 @@ static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s) · 420 unmodified lines
421421
422422 }
423423 } else {
424− if (P[2] <= P[3]) {
425424 uint64_t flags;
426425
427− /* 1 of 4 colors for each 2x1 block, need 8 more bytes */
426+ /* 1 of 4 colors for each 2x1 or 1x2 block, need 8 more bytes */
428427 CHECK_STREAM_PTR(8);
429428
430429 flags = bytestream_get_le64(&s->stream_ptr);
430+ if (P[2] <= P[3]) {
431431 for (y = 0; y < 8; y++) {
432432 for (x = 0; x < 8; x += 2, flags >>= 2) {
433433 s->pixel_ptr[x ] =
@@ -436,12 +436,6 @@ static int ipvideo_decode_block_opcode_0x9(IpvideoContext *s) · 2 unmodified lines
436436 s->pixel_ptr += s->stride;
437437 }
438438 } else {
439− uint64_t flags;
440−
441− /* 1 of 4 colors for each 1x2 block, need 8 more bytes */
442− CHECK_STREAM_PTR(8);
443−
444− flags = bytestream_get_le64(&s->stream_ptr);
445439 for (y = 0; y < 8; y += 2) {
446440 for (x = 0; x < 8; x++, flags >>= 2) {
447441 s->pixel_ptr[x ] =

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t