Mercurial > libavcodec.hg
comparison h264.c @ 11031:b37a53d101c3 libavcodec
Fix svq3_* function declarations.
Patch by Rafa¸«³l Carr¸«±, rafael D carre A gmail
author | cehoyos |
---|---|
date | Wed, 27 Jan 2010 22:22:01 +0000 |
parents | aa5bcf07731a |
children | ec682347e19e |
comparison
equal
deleted
inserted
replaced
11030:d36fa8e050a9 | 11031:b37a53d101c3 |
---|---|
40 | 40 |
41 #include "cabac.h" | 41 #include "cabac.h" |
42 | 42 |
43 //#undef NDEBUG | 43 //#undef NDEBUG |
44 #include <assert.h> | 44 #include <assert.h> |
45 | |
46 static void svq3_luma_dc_dequant_idct_c(DCTELEM *block, int qp); | |
47 static void svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp, int dc); | |
48 | 45 |
49 static const uint8_t rem6[52]={ | 46 static const uint8_t rem6[52]={ |
50 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, | 47 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, |
51 }; | 48 }; |
52 | 49 |
1179 if(nnz == 1 && h->mb[i*16]) | 1176 if(nnz == 1 && h->mb[i*16]) |
1180 idct_dc_add(ptr, h->mb + i*16, linesize); | 1177 idct_dc_add(ptr, h->mb + i*16, linesize); |
1181 else | 1178 else |
1182 idct_add (ptr, h->mb + i*16, linesize); | 1179 idct_add (ptr, h->mb + i*16, linesize); |
1183 }else | 1180 }else |
1184 svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->qscale, 0); | 1181 ff_svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->qscale, 0); |
1185 } | 1182 } |
1186 } | 1183 } |
1187 } | 1184 } |
1188 } | 1185 } |
1189 } | 1186 } |
1191 h->hpc.pred16x16[ h->intra16x16_pred_mode ](dest_y , linesize); | 1188 h->hpc.pred16x16[ h->intra16x16_pred_mode ](dest_y , linesize); |
1192 if(is_h264){ | 1189 if(is_h264){ |
1193 if(!transform_bypass) | 1190 if(!transform_bypass) |
1194 h264_luma_dc_dequant_idct_c(h->mb, s->qscale, h->dequant4_coeff[0][s->qscale][0]); | 1191 h264_luma_dc_dequant_idct_c(h->mb, s->qscale, h->dequant4_coeff[0][s->qscale][0]); |
1195 }else | 1192 }else |
1196 svq3_luma_dc_dequant_idct_c(h->mb, s->qscale); | 1193 ff_svq3_luma_dc_dequant_idct_c(h->mb, s->qscale); |
1197 } | 1194 } |
1198 if(h->deblocking_filter) | 1195 if(h->deblocking_filter) |
1199 xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, simple); | 1196 xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, simple); |
1200 }else if(is_h264){ | 1197 }else if(is_h264){ |
1201 hl_motion(h, dest_y, dest_cb, dest_cr, | 1198 hl_motion(h, dest_y, dest_cb, dest_cr, |
1239 } | 1236 } |
1240 }else{ | 1237 }else{ |
1241 for(i=0; i<16; i++){ | 1238 for(i=0; i<16; i++){ |
1242 if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){ //FIXME benchmark weird rule, & below | 1239 if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){ //FIXME benchmark weird rule, & below |
1243 uint8_t * const ptr= dest_y + block_offset[i]; | 1240 uint8_t * const ptr= dest_y + block_offset[i]; |
1244 svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->qscale, IS_INTRA(mb_type) ? 1 : 0); | 1241 ff_svq3_add_idct_c(ptr, h->mb + i*16, linesize, s->qscale, IS_INTRA(mb_type) ? 1 : 0); |
1245 } | 1242 } |
1246 } | 1243 } |
1247 } | 1244 } |
1248 } | 1245 } |
1249 | 1246 |
1274 } | 1271 } |
1275 }else{ | 1272 }else{ |
1276 for(i=16; i<16+8; i++){ | 1273 for(i=16; i<16+8; i++){ |
1277 if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){ | 1274 if(h->non_zero_count_cache[ scan8[i] ] || h->mb[i*16]){ |
1278 uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i]; | 1275 uint8_t * const ptr= dest[(i&4)>>2] + block_offset[i]; |
1279 svq3_add_idct_c(ptr, h->mb + i*16, uvlinesize, ff_h264_chroma_qp[s->qscale + 12] - 12, 2); | 1276 ff_svq3_add_idct_c(ptr, h->mb + i*16, uvlinesize, ff_h264_chroma_qp[s->qscale + 12] - 12, 2); |
1280 } | 1277 } |
1281 } | 1278 } |
1282 } | 1279 } |
1283 } | 1280 } |
1284 } | 1281 } |