annotate bfin/dsputil_bfin.c @ 4789:bf62c8a0d2fb libavcodec

Return correct decoded size, decoder is called with only one frame at a time. patch by Benoit Fouet, benoit.fouet purplelabs com
author diego
date Fri, 06 Apr 2007 10:37:34 +0000
parents 65ee324848ac
children d5ba514e3f4a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
1 /*
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
2 * BlackFin DSPUTILS
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
3 *
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
4 * Copyright (C) 2007 Marc Hoffman <marc.hoffman@analog.com>
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
5 * Copyright (c) 2006 Michael Benjamin <michael.benjamin@analog.com>
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
6 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
7 * This file is part of FFmpeg.
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
8 *
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
9 * FFmpeg is free software; you can redistribute it and/or
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
10 * modify it under the terms of the GNU Lesser General Public
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
11 * License as published by the Free Software Foundation; either
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
12 * version 2.1 of the License, or (at your option) any later version.
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
13 *
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
14 * FFmpeg is distributed in the hope that it will be useful,
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
17 * Lesser General Public License for more details.
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
18 *
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
19 * You should have received a copy of the GNU Lesser General Public
3947
c8c591fe26f8 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 3728
diff changeset
20 * License along with FFmpeg; if not, write to the Free Software
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
22 */
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
23
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
24 #include <unistd.h>
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
25 #include <bits/bfin_sram.h>
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
26 #include "../avcodec.h"
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
27 #include "../dsputil.h"
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
28
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
29 #define USE_L1CODE
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
30
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
31 #ifdef USE_L1CODE
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
32 #define L1CODE __attribute__ ((l1_text))
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
33 #else
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
34 #define L1CODE
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
35 #endif
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
36 int off;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
37
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
38
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
39 extern void ff_bfin_idct (DCTELEM *block) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
40 extern void ff_bfin_fdct (DCTELEM *block) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
41 extern void ff_bfin_add_pixels_clamped (DCTELEM *block, uint8_t *dest, int line_size) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
42 extern void ff_bfin_put_pixels_clamped (DCTELEM *block, uint8_t *dest, int line_size) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
43 extern void ff_bfin_diff_pixels (DCTELEM *block, uint8_t *s1, uint8_t *s2, int stride) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
44 extern void ff_bfin_get_pixels (DCTELEM *restrict block, const uint8_t *pixels, int line_size) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
45 extern int ff_bfin_pix_norm1 (uint8_t * pix, int line_size) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
46 extern int ff_bfin_z_sad8x8 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
47 extern int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
48
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
49 extern void ff_bfin_z_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
50 extern void ff_bfin_z_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
51 extern void ff_bfin_put_pixels16_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
52 extern void ff_bfin_put_pixels8_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
53
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
54
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
55 extern int ff_bfin_pix_sum (uint8_t *p, int stride) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
56
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
57 extern void ff_bfin_put_pixels8uc (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int dest_size, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
58 extern void ff_bfin_put_pixels16uc (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int dest_size, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
59 extern void ff_bfin_put_pixels8uc_nornd (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
60 extern void ff_bfin_put_pixels16uc_nornd (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
61
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
62 extern int ff_bfin_sse4 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
63 extern int ff_bfin_sse8 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
64 extern int ff_bfin_sse16 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) L1CODE;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
65
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
66
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
67 static void bfin_idct_add (uint8_t *dest, int line_size, DCTELEM *block)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
68 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
69 ff_bfin_idct (block);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
70 ff_bfin_add_pixels_clamped (block, dest, line_size);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
71 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
72
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
73 static void bfin_idct_put (uint8_t *dest, int line_size, DCTELEM *block)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
74 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
75 ff_bfin_idct (block);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
76 ff_bfin_put_pixels_clamped (block, dest, line_size);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
77 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
78
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
79
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
80 static void bfin_clear_blocks (DCTELEM *blocks)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
81 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
82 // This is just a simple memset.
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
83 //
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
84 asm("P0=192; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
85 "I0=%0; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
86 "R0=0; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
87 "LSETUP(clear_blocks_blkfn_lab,clear_blocks_blkfn_lab)LC0=P0;"
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
88 "clear_blocks_blkfn_lab:"
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
89 "[I0++]=R0;"
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
90 ::"a" (blocks):"P0","I0","R0");
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
91 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
92
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
93
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
94
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
95 static void bfin_put_pixels8 (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
96 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
97 ff_bfin_put_pixels8uc (block, pixels, pixels, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
98 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
99
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
100 static void bfin_put_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
101 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
102 ff_bfin_put_pixels8uc (block, pixels, pixels+1, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
103 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
104
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
105 static void bfin_put_pixels8_y2 (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
106 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
107 ff_bfin_put_pixels8uc (block, pixels, pixels+line_size, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
108 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
109
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
110 static void bfin_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
111 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
112 ff_bfin_z_put_pixels8_xy2 (block,s0,line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
113 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
114
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
115 static void bfin_put_pixels16 (uint8_t *block, const uint8_t *pixels, int line_size, int h)
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
116 {
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
117 ff_bfin_put_pixels16uc (block, pixels, pixels, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
118 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
119
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
120 static void bfin_put_pixels16_x2 (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
121 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
122 ff_bfin_put_pixels16uc (block, pixels, pixels+1, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
123 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
124
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
125 static void bfin_put_pixels16_y2 (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
126 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
127 ff_bfin_put_pixels16uc (block, pixels, pixels+line_size, line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
128 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
129
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
130 static void bfin_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
131 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
132 ff_bfin_z_put_pixels16_xy2 (block,s0,line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
133 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
134
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
135 void bfin_put_pixels8_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
136 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
137 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
138 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
139
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
140 static void bfin_put_pixels8_x2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
141 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
142 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+1, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
143 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
144
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
145 static void bfin_put_pixels8_y2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
146 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
147 ff_bfin_put_pixels8uc_nornd (block, pixels, pixels+line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
148 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
149
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
150
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
151 void bfin_put_pixels16_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
152 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
153 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
154 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
155
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
156 static void bfin_put_pixels16_x2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
157 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
158 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+1, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
159 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
160
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
161 static void bfin_put_pixels16_y2_nornd (uint8_t *block, const uint8_t *pixels, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
162 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
163 ff_bfin_put_pixels16uc_nornd (block, pixels, pixels+line_size, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
164 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
165
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
166 static int bfin_pix_abs16 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
167 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
168 return ff_bfin_z_sad16x16 (blk1,blk2,line_size,line_size,h);
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
169 }
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
170
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
171 static uint8_t vtmp_blk[256] __attribute__((l1_data_B));
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
172
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
173 static int bfin_pix_abs16_x2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
174 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
175 ff_bfin_put_pixels16uc (vtmp_blk, blk2, blk2+1, 16, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
176 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
177 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
178
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
179 static int bfin_pix_abs16_y2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
180 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
181 ff_bfin_put_pixels16uc (vtmp_blk, blk2, blk2+line_size, 16, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
182 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
183 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
184
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
185 static int bfin_pix_abs16_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
186 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
187 ff_bfin_z_put_pixels16_xy2 (vtmp_blk, blk2, 16, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
188 return ff_bfin_z_sad16x16 (blk1, vtmp_blk, line_size, 16, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
189 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
190
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
191 static int bfin_pix_abs8 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
192 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
193 return ff_bfin_z_sad8x8 (blk1,blk2,line_size,line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
194 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
195
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
196 static int bfin_pix_abs8_x2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
197 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
198 ff_bfin_put_pixels8uc (vtmp_blk, blk2, blk2+1, 8, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
199 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
200 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
201
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
202 static int bfin_pix_abs8_y2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
203 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
204 ff_bfin_put_pixels8uc (vtmp_blk, blk2, blk2+line_size, 8, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
205 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
206 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
207
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
208 static int bfin_pix_abs8_xy2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
209 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
210 ff_bfin_z_put_pixels8_xy2 (vtmp_blk, blk2, 8, line_size, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
211 return ff_bfin_z_sad8x8 (blk1, vtmp_blk, line_size, 8, h);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
212 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
213
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
214
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
215 /*
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
216 decoder optimization
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
217 start on 2/11 100 frames of 352x240@25 compiled with no optimization -g debugging
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
218 9.824s ~ 2.44x off
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
219 6.360s ~ 1.58x off with -O2
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
220 5.740s ~ 1.43x off with idcts
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
221
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
222 2.64s 2/20 same sman.mp4 decode only
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
223
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
224 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
225
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
226 void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
227 {
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
228 c->get_pixels = ff_bfin_get_pixels;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
229 c->diff_pixels = ff_bfin_diff_pixels;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
230 c->put_pixels_clamped = ff_bfin_put_pixels_clamped;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
231 c->add_pixels_clamped = ff_bfin_add_pixels_clamped;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
232
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
233 c->clear_blocks = bfin_clear_blocks;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
234 c->pix_sum = ff_bfin_pix_sum;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
235 c->pix_norm1 = ff_bfin_pix_norm1;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
236
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
237 c->sad[0] = bfin_pix_abs16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
238 c->sad[1] = bfin_pix_abs8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
239
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
240 /* TODO [0] 16 [1] 8 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
241 c->pix_abs[0][0] = bfin_pix_abs16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
242 c->pix_abs[0][1] = bfin_pix_abs16_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
243 c->pix_abs[0][2] = bfin_pix_abs16_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
244 c->pix_abs[0][3] = bfin_pix_abs16_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
245
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
246 c->pix_abs[1][0] = bfin_pix_abs8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
247 c->pix_abs[1][1] = bfin_pix_abs8_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
248 c->pix_abs[1][2] = bfin_pix_abs8_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
249 c->pix_abs[1][3] = bfin_pix_abs8_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
250
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
251
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
252 c->sse[0] = ff_bfin_sse16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
253 c->sse[1] = ff_bfin_sse8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
254 c->sse[2] = ff_bfin_sse4;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
255
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
256
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
257 /**
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
258 * Halfpel motion compensation with rounding (a+b+1)>>1.
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
259 * This is an array[4][4] of motion compensation functions for 4
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
260 * horizontal blocksizes (8,16) and the 4 halfpel positions
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
261 * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ]
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
262 * @param block destination where the result is stored
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
263 * @param pixels source
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
264 * @param line_size number of bytes in a horizontal line of block
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
265 * @param h height
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
266 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
267
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
268 c->put_pixels_tab[0][0] = bfin_put_pixels16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
269 c->put_pixels_tab[0][1] = bfin_put_pixels16_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
270 c->put_pixels_tab[0][2] = bfin_put_pixels16_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
271 c->put_pixels_tab[0][3] = bfin_put_pixels16_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
272
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
273 c->put_pixels_tab[1][0] = bfin_put_pixels8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
274 c->put_pixels_tab[1][1] = bfin_put_pixels8_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
275 c->put_pixels_tab[1][2] = bfin_put_pixels8_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
276 c->put_pixels_tab[1][3] = bfin_put_pixels8_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
277
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
278 c->put_no_rnd_pixels_tab[1][0] = bfin_put_pixels8_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
279 c->put_no_rnd_pixels_tab[1][1] = bfin_put_pixels8_x2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
280 c->put_no_rnd_pixels_tab[1][2] = bfin_put_pixels8_y2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
281 c->put_no_rnd_pixels_tab[1][3] = ff_bfin_put_pixels8_xy2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
282
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
283 c->put_no_rnd_pixels_tab[0][0] = bfin_put_pixels16_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
284 c->put_no_rnd_pixels_tab[0][1] = bfin_put_pixels16_x2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
285 c->put_no_rnd_pixels_tab[0][2] = bfin_put_pixels16_y2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
286 c->put_no_rnd_pixels_tab[0][3] = ff_bfin_put_pixels16_xy2_nornd;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
287
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
288 c->fdct = ff_bfin_fdct;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
289 c->idct = ff_bfin_idct;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
290 c->idct_add = bfin_idct_add;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
291 c->idct_put = bfin_idct_put;
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
292 }
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
293
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
294
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
295