Mercurial > libavcodec.hg
changeset 2244:4a0cfd63f078 libavcodec
greyscale decoding (option to skip u,v planes) support
author | alex |
---|---|
date | Tue, 21 Sep 2004 17:31:46 +0000 |
parents | b8bad8bbbc64 |
children | 81802fed5b8c |
files | indeo3.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/indeo3.c Mon Sep 20 13:47:47 2004 +0000 +++ b/indeo3.c Tue Sep 21 17:31:46 2004 +0000 @@ -223,6 +223,9 @@ hdr_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos, min(hdr_width, 160)); + if (!(s->avctx->flags & CODEC_FLAG_GRAY)) + { + buf_pos = buf + 16 + offs2; offs = le2me_32(*(uint32_t *)buf_pos); buf_pos += 4; @@ -239,6 +242,8 @@ chroma_height, buf_pos + offs * 2, fflags2, hdr_pos, buf_pos, min(chroma_width, 40)); + } + return 8; } @@ -1080,6 +1085,8 @@ dest += s->frame.linesize[0]; } + if (!(s->avctx->flags & CODEC_FLAG_GRAY)) + { src = s->cur_frame->Ubuf; dest = s->frame.data[1]; for (y = 0; y < s->height / 4; y++) { @@ -1095,6 +1102,7 @@ src += s->cur_frame->uv_w; dest += s->frame.linesize[2]; } + } *data_size=sizeof(AVFrame); *(AVFrame*)data= s->frame;