aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Shaposhnik <roman@shaposhnik.org>2009-01-31 01:35:29 +0000
committerRoman Shaposhnik <roman@shaposhnik.org>2009-01-31 01:35:29 +0000
commit2331854d0b2b9a0b25078e26419623daecae8ca9 (patch)
tree418f1e58f1bbe71d52bbcd1277171ce34f77e589
parentb25d439233d1024a911bbb4a0f4f571d65607bc4 (diff)
downloadffmpeg-2331854d0b2b9a0b25078e26419623daecae8ca9.tar.gz
Cosmetics: moving the function definition around
Originally committed as revision 16873 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/dv.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 7b52e7a75b..3577ffabb4 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -804,6 +804,32 @@ static av_always_inline PutBitContext* dv_encode_ac(EncBlockInfo* bi,
return pb;
}
+//FIXME replace this by dsputil
+#define SC(x, y) ((s[x] - s[y]) ^ ((s[x] - s[y]) >> 7))
+static av_always_inline int dv_guess_dct_mode(DCTELEM *blk) {
+ DCTELEM *s;
+ int score88 = 0;
+ int score248 = 0;
+ int i;
+
+ /* Compute 8-8 score (small values give a better chance for 8-8 DCT) */
+ s = blk;
+ for (i = 0; i < 7; i++) {
+ score88 += SC(0, 8) + SC(1, 9) + SC(2, 10) + SC(3, 11) +
+ SC(4, 12) + SC(5,13) + SC(6, 14) + SC(7, 15);
+ s += 8;
+ }
+ /* Compute 2-4-8 score (small values give a better chance for 2-4-8 DCT) */
+ s = blk;
+ for (i = 0; i < 6; i++) {
+ score248 += SC(0, 16) + SC(1,17) + SC(2, 18) + SC(3, 19) +
+ SC(4, 20) + SC(5,21) + SC(6, 22) + SC(7, 23);
+ s += 8;
+ }
+
+ return (score88 - score248 > -10);
+}
+
static av_always_inline void dv_set_class_number(DCTELEM* blk, EncBlockInfo* bi,
const uint8_t* zigzag_scan,
const int *weight, int bias)
@@ -876,32 +902,6 @@ static av_always_inline void dv_set_class_number(DCTELEM* blk, EncBlockInfo* bi,
}
}
-//FIXME replace this by dsputil
-#define SC(x, y) ((s[x] - s[y]) ^ ((s[x] - s[y]) >> 7))
-static av_always_inline int dv_guess_dct_mode(DCTELEM *blk) {
- DCTELEM *s;
- int score88 = 0;
- int score248 = 0;
- int i;
-
- /* Compute 8-8 score (small values give a better chance for 8-8 DCT) */
- s = blk;
- for (i = 0; i < 7; i++) {
- score88 += SC(0, 8) + SC(1, 9) + SC(2, 10) + SC(3, 11) +
- SC(4, 12) + SC(5,13) + SC(6, 14) + SC(7, 15);
- s += 8;
- }
- /* Compute 2-4-8 score (small values give a better chance for 2-4-8 DCT) */
- s = blk;
- for (i = 0; i < 6; i++) {
- score248 += SC(0, 16) + SC(1,17) + SC(2, 18) + SC(3, 19) +
- SC(4, 20) + SC(5,21) + SC(6, 22) + SC(7, 23);
- s += 8;
- }
-
- return (score88 - score248 > -10);
-}
-
static inline void dv_guess_qnos(EncBlockInfo* blks, int* qnos)
{
int size[5];