annotate bfin/dsputil_bfin.c @ 5404:842d88e745ab libavcodec

also support DEBUG_PICT_INFO for h263i
author michael
date Thu, 26 Jul 2007 15:46:43 +0000
parents 13b0682bdf11
children 6c385356e61f
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>
5010
d5ba514e3f4a Add libavcodec to compiler include flags in order to simplify header
diego
parents: 4773
diff changeset
25 #include "avcodec.h"
d5ba514e3f4a Add libavcodec to compiler include flags in order to simplify header
diego
parents: 4773
diff changeset
26 #include "dsputil.h"
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
27 #include "dsputil_bfin.h"
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
28
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
29 int off;
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
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
32 extern void ff_bfin_idct (DCTELEM *block) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
33 extern void ff_bfin_fdct (DCTELEM *block) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
34 extern void ff_bfin_add_pixels_clamped (DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
35 extern void ff_bfin_put_pixels_clamped (DCTELEM *block, uint8_t *dest, int line_size) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
36 extern void ff_bfin_diff_pixels (DCTELEM *block, uint8_t *s1, uint8_t *s2, int stride) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
37 extern void ff_bfin_get_pixels (DCTELEM *restrict block, const uint8_t *pixels, int line_size) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
38 extern int ff_bfin_pix_norm1 (uint8_t * pix, int line_size) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
39 extern int ff_bfin_z_sad8x8 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
40 extern int ff_bfin_z_sad16x16 (uint8_t *blk1, uint8_t *blk2, int dsz, int line_size, int h) attribute_l1_text;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
41
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
42 extern void ff_bfin_z_put_pixels16_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
43 extern void ff_bfin_z_put_pixels8_xy2 (uint8_t *block, const uint8_t *s0, int dest_size, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
44 extern void ff_bfin_put_pixels16_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
45 extern void ff_bfin_put_pixels8_xy2_nornd (uint8_t *block, const uint8_t *s0, int line_size, int h) attribute_l1_text;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
46
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
47
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
48 extern int ff_bfin_pix_sum (uint8_t *p, int stride) attribute_l1_text;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
49
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
50 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) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
51 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) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
52 extern void ff_bfin_put_pixels8uc_nornd (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
53 extern void ff_bfin_put_pixels16uc_nornd (uint8_t *block, const uint8_t *s0, const uint8_t *s1, int line_size, int h) attribute_l1_text;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
54
5180
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
55 extern int ff_bfin_sse4 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
56 extern int ff_bfin_sse8 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text;
3d6f2ff62910 renaming L1CODE to attribute_l1_text, which is defined in dsputil_bfin.h
mhoffman
parents: 5130
diff changeset
57 extern int ff_bfin_sse16 (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) attribute_l1_text;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
58
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
59
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
60 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
61 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
62 ff_bfin_idct (block);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
63 ff_bfin_add_pixels_clamped (block, dest, line_size);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
64 }
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 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
67 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
68 ff_bfin_idct (block);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
69 ff_bfin_put_pixels_clamped (block, dest, line_size);
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
70 }
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_clear_blocks (DCTELEM *blocks)
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 // This is just a simple memset.
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
76 //
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
77 asm("P0=192; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
78 "I0=%0; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
79 "R0=0; "
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
80 "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
81 "clear_blocks_blkfn_lab:"
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
82 "[I0++]=R0;"
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
83 ::"a" (blocks):"P0","I0","R0");
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
84 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
85
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
86
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
87
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
88 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
89 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
90 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
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 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
94 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
95 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
96 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
97
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
98 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
99 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
100 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
101 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
102
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
103 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
104 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
105 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
106 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
107
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
108 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
109 {
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
110 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
111 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
112
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
113 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
114 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
115 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
116 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
117
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
118 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
119 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
120 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
121 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
122
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
123 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
124 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
125 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
126 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
127
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
128 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
129 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
130 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
131 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
132
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
133 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
134 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
135 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
136 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
137
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
138 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
139 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
140 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
141 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
142
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 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
145 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
146 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
147 }
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 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
150 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
151 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
152 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
153
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
154 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
155 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
156 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
157 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
158
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
159 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
160 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
161 return ff_bfin_z_sad16x16 (blk1,blk2,line_size,line_size,h);
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
162 }
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
163
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
164 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
165
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
166 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
167 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
168 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
169 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
170 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
171
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
172 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
173 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
174 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
175 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
176 }
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 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
179 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
180 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
181 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
182 }
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 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
185 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
186 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
187 }
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
188
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
189 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
190 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
191 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
192 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
193 }
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 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
196 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
197 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
198 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
199 }
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 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
202 {
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
203 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
204 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
205 }
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 /*
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
209 decoder optimization
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
210 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
211 9.824s ~ 2.44x off
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
212 6.360s ~ 1.58x off with -O2
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
213 5.740s ~ 1.43x off with idcts
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 2.64s 2/20 same sman.mp4 decode only
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
216
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
217 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
218
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
219 void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
220 {
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
221 c->get_pixels = ff_bfin_get_pixels;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
222 c->diff_pixels = ff_bfin_diff_pixels;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
223 c->put_pixels_clamped = ff_bfin_put_pixels_clamped;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
224 c->add_pixels_clamped = ff_bfin_add_pixels_clamped;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
225
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
226 c->clear_blocks = bfin_clear_blocks;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
227 c->pix_sum = ff_bfin_pix_sum;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
228 c->pix_norm1 = ff_bfin_pix_norm1;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
229
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
230 c->sad[0] = bfin_pix_abs16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
231 c->sad[1] = bfin_pix_abs8;
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 /* TODO [0] 16 [1] 8 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
234 c->pix_abs[0][0] = bfin_pix_abs16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
235 c->pix_abs[0][1] = bfin_pix_abs16_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
236 c->pix_abs[0][2] = bfin_pix_abs16_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
237 c->pix_abs[0][3] = bfin_pix_abs16_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
238
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
239 c->pix_abs[1][0] = bfin_pix_abs8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
240 c->pix_abs[1][1] = bfin_pix_abs8_x2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
241 c->pix_abs[1][2] = bfin_pix_abs8_y2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
242 c->pix_abs[1][3] = bfin_pix_abs8_xy2;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
243
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
244
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
245 c->sse[0] = ff_bfin_sse16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
246 c->sse[1] = ff_bfin_sse8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
247 c->sse[2] = ff_bfin_sse4;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
248
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
249
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 * Halfpel motion compensation with rounding (a+b+1)>>1.
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
252 * 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
253 * horizontal blocksizes (8,16) and the 4 halfpel positions
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
254 * *pixels_tab[ 0->16xH 1->8xH ][ xhalfpel + 2*yhalfpel ]
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
255 * @param block destination where the result is stored
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
256 * @param pixels source
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
257 * @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
258 * @param h height
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
259 */
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
260
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
261 c->put_pixels_tab[0][0] = bfin_put_pixels16;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
262 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
263 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
264 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
265
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
266 c->put_pixels_tab[1][0] = bfin_put_pixels8;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
267 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
268 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
269 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
270
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
271 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
272 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
273 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
274 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
275
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
276 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
277 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
278 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
279 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
280
5130
bd2133a6973c Blackfin IDCT has no special permutation it uses normal order
mhoffman
parents: 5010
diff changeset
281 c->idct_permutation_type = FF_NO_IDCT_PERM;
4765
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
282 c->fdct = ff_bfin_fdct;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
283 c->idct = ff_bfin_idct;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
284 c->idct_add = bfin_idct_add;
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
285 c->idct_put = bfin_idct_put;
3728
4d346abd723c ADI Blackfin optimizations
diego
parents:
diff changeset
286 }
4765
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
85298e8c55c4 bfin dsputils, basic pixel operations sads, diffs, motion compensation
diego
parents: 3947
diff changeset
289