Mercurial > libavcodec.hg
comparison rv30.c @ 5981:b60d7f351e9d libavcodec
cosmetics: comment spelling fixes
author | diego |
---|---|
date | Mon, 03 Dec 2007 13:01:53 +0000 |
parents | 3f452f275542 |
children | 61f0987be684 |
comparison
equal
deleted
inserted
replaced
5980:3055403f0e57 | 5981:b60d7f351e9d |
---|---|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 */ | 20 */ |
21 | 21 |
22 /** | 22 /** |
23 * @file rv30.c | 23 * @file rv30.c |
24 * RV30 decoder. | 24 * RV30 decoder |
25 */ | 25 */ |
26 | 26 |
27 #include "avcodec.h" | 27 #include "avcodec.h" |
28 #include "dsputil.h" | 28 #include "dsputil.h" |
29 #include "mpegvideo.h" | 29 #include "mpegvideo.h" |
56 skip_bits1(gb); | 56 skip_bits1(gb); |
57 return 0; | 57 return 0; |
58 } | 58 } |
59 | 59 |
60 /** | 60 /** |
61 * Decode 4x4 intra types array | 61 * Decode 4x4 intra types array. |
62 */ | 62 */ |
63 static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int *dst) | 63 static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int *dst) |
64 { | 64 { |
65 int i, j, k; | 65 int i, j, k; |
66 | 66 |
84 } | 84 } |
85 return 0; | 85 return 0; |
86 } | 86 } |
87 | 87 |
88 /** | 88 /** |
89 * Decode macroblock information | 89 * Decode macroblock information. |
90 */ | 90 */ |
91 static int rv30_decode_mb_info(RV34DecContext *r) | 91 static int rv30_decode_mb_info(RV34DecContext *r) |
92 { | 92 { |
93 static const int rv30_p_types[6] = { RV34_MB_SKIP, RV34_MB_P_16x16, RV34_MB_P_8x8, -1, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 }; | 93 static const int rv30_p_types[6] = { RV34_MB_SKIP, RV34_MB_P_16x16, RV34_MB_P_8x8, -1, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 }; |
94 static const int rv30_b_types[6] = { RV34_MB_SKIP, RV34_MB_B_DIRECT, RV34_MB_B_FORWARD, RV34_MB_B_BACKWARD, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 }; | 94 static const int rv30_b_types[6] = { RV34_MB_SKIP, RV34_MB_B_DIRECT, RV34_MB_B_FORWARD, RV34_MB_B_BACKWARD, RV34_MB_TYPE_INTRA, RV34_MB_TYPE_INTRA16x16 }; |
109 else | 109 else |
110 return rv30_b_types[code]; | 110 return rv30_b_types[code]; |
111 } | 111 } |
112 | 112 |
113 /** | 113 /** |
114 * Initialize decoder | 114 * Initialize decoder. |
115 */ | 115 */ |
116 static int rv30_decode_init(AVCodecContext *avctx) | 116 static int rv30_decode_init(AVCodecContext *avctx) |
117 { | 117 { |
118 RV34DecContext *r = avctx->priv_data; | 118 RV34DecContext *r = avctx->priv_data; |
119 | 119 |
120 r->rv30 = 1; | 120 r->rv30 = 1; |
121 ff_rv34_decode_init(avctx); | 121 ff_rv34_decode_init(avctx); |
122 if(avctx->extradata_size < 2){ | 122 if(avctx->extradata_size < 2){ |
123 av_log(avctx, AV_LOG_ERROR, "Extradata is too small\n"); | 123 av_log(avctx, AV_LOG_ERROR, "Extradata is too small.\n"); |
124 return -1; | 124 return -1; |
125 } | 125 } |
126 r->rpr = (avctx->extradata[1] & 7) >> 1; | 126 r->rpr = (avctx->extradata[1] & 7) >> 1; |
127 r->rpr = FFMIN(r->rpr + 1, 3); | 127 r->rpr = FFMIN(r->rpr + 1, 3); |
128 r->parse_slice_header = rv30_parse_slice_header; | 128 r->parse_slice_header = rv30_parse_slice_header; |