Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
b5b7b75e
Commit
b5b7b75e
authored
Feb 07, 2013
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dsputil: Move get_penalty_factor() to the only place it is used.
parent
0b016eb9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
20 deletions
+20
-20
dsputil.h
libavcodec/dsputil.h
+0
-20
motion_est.c
libavcodec/motion_est.c
+20
-0
No files found.
libavcodec/dsputil.h
View file @
b5b7b75e
...
@@ -460,26 +460,6 @@ static inline uint64_t no_rnd_avg64(uint64_t a, uint64_t b)
...
@@ -460,26 +460,6 @@ static inline uint64_t no_rnd_avg64(uint64_t a, uint64_t b)
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
return
(
a
&
b
)
+
(((
a
^
b
)
&
~
BYTE_VEC64
(
0x01
))
>>
1
);
}
}
static
inline
int
get_penalty_factor
(
int
lambda
,
int
lambda2
,
int
type
){
switch
(
type
&
0xFF
){
default
:
case
FF_CMP_SAD
:
return
lambda
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_DCT
:
return
(
3
*
lambda
)
>>
(
FF_LAMBDA_SHIFT
+
1
);
case
FF_CMP_SATD
:
case
FF_CMP_DCT264
:
return
(
2
*
lambda
)
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_RD
:
case
FF_CMP_PSNR
:
case
FF_CMP_SSE
:
case
FF_CMP_NSSE
:
return
lambda2
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_BIT
:
return
1
;
}
}
void
ff_dsputil_init_alpha
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_alpha
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_arm
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_arm
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_bfin
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
void
ff_dsputil_init_bfin
(
DSPContext
*
c
,
AVCodecContext
*
avctx
);
...
...
libavcodec/motion_est.c
View file @
b5b7b75e
...
@@ -972,6 +972,26 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int
...
@@ -972,6 +972,26 @@ static inline int check_input_motion(MpegEncContext * s, int mb_x, int mb_y, int
return
d
;
return
d
;
}
}
static
inline
int
get_penalty_factor
(
int
lambda
,
int
lambda2
,
int
type
){
switch
(
type
&
0xFF
){
default
:
case
FF_CMP_SAD
:
return
lambda
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_DCT
:
return
(
3
*
lambda
)
>>
(
FF_LAMBDA_SHIFT
+
1
);
case
FF_CMP_SATD
:
case
FF_CMP_DCT264
:
return
(
2
*
lambda
)
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_RD
:
case
FF_CMP_PSNR
:
case
FF_CMP_SSE
:
case
FF_CMP_NSSE
:
return
lambda2
>>
FF_LAMBDA_SHIFT
;
case
FF_CMP_BIT
:
return
1
;
}
}
void
ff_estimate_p_frame_motion
(
MpegEncContext
*
s
,
void
ff_estimate_p_frame_motion
(
MpegEncContext
*
s
,
int
mb_x
,
int
mb_y
)
int
mb_x
,
int
mb_y
)
{
{
...
...
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