Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
bf6b3ec9
Commit
bf6b3ec9
authored
Feb 07, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: Move rnd_avg inline functions to a separate header
parent
b9c2408b
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
23 deletions
+51
-23
bit_depth_template.c
libavcodec/bit_depth_template.c
+1
-0
dsputil.h
libavcodec/dsputil.h
+0
-23
rnd_avg.h
libavcodec/rnd_avg.h
+47
-0
dsputil_align.c
libavcodec/sh4/dsputil_align.c
+1
-0
qpel.c
libavcodec/sh4/qpel.c
+1
-0
vp3dsp.c
libavcodec/vp3dsp.c
+1
-0
No files found.
libavcodec/bit_depth_template.c
View file @
bf6b3ec9
...
...
@@ -17,6 +17,7 @@
*/
#include "dsputil.h"
#include "rnd_avg.h"
#ifndef BIT_DEPTH
#define BIT_DEPTH 8
...
...
libavcodec/dsputil.h
View file @
bf6b3ec9
...
...
@@ -403,29 +403,6 @@ int ff_check_alignment(void);
void
ff_set_cmp
(
DSPContext
*
c
,
me_cmp_func
*
cmp
,
int
type
);
#define BYTE_VEC32(c) ((c)*0x01010101UL)
#define BYTE_VEC64(c) ((c)*0x0001000100010001UL)
static
inline
uint32_t
rnd_avg32
(
uint32_t
a
,
uint32_t
b
)
{
return
(
a
|
b
)
-
(((
a
^
b
)
&
~
BYTE_VEC32
(
0x01
))
>>
1
);
}
static
inline
uint32_t
no_rnd_avg32
(
uint32_t
a
,
uint32_t
b
)
{
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC32
(
0x01
))
>>
1
);
}
static
inline
uint64_t
rnd_avg64
(
uint64_t
a
,
uint64_t
b
)
{
return
(
a
|
b
)
-
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
}
static
inline
uint64_t
no_rnd_avg64
(
uint64_t
a
,
uint64_t
b
)
{
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
}
void
ff_dsputil_init_alpha
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_arm
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_bfin
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
...
...
libavcodec/rnd_avg.h
0 → 100644
View file @
bf6b3ec9
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_RND_AVG_H
#define AVCODEC_RND_AVG_H
#include <stdint.h>
#define BYTE_VEC32(c) ((c)*0x01010101UL)
#define BYTE_VEC64(c) ((c)*0x0001000100010001UL)
static
inline
uint32_t
rnd_avg32
(
uint32_t
a
,
uint32_t
b
)
{
return
(
a
|
b
)
-
(((
a
^
b
)
&
~
BYTE_VEC32
(
0x01
))
>>
1
);
}
static
inline
uint32_t
no_rnd_avg32
(
uint32_t
a
,
uint32_t
b
)
{
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC32
(
0x01
))
>>
1
);
}
static
inline
uint64_t
rnd_avg64
(
uint64_t
a
,
uint64_t
b
)
{
return
(
a
|
b
)
-
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
}
static
inline
uint64_t
no_rnd_avg64
(
uint64_t
a
,
uint64_t
b
)
{
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
}
#endif
/* AVCODEC_RND_AVG_H */
libavcodec/sh4/dsputil_align.c
View file @
bf6b3ec9
...
...
@@ -23,6 +23,7 @@
#include "libavutil/attributes.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
#include "libavcodec/rnd_avg.h"
#include "dsputil_sh4.h"
...
...
libavcodec/sh4/qpel.c
View file @
bf6b3ec9
...
...
@@ -23,6 +23,7 @@
#include "libavutil/common.h"
#include "libavcodec/copy_block.h"
#include "libavcodec/rnd_avg.h"
#define PIXOP2(OPNAME, OP) \
\
...
...
libavcodec/vp3dsp.c
View file @
bf6b3ec9
...
...
@@ -28,6 +28,7 @@
#include "libavutil/common.h"
#include "avcodec.h"
#include "dsputil.h"
#include "rnd_avg.h"
#include "vp3dsp.h"
#define IdctAdjustBeforeShift 8
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment