[SCM] libav/experimental: Apply minor simplification in av_read_image_line().
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 17:15:44 UTC 2013
The following commit has been merged in the experimental branch:
commit 4660143a2c009031ae7e812bcb966ea784a8881c
Author: Stefano Sabatini <stefano.sabatini-lala at poste.it>
Date: Sun Sep 12 22:00:45 2010 +0000
Apply minor simplification in av_read_image_line().
Originally committed as revision 25112 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c
index b3885e5..54f1d74 100644
--- a/libavutil/pixdesc.c
+++ b/libavutil/pixdesc.c
@@ -53,12 +53,11 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
}
} else {
const uint8_t *p = data[plane]+ y*linesize[plane] + x*step + comp.offset_plus1-1;
- int is_8bit = 0;
+ int is_8bit = shift + depth <= 8;
- if (shift + depth <= 8) {
+ if (is_8bit)
p += !!(flags & PIX_FMT_BE);
- is_8bit = 1;
- }
+
while(w--){
int val = is_8bit ? *p :
flags & PIX_FMT_BE ? AV_RB16(p) : AV_RL16(p);
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list