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
bc26fe89
Commit
bc26fe89
authored
Sep 21, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/h264: Use ptrdiff_t for (bi)weight functions
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
289a6bb8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
27 deletions
+28
-27
h264dsp.h
libavcodec/h264dsp.h
+3
-2
h264dsp_template.c
libavcodec/h264dsp_template.c
+2
-2
h264dsp_mips.h
libavcodec/mips/h264dsp_mips.h
+13
-13
h264dsp_mmi.c
libavcodec/mips/h264dsp_mmi.c
+6
-6
h264dsp_init.c
libavcodec/x86/h264dsp_init.c
+4
-4
No files found.
libavcodec/h264dsp.h
View file @
bc26fe89
...
...
@@ -28,11 +28,12 @@
#define AVCODEC_H264DSP_H
#include <stdint.h>
#include <stddef.h>
typedef
void
(
*
h264_weight_func
)(
uint8_t
*
block
,
in
t
stride
,
int
height
,
typedef
void
(
*
h264_weight_func
)(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
typedef
void
(
*
h264_biweight_func
)(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
/**
...
...
libavcodec/h264dsp_template.c
View file @
bc26fe89
...
...
@@ -30,7 +30,7 @@
#define op_scale1(x) block[x] = av_clip_pixel( (block[x]*weight + offset) >> log2_denom )
#define op_scale2(x) dst[x] = av_clip_pixel( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1))
#define H264_WEIGHT(W) \
static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block,
in
t stride, int height, \
static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block,
ptrdiff_
t stride, int height, \
int log2_denom, int weight, int offset) \
{ \
int y; \
...
...
@@ -60,7 +60,7 @@ static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block, int stride, int heig
op_scale1(15); \
} \
} \
static void FUNCC(biweight_h264_pixels ## W)(uint8_t *_dst, uint8_t *_src,
in
t stride, int height, \
static void FUNCC(biweight_h264_pixels ## W)(uint8_t *_dst, uint8_t *_src,
ptrdiff_
t stride, int height, \
int log2_denom, int weightd, int weights, int offset) \
{ \
int y; \
...
...
libavcodec/mips/h264dsp_mips.h
View file @
bc26fe89
...
...
@@ -79,19 +79,19 @@ void ff_h264_h_loop_filter_luma_mbaff_intra_msa(uint8_t *src, int stride,
int
alpha
,
int
beta
);
void
ff_biweight_h264_pixels16_8_msa
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_biweight_h264_pixels8_8_msa
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_biweight_h264_pixels4_8_msa
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_weight_h264_pixels16_8_msa
(
uint8_t
*
src
,
in
t
stride
,
int
height
,
void
ff_weight_h264_pixels16_8_msa
(
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_weight_h264_pixels8_8_msa
(
uint8_t
*
src
,
in
t
stride
,
int
height
,
void
ff_weight_h264_pixels8_8_msa
(
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_weight_h264_pixels4_8_msa
(
uint8_t
*
src
,
in
t
stride
,
int
height
,
void
ff_weight_h264_pixels4_8_msa
(
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_put_h264_qpel16_mc00_msa
(
uint8_t
*
dst
,
const
uint8_t
*
src
,
...
...
@@ -339,23 +339,23 @@ void ff_h264_luma_dc_dequant_idct_8_mmi(int16_t *output, int16_t *input,
void
ff_h264_chroma_dc_dequant_idct_8_mmi
(
int16_t
*
block
,
int
qmul
);
void
ff_h264_chroma422_dc_dequant_idct_8_mmi
(
int16_t
*
block
,
int
qmul
);
void
ff_h264_weight_pixels16_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels16_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_h264_biweight_pixels16_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_h264_weight_pixels8_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels8_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_h264_biweight_pixels8_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_h264_weight_pixels4_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels4_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
);
void
ff_h264_biweight_pixels4_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
);
void
ff_deblock_v_chroma_8_mmi
(
uint8_t
*
pix
,
in
t
stride
,
int
alpha
,
int
beta
,
void
ff_deblock_v_chroma_8_mmi
(
uint8_t
*
pix
,
ptrdiff_
t
stride
,
int
alpha
,
int
beta
,
int8_t
*
tc0
);
void
ff_deblock_v_chroma_intra_8_mmi
(
uint8_t
*
pix
,
int
stride
,
int
alpha
,
int
beta
);
...
...
libavcodec/mips/h264dsp_mmi.c
View file @
bc26fe89
...
...
@@ -1152,7 +1152,7 @@ void ff_h264_chroma_dc_dequant_idct_8_mmi(int16_t *block, int qmul)
block
[
48
]
=
((
d
-
b
)
*
qmul
)
>>
7
;
}
void
ff_h264_weight_pixels16_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels16_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
)
{
int
y
;
...
...
@@ -1205,7 +1205,7 @@ void ff_h264_weight_pixels16_8_mmi(uint8_t *block, int stride, int height,
}
}
void
ff_h264_biweight_pixels16_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
void
ff_h264_biweight_pixels16_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
)
{
int
y
;
...
...
@@ -1273,7 +1273,7 @@ void ff_h264_biweight_pixels16_8_mmi(uint8_t *dst, uint8_t *src, int stride,
}
}
void
ff_h264_weight_pixels8_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels8_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
)
{
int
y
;
...
...
@@ -1313,7 +1313,7 @@ void ff_h264_weight_pixels8_8_mmi(uint8_t *block, int stride, int height,
}
}
void
ff_h264_biweight_pixels8_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
void
ff_h264_biweight_pixels8_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
)
{
int
y
;
...
...
@@ -1362,7 +1362,7 @@ void ff_h264_biweight_pixels8_8_mmi(uint8_t *dst, uint8_t *src, int stride,
}
}
void
ff_h264_weight_pixels4_8_mmi
(
uint8_t
*
block
,
in
t
stride
,
int
height
,
void
ff_h264_weight_pixels4_8_mmi
(
uint8_t
*
block
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weight
,
int
offset
)
{
int
y
;
...
...
@@ -1402,7 +1402,7 @@ void ff_h264_weight_pixels4_8_mmi(uint8_t *block, int stride, int height,
}
}
void
ff_h264_biweight_pixels4_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
in
t
stride
,
void
ff_h264_biweight_pixels4_8_mmi
(
uint8_t
*
dst
,
uint8_t
*
src
,
ptrdiff_
t
stride
,
int
height
,
int
log2_denom
,
int
weightd
,
int
weights
,
int
offset
)
{
int
y
;
...
...
libavcodec/x86/h264dsp_init.c
View file @
bc26fe89
...
...
@@ -157,13 +157,13 @@ LF_IFUNC(v, luma_intra, 10, mmxext)
/* weighted prediction */
#define H264_WEIGHT(W, OPT) \
void ff_h264_weight_ ## W ## _ ## OPT(uint8_t *dst,
int stride,
\
void ff_h264_weight_ ## W ## _ ## OPT(uint8_t *dst,
ptrdiff_t stride,
\
int height, int log2_denom, \
int weight, int offset);
#define H264_BIWEIGHT(W, OPT) \
void ff_h264_biweight_ ## W ## _ ## OPT(uint8_t *dst, uint8_t *src, \
int stride, int height,
\
ptrdiff_t stride, int height,
\
int log2_denom, int weightd, \
int weights, int offset);
...
...
@@ -183,7 +183,7 @@ H264_BIWEIGHT_MMX(4)
#define H264_WEIGHT_10(W, DEPTH, OPT) \
void ff_h264_weight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \
int stride,
\
ptrdiff_t stride,
\
int height, \
int log2_denom, \
int weight, \
...
...
@@ -192,7 +192,7 @@ void ff_h264_weight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \
#define H264_BIWEIGHT_10(W, DEPTH, OPT) \
void ff_h264_biweight_ ## W ## _ ## DEPTH ## _ ## OPT(uint8_t *dst, \
uint8_t *src, \
int stride,
\
ptrdiff_t stride,
\
int height, \
int log2_denom, \
int weightd, \
...
...
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