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
ac682955
Commit
ac682955
authored
Sep 19, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postproc: add basic deblock filter visualization support
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
266b3d4f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
6 deletions
+34
-6
APIchanges
doc/APIchanges
+3
-0
postprocess.c
libpostproc/postprocess.c
+19
-1
postprocess_internal.h
libpostproc/postprocess_internal.h
+1
-0
postprocess_template.c
libpostproc/postprocess_template.c
+10
-4
version.h
libpostproc/version.h
+1
-1
No files found.
doc/APIchanges
View file @
ac682955
...
@@ -15,6 +15,9 @@ libavutil: 2014-08-09
...
@@ -15,6 +15,9 @@ libavutil: 2014-08-09
API changes, most recent first:
API changes, most recent first:
2014-09-24 - xxxxxxx - libpostproc 53.1.100
Add vissualization support
2014-09-xx - xxxxxxx - lavc 56.1.101 - dv_profile.h
2014-09-xx - xxxxxxx - lavc 56.1.101 - dv_profile.h
deprecate avpriv_dv_frame_profile2(), which was made public by accident.
deprecate avpriv_dv_frame_profile2(), which was made public by accident.
...
...
libpostproc/postprocess.c
View file @
ac682955
...
@@ -151,6 +151,7 @@ static const struct PPFilter filters[]=
...
@@ -151,6 +151,7 @@ static const struct PPFilter filters[]=
{
"tn"
,
"tmpnoise"
,
1
,
7
,
8
,
TEMP_NOISE_FILTER
},
{
"tn"
,
"tmpnoise"
,
1
,
7
,
8
,
TEMP_NOISE_FILTER
},
{
"fq"
,
"forcequant"
,
1
,
0
,
0
,
FORCE_QUANT
},
{
"fq"
,
"forcequant"
,
1
,
0
,
0
,
FORCE_QUANT
},
{
"be"
,
"bitexact"
,
1
,
0
,
0
,
BITEXACT
},
{
"be"
,
"bitexact"
,
1
,
0
,
0
,
BITEXACT
},
{
"vi"
,
"visualize"
,
1
,
0
,
0
,
VISUALIZE
},
{
NULL
,
NULL
,
0
,
0
,
0
,
0
}
//End Marker
{
NULL
,
NULL
,
0
,
0
,
0
,
0
}
//End Marker
};
};
...
@@ -430,7 +431,7 @@ static inline void horizX1Filter(uint8_t *src, int stride, int QP)
...
@@ -430,7 +431,7 @@ static inline void horizX1Filter(uint8_t *src, int stride, int QP)
* accurate deblock filter
* accurate deblock filter
*/
*/
static
av_always_inline
void
do_a_deblock_C
(
uint8_t
*
src
,
int
step
,
static
av_always_inline
void
do_a_deblock_C
(
uint8_t
*
src
,
int
step
,
int
stride
,
const
PPContext
*
c
)
int
stride
,
const
PPContext
*
c
,
int
mode
)
{
{
int
y
;
int
y
;
const
int
QP
=
c
->
QP
;
const
int
QP
=
c
->
QP
;
...
@@ -485,6 +486,16 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
...
@@ -485,6 +486,16 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
sums
[
8
]
=
sums
[
7
]
-
src
[
3
*
step
]
+
last
;
sums
[
8
]
=
sums
[
7
]
-
src
[
3
*
step
]
+
last
;
sums
[
9
]
=
sums
[
8
]
-
src
[
4
*
step
]
+
last
;
sums
[
9
]
=
sums
[
8
]
-
src
[
4
*
step
]
+
last
;
if
(
mode
&
VISUALIZE
)
{
src
[
0
*
step
]
=
src
[
1
*
step
]
=
src
[
2
*
step
]
=
src
[
3
*
step
]
=
src
[
4
*
step
]
=
src
[
5
*
step
]
=
src
[
6
*
step
]
=
src
[
7
*
step
]
=
128
;
}
src
[
0
*
step
]
=
(
sums
[
0
]
+
sums
[
2
]
+
2
*
src
[
0
*
step
])
>>
4
;
src
[
0
*
step
]
=
(
sums
[
0
]
+
sums
[
2
]
+
2
*
src
[
0
*
step
])
>>
4
;
src
[
1
*
step
]
=
(
sums
[
1
]
+
sums
[
3
]
+
2
*
src
[
1
*
step
])
>>
4
;
src
[
1
*
step
]
=
(
sums
[
1
]
+
sums
[
3
]
+
2
*
src
[
1
*
step
])
>>
4
;
src
[
2
*
step
]
=
(
sums
[
2
]
+
sums
[
4
]
+
2
*
src
[
2
*
step
])
>>
4
;
src
[
2
*
step
]
=
(
sums
[
2
]
+
sums
[
4
]
+
2
*
src
[
2
*
step
])
>>
4
;
...
@@ -516,6 +527,13 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
...
@@ -516,6 +527,13 @@ static av_always_inline void do_a_deblock_C(uint8_t *src, int step,
d
=
FFMAX
(
d
,
q
);
d
=
FFMAX
(
d
,
q
);
}
}
if
((
mode
&
VISUALIZE
)
&&
d
)
{
d
=
(
d
<
0
)
?
32
:
-
32
;
src
[
3
*
step
]
=
av_clip_uint8
(
src
[
3
*
step
]
-
d
);
src
[
4
*
step
]
=
av_clip_uint8
(
src
[
4
*
step
]
+
d
);
d
=
0
;
}
src
[
3
*
step
]
-=
d
;
src
[
3
*
step
]
-=
d
;
src
[
4
*
step
]
+=
d
;
src
[
4
*
step
]
+=
d
;
}
}
...
...
libpostproc/postprocess_internal.h
View file @
ac682955
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
#define TEMP_NOISE_FILTER 0x100000
#define TEMP_NOISE_FILTER 0x100000
#define FORCE_QUANT 0x200000
#define FORCE_QUANT 0x200000
#define BITEXACT 0x1000000
#define BITEXACT 0x1000000
#define VISUALIZE 0x2000000
//use if you want a faster postprocessing code
//use if you want a faster postprocessing code
//cannot differentiate between chroma & luma filters (both on or both off)
//cannot differentiate between chroma & luma filters (both on or both off)
...
...
libpostproc/postprocess_template.c
View file @
ac682955
...
@@ -2544,7 +2544,7 @@ Switch between
...
@@ -2544,7 +2544,7 @@ Switch between
/**
/**
* accurate deblock filter
* accurate deblock filter
*/
*/
static
av_always_inline
void
RENAME
(
do_a_deblock
)(
uint8_t
*
src
,
int
step
,
int
stride
,
const
PPContext
*
c
){
static
av_always_inline
void
RENAME
(
do_a_deblock
)(
uint8_t
*
src
,
int
step
,
int
stride
,
const
PPContext
*
c
,
int
mode
){
int64_t
dc_mask
,
eq_mask
,
both_masks
;
int64_t
dc_mask
,
eq_mask
,
both_masks
;
int64_t
sums
[
10
*
8
*
2
];
int64_t
sums
[
10
*
8
*
2
];
src
+=
step
*
3
;
// src points to begin of the 8x8 Block
src
+=
step
*
3
;
// src points to begin of the 8x8 Block
...
@@ -3272,6 +3272,12 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
...
@@ -3272,6 +3272,12 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
uint8_t
*
const
tempDst
=
(
dstStride
>
0
?
c
.
tempDst
:
c
.
tempDst
-
23
*
dstStride
)
+
32
;
uint8_t
*
const
tempDst
=
(
dstStride
>
0
?
c
.
tempDst
:
c
.
tempDst
-
23
*
dstStride
)
+
32
;
//const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4;
//const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4;
if
(
mode
&
VISUALIZE
){
if
(
!
(
mode
&
(
V_A_DEBLOCK
|
H_A_DEBLOCK
))
||
TEMPLATE_PP_MMX
)
{
av_log
(
c2
,
AV_LOG_WARNING
,
"Visualization is currently only supported with the accurate deblock filter without SIMD
\n
"
);
}
}
#if TEMPLATE_PP_MMX
#if TEMPLATE_PP_MMX
for
(
i
=
0
;
i
<
57
;
i
++
){
for
(
i
=
0
;
i
<
57
;
i
++
){
int
offset
=
((
i
*
c
.
ppMode
.
baseDcDiff
)
>>
8
)
+
1
;
int
offset
=
((
i
*
c
.
ppMode
.
baseDcDiff
)
>>
8
)
+
1
;
...
@@ -3566,7 +3572,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
...
@@ -3566,7 +3572,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
else
if
(
t
==
2
)
else
if
(
t
==
2
)
RENAME
(
doVertDefFilter
)(
dstBlock
,
stride
,
&
c
);
RENAME
(
doVertDefFilter
)(
dstBlock
,
stride
,
&
c
);
}
else
if
(
mode
&
V_A_DEBLOCK
){
}
else
if
(
mode
&
V_A_DEBLOCK
){
RENAME
(
do_a_deblock
)(
dstBlock
,
stride
,
1
,
&
c
);
RENAME
(
do_a_deblock
)(
dstBlock
,
stride
,
1
,
&
c
,
mode
);
}
}
}
}
...
@@ -3587,7 +3593,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
...
@@ -3587,7 +3593,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
else
if
(
t
==
2
)
else
if
(
t
==
2
)
RENAME
(
doVertDefFilter
)(
tempBlock1
,
16
,
&
c
);
RENAME
(
doVertDefFilter
)(
tempBlock1
,
16
,
&
c
);
}
else
if
(
mode
&
H_A_DEBLOCK
){
}
else
if
(
mode
&
H_A_DEBLOCK
){
RENAME
(
do_a_deblock
)(
tempBlock1
,
16
,
1
,
&
c
);
RENAME
(
do_a_deblock
)(
tempBlock1
,
16
,
1
,
&
c
,
mode
);
}
}
RENAME
(
transpose2
)(
dstBlock
-
4
,
dstStride
,
tempBlock1
+
4
*
16
);
RENAME
(
transpose2
)(
dstBlock
-
4
,
dstStride
,
tempBlock1
+
4
*
16
);
...
@@ -3619,7 +3625,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
...
@@ -3619,7 +3625,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
RENAME
(
doHorizDefFilter
)(
dstBlock
-
4
,
stride
,
&
c
);
RENAME
(
doHorizDefFilter
)(
dstBlock
-
4
,
stride
,
&
c
);
#endif
#endif
}
else
if
(
mode
&
H_A_DEBLOCK
){
}
else
if
(
mode
&
H_A_DEBLOCK
){
RENAME
(
do_a_deblock
)(
dstBlock
-
8
,
1
,
stride
,
&
c
);
RENAME
(
do_a_deblock
)(
dstBlock
-
8
,
1
,
stride
,
&
c
,
mode
);
}
}
#endif //TEMPLATE_PP_MMX
#endif //TEMPLATE_PP_MMX
if
(
mode
&
DERING
){
if
(
mode
&
DERING
){
...
...
libpostproc/version.h
View file @
ac682955
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "libavutil/avutil.h"
#include "libavutil/avutil.h"
#define LIBPOSTPROC_VERSION_MAJOR 53
#define LIBPOSTPROC_VERSION_MAJOR 53
#define LIBPOSTPROC_VERSION_MINOR
0
#define LIBPOSTPROC_VERSION_MINOR
1
#define LIBPOSTPROC_VERSION_MICRO 100
#define LIBPOSTPROC_VERSION_MICRO 100
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
...
...
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