[FFmpeg-devel] [PATCH] lavc/rawdec: clarify code in raw_decode()

Stefano Sabatini stefasab at gmail.com
Tue Jun 26 13:17:19 CEST 2012


Comment on an implicit assumption done by the code, helps readability.
---
 libavcodec/rawdec.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 09089ec..9686d8e 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -179,6 +179,7 @@ static int raw_decode(AVCodecContext *avctx,
             }
             linesize_align = 8;
         } else {
+            /* assume avctx->bits_per_coded_sample == 2 */
             for(i=0; 4*i+3 < buf_size && i<avpkt->size; i++){
                 dst[4*i+0]= buf[i]>>6;
                 dst[4*i+1]= buf[i]>>4&3;
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list