diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-12-08 00:23:37 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-12-08 00:23:37 +0100 |
commit | 8e2bab5d4bddb4029503c0f90623854948ddb3c5 (patch) | |
tree | 33a095ce0e92ed353c96c9b25b746ee45a2a00c7 /libavcodec/cljr.c | |
parent | 7023fb81c78e10a6a7af6e6bc8902f99da81c458 (diff) | |
parent | 78212cefe14a2086dc1ea3778b76623b949e5d0c (diff) | |
download | ffmpeg-streaming-8e2bab5d4bddb4029503c0f90623854948ddb3c5.zip ffmpeg-streaming-8e2bab5d4bddb4029503c0f90623854948ddb3c5.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
drawtext: remove typo
pcm-mpeg: implement new audio decoding api
w32thread: port fixes to pthread_cond_broadcast() from x264.
doc: add editor configuration section with Vim and Emacs settings
dxva2.h: include d3d9.h to define LPDIRECT3DSURFACE9
avformat/utils: Drop unused goto label.
doxygen: Replace '\' by '@' in Doxygen markup tags.
cosmetics: drop some completely pointless parentheses
cljr: simplify CLJRContext
drawtext: introduce rand(min, max)
drawtext: introduce explicit draw/hide variable
rtmp: Use nb_invokes for all invoke commands
Conflicts:
libavcodec/mpegvideo.c
libavfilter/vf_drawtext.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/cljr.c')
-rw-r--r-- | libavcodec/cljr.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c index 6e352b8..53ab40c 100644 --- a/libavcodec/cljr.c +++ b/libavcodec/cljr.c @@ -35,9 +35,6 @@ typedef struct CLJRContext{ AVCodecContext *avctx; AVFrame picture; - int delta[16]; - int offset[4]; - GetBitContext gb; } CLJRContext; static int decode_frame(AVCodecContext *avctx, @@ -47,6 +44,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; CLJRContext * const a = avctx->priv_data; + GetBitContext gb; AVFrame *picture = data; AVFrame * const p= (AVFrame*)&a->picture; int x, y; @@ -67,20 +65,20 @@ static int decode_frame(AVCodecContext *avctx, p->pict_type= AV_PICTURE_TYPE_I; p->key_frame= 1; - init_get_bits(&a->gb, buf, buf_size * 8); + init_get_bits(&gb, buf, buf_size * 8); for(y=0; y<avctx->height; y++){ uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ]; uint8_t *cb= &a->picture.data[1][ y*a->picture.linesize[1] ]; uint8_t *cr= &a->picture.data[2][ y*a->picture.linesize[2] ]; for(x=0; x<avctx->width; x+=4){ - luma[3] = get_bits(&a->gb, 5) << 3; - luma[2] = get_bits(&a->gb, 5) << 3; - luma[1] = get_bits(&a->gb, 5) << 3; - luma[0] = get_bits(&a->gb, 5) << 3; + luma[3] = get_bits(&gb, 5) << 3; + luma[2] = get_bits(&gb, 5) << 3; + luma[1] = get_bits(&gb, 5) << 3; + luma[0] = get_bits(&gb, 5) << 3; luma+= 4; - *(cb++) = get_bits(&a->gb, 6) << 2; - *(cr++) = get_bits(&a->gb, 6) << 2; + *(cb++) = get_bits(&gb, 6) << 2; + *(cr++) = get_bits(&gb, 6) << 2; } } |