comparison cljr.c @ 1415:9a218b289ee0 libavcodec

removed unused variables
author bellard
date Sun, 24 Aug 2003 22:08:22 +0000
parents 5cabff29411e
children 932d306bf1dc
comparison
equal deleted inserted replaced
1414:5ee7bd7ee76d 1415:9a218b289ee0
39 uint8_t *buf, int buf_size) 39 uint8_t *buf, int buf_size)
40 { 40 {
41 CLJRContext * const a = avctx->priv_data; 41 CLJRContext * const a = avctx->priv_data;
42 AVFrame *picture = data; 42 AVFrame *picture = data;
43 AVFrame * const p= (AVFrame*)&a->picture; 43 AVFrame * const p= (AVFrame*)&a->picture;
44 uint8_t *bytestream= buf; 44 int x, y;
45 int i, x, y;
46 45
47 *data_size = 0; 46 *data_size = 0;
48 47
49 /* special case for last picture */ 48 /* special case for last picture */
50 if (buf_size == 0) { 49 if (buf_size == 0) {
63 p->key_frame= 1; 62 p->key_frame= 1;
64 63
65 init_get_bits(&a->gb, buf, buf_size); 64 init_get_bits(&a->gb, buf, buf_size);
66 65
67 for(y=0; y<avctx->height; y++){ 66 for(y=0; y<avctx->height; y++){
68 int offset;
69 uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ]; 67 uint8_t *luma= &a->picture.data[0][ y*a->picture.linesize[0] ];
70 uint8_t *cb= &a->picture.data[1][ y*a->picture.linesize[1] ]; 68 uint8_t *cb= &a->picture.data[1][ y*a->picture.linesize[1] ];
71 uint8_t *cr= &a->picture.data[2][ y*a->picture.linesize[2] ]; 69 uint8_t *cr= &a->picture.data[2][ y*a->picture.linesize[2] ];
72 for(x=0; x<avctx->width; x+=4){ 70 for(x=0; x<avctx->width; x+=4){
73 luma[3] = get_bits(&a->gb, 5) << 3; 71 luma[3] = get_bits(&a->gb, 5) << 3;
118 avctx->coded_frame= (AVFrame*)&a->picture; 116 avctx->coded_frame= (AVFrame*)&a->picture;
119 a->avctx= avctx; 117 a->avctx= avctx;
120 } 118 }
121 119
122 static int decode_init(AVCodecContext *avctx){ 120 static int decode_init(AVCodecContext *avctx){
123 CLJRContext * const a = avctx->priv_data; 121
124 AVFrame *p= (AVFrame*)&a->picture;
125 int i;
126
127 common_init(avctx); 122 common_init(avctx);
128 123
129 avctx->pix_fmt= PIX_FMT_YUV411P; 124 avctx->pix_fmt= PIX_FMT_YUV411P;
130 125
131 return 0; 126 return 0;
132 } 127 }
133 128
134 static int encode_init(AVCodecContext *avctx){ 129 static int encode_init(AVCodecContext *avctx){
135 CLJRContext * const a = avctx->priv_data; 130
136 int i;
137
138 common_init(avctx); 131 common_init(avctx);
139 132
140 return 0; 133 return 0;
141 } 134 }
142 135
143 static int decode_end(AVCodecContext *avctx){ 136 static int decode_end(AVCodecContext *avctx){
144 CLJRContext * const a = avctx->priv_data;
145 137
146 avcodec_default_free_buffers(avctx); 138 avcodec_default_free_buffers(avctx);
147 139
148 return 0; 140 return 0;
149 } 141 }