diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-08-11 05:11:05 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-08-11 05:11:05 +0000 |
commit | 76c655fb8f3680be765526938adf60c3ab5969fe (patch) | |
tree | aca10689194e6469b82d8d7ab29fa7843a4c6f75 /libavcodec | |
parent | 296710117315c2757a92ca3e689e33809b0b4984 (diff) | |
download | ffmpeg-76c655fb8f3680be765526938adf60c3ab5969fe.tar.gz |
Simplify colour conversion in Fraps as suggested by Michael
Originally committed as revision 14690 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/fraps.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index dfe26a66c6..e03c1fa10c 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -142,7 +142,6 @@ static int decode_frame(AVCodecContext *avctx, uint32_t *luma1,*luma2,*cb,*cr; uint32_t offs[4]; int i, j, is_chroma, planes; - int R, G, B, Y, U, V; header = AV_RL32(buf); @@ -332,15 +331,8 @@ static int decode_frame(AVCodecContext *avctx, // convert pseudo-YUV into real RGB for(j = 0; j < avctx->height; j++){ for(i = 0; i < avctx->width; i++){ - U = f->data[0][0 + i*3 + j*f->linesize[0]]; - Y = f->data[0][1 + i*3 + j*f->linesize[0]]; - V = f->data[0][2 + i*3 + j*f->linesize[0]]; - R = Y + (int8_t)U; - G = Y; - B = Y + (int8_t)V; - f->data[0][0 + i*3 + j*f->linesize[0]] = R; - f->data[0][1 + i*3 + j*f->linesize[0]] = G; - f->data[0][2 + i*3 + j*f->linesize[0]] = B; + f->data[0][0 + i*3 + j*f->linesize[0]] += f->data[0][1 + i*3 + j*f->linesize[0]]; + f->data[0][2 + i*3 + j*f->linesize[0]] += f->data[0][1 + i*3 + j*f->linesize[0]]; } } break; |