comparison cljr.c @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents e25782262d7d
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * 18 *
19 */ 19 */
20 20
21 /** 21 /**
22 * @file cljr.c 22 * @file cljr.c
23 * Cirrus Logic AccuPak codec. 23 * Cirrus Logic AccuPak codec.
24 */ 24 */
25 25
26 #include "avcodec.h" 26 #include "avcodec.h"
27 #include "mpegvideo.h" 27 #include "mpegvideo.h"
28 28
29 typedef struct CLJRContext{ 29 typedef struct CLJRContext{
30 AVCodecContext *avctx; 30 AVCodecContext *avctx;
32 int delta[16]; 32 int delta[16];
33 int offset[4]; 33 int offset[4];
34 GetBitContext gb; 34 GetBitContext gb;
35 } CLJRContext; 35 } CLJRContext;
36 36
37 static int decode_frame(AVCodecContext *avctx, 37 static int decode_frame(AVCodecContext *avctx,
38 void *data, int *data_size, 38 void *data, int *data_size,
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;
73 73
74 *picture= *(AVFrame*)&a->picture; 74 *picture= *(AVFrame*)&a->picture;
75 *data_size = sizeof(AVPicture); 75 *data_size = sizeof(AVPicture);
76 76
77 emms_c(); 77 emms_c();
78 78
79 return buf_size; 79 return buf_size;
80 } 80 }
81 81
82 #if 0 82 #if 0
83 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ 83 static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){
90 *p = *pict; 90 *p = *pict;
91 p->pict_type= I_TYPE; 91 p->pict_type= I_TYPE;
92 p->key_frame= 1; 92 p->key_frame= 1;
93 93
94 emms_c(); 94 emms_c();
95 95
96 align_put_bits(&a->pb); 96 align_put_bits(&a->pb);
97 while(get_bit_count(&a->pb)&31) 97 while(get_bit_count(&a->pb)&31)
98 put_bits(&a->pb, 8, 0); 98 put_bits(&a->pb, 8, 0);
99 99
100 size= get_bit_count(&a->pb)/32; 100 size= get_bit_count(&a->pb)/32;
101 101
102 return size*4; 102 return size*4;
103 } 103 }
104 #endif 104 #endif
105 105
106 static void common_init(AVCodecContext *avctx){ 106 static void common_init(AVCodecContext *avctx){
111 } 111 }
112 112
113 static int decode_init(AVCodecContext *avctx){ 113 static int decode_init(AVCodecContext *avctx){
114 114
115 common_init(avctx); 115 common_init(avctx);
116 116
117 avctx->pix_fmt= PIX_FMT_YUV411P; 117 avctx->pix_fmt= PIX_FMT_YUV411P;
118 118
119 return 0; 119 return 0;
120 } 120 }
121 121
122 #if 0 122 #if 0
123 static int encode_init(AVCodecContext *avctx){ 123 static int encode_init(AVCodecContext *avctx){
124 124
125 common_init(avctx); 125 common_init(avctx);
126 126
127 return 0; 127 return 0;
128 } 128 }
129 #endif 129 #endif
130 130
131 AVCodec cljr_decoder = { 131 AVCodec cljr_decoder = {