Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-plugins
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-plugins
Commits
f7e04bdd
Commit
f7e04bdd
authored
4 years ago
by
Aline Gondim Santos
Browse files
Options
Downloads
Patches
Plain Diff
GreenScreen: use static avutil, swscale and png
Change-Id: Id152158571b4a2b5ed70a3a2e720e18cfc7b3eab
parent
b74f4cbd
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
GreenScreen/build.sh
+8
-12
8 additions, 12 deletions
GreenScreen/build.sh
GreenScreen/videoSubscriber.cpp
+3
-2
3 additions, 2 deletions
GreenScreen/videoSubscriber.cpp
lib/accel.h
+2
-3
2 additions, 3 deletions
lib/accel.h
with
13 additions
and
17 deletions
GreenScreen/build.sh
+
8
−
12
View file @
f7e04bdd
...
@@ -109,19 +109,17 @@ then
...
@@ -109,19 +109,17 @@ then
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/opencv4/3rdparty/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/opencv4/3rdparty/"
\
-L
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
-gpu61/"
\
-L
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
-gpu61/"
\
-lswscale
\
-l
:lib
swscale
.a
\
-lavutil
\
-l
:lib
avutil
.a
\
-lopencv_imgcodecs
\
-lopencv_imgcodecs
\
-lopencv_imgproc
\
-lopencv_imgproc
\
-lopencv_core
\
-lopencv_core
\
-llibpng
\
-lva
\
-ltensorflow_cc
\
-ltensorflow_cc
\
-lpng
\
-o
"lib/
${
CONTRIB_PLATFORM
}
/
${
SO_FILE_NAME
}
"
-o
"lib/
${
CONTRIB_PLATFORM
}
/
${
SO_FILE_NAME
}
"
cp
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
-gpu61/libtensorflow_cc.so"
"lib/
$CONTRIB_PLATFORM
/libtensorflow_cc.so.2"
cp
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
-gpu61/libtensorflow_cc.so"
"lib/
$CONTRIB_PLATFORM
/libtensorflow_cc.so.2"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libswscale.so.4"
"lib/
$CONTRIB_PLATFORM
"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libavutil.so.55"
"lib/
$CONTRIB_PLATFORM
"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libpng16.so.16"
"lib/
$CONTRIB_PLATFORM
"
cp
"
${
CUDALIBS
}
/libcudart.so"
"lib/
$CONTRIB_PLATFORM
/libcudart.so.10.0"
cp
"
${
CUDALIBS
}
/libcudart.so"
"lib/
$CONTRIB_PLATFORM
/libcudart.so.10.0"
cp
"
${
CUDNN
}
/libcublas.so.10"
"lib/
$CONTRIB_PLATFORM
/libcublas.so.10.0"
cp
"
${
CUDNN
}
/libcublas.so.10"
"lib/
$CONTRIB_PLATFORM
/libcublas.so.10.0"
cp
"
${
CUDALIBS
}
/libcufft.so.10"
"lib/
$CONTRIB_PLATFORM
/libcufft.so.10.0"
cp
"
${
CUDALIBS
}
/libcufft.so.10"
"lib/
$CONTRIB_PLATFORM
/libcufft.so.10.0"
...
@@ -167,19 +165,17 @@ then
...
@@ -167,19 +165,17 @@ then
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/opencv4/3rdparty/"
\
-L
"
${
CONTRIB_PATH
}
/
${
CONTRIB_PLATFORM
}
/lib/opencv4/3rdparty/"
\
-L
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
/"
\
-L
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
/"
\
-lswscale
\
-l
:lib
swscale
.a
\
-lavutil
\
-l
:lib
avutil
.a
\
-lopencv_imgcodecs
\
-lopencv_imgcodecs
\
-lopencv_imgproc
\
-lopencv_imgproc
\
-lopencv_core
\
-lopencv_core
\
-ltensorflowlite
\
-ltensorflowlite
\
-lpng
\
-llibpng
\
-lva
\
-o
"lib/
${
CONTRIB_PLATFORM
}
/
${
SO_FILE_NAME
}
"
-o
"lib/
${
CONTRIB_PLATFORM
}
/
${
SO_FILE_NAME
}
"
cp
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
/libtensorflowlite.so"
"lib/
$CONTRIB_PLATFORM
"
cp
"
${
TF_LIBS_DIR
}
/
${
TF
}
/lib/
${
CONTRIB_PLATFORM
}
/libtensorflowlite.so"
"lib/
$CONTRIB_PLATFORM
"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libswscale.so.4"
"lib/
$CONTRIB_PLATFORM
"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libavutil.so.55"
"lib/
$CONTRIB_PLATFORM
"
cp
"/usr/lib/
${
CONTRIB_PLATFORM
}
/libpng16.so.16"
"lib/
$CONTRIB_PLATFORM
"
elif
[
"
${
PLATFORM
}
"
=
"android"
]
elif
[
"
${
PLATFORM
}
"
=
"android"
]
then
then
...
...
This diff is collapsed.
Click to expand it.
GreenScreen/videoSubscriber.cpp
+
3
−
2
View file @
f7e04bdd
...
@@ -91,7 +91,6 @@ VideoSubscriber::update(jami::Observable<AVFrame*>*, AVFrame* const& iFrame)
...
@@ -91,7 +91,6 @@ VideoSubscriber::update(jami::Observable<AVFrame*>*, AVFrame* const& iFrame)
auto
matrix_rotation
=
reinterpret_cast
<
int32_t
*>
(
side_data
->
data
);
auto
matrix_rotation
=
reinterpret_cast
<
int32_t
*>
(
side_data
->
data
);
angle
=
static_cast
<
int
>
(
av_display_rotation_get
(
matrix_rotation
));
angle
=
static_cast
<
int
>
(
av_display_rotation_get
(
matrix_rotation
));
}
}
pluginFrame
=
transferToMainMemory
(
pluginFrame
,
AV_PIX_FMT_NV12
);
//======================================================================================
//======================================================================================
// GET RAW FRAME
// GET RAW FRAME
...
@@ -101,7 +100,9 @@ VideoSubscriber::update(jami::Observable<AVFrame*>*, AVFrame* const& iFrame)
...
@@ -101,7 +100,9 @@ VideoSubscriber::update(jami::Observable<AVFrame*>*, AVFrame* const& iFrame)
int
inputWidth
=
pluginFrame
->
width
;
int
inputWidth
=
pluginFrame
->
width
;
fcopy
.
originalSize
=
cv
::
Size
{
inputWidth
,
inputHeight
};
fcopy
.
originalSize
=
cv
::
Size
{
inputWidth
,
inputHeight
};
FrameUniquePtr
bgrFrame
=
scaler
.
convertFormat
(
pluginFrame
,
AV_PIX_FMT_RGB24
);
FrameUniquePtr
bgrFrame
=
scaler
.
convertFormat
(
transferToMainMemory
(
pluginFrame
,
AV_PIX_FMT_NV12
),
AV_PIX_FMT_RGB24
);
cv
::
Mat
frame
=
cv
::
Mat
{
bgrFrame
->
height
,
cv
::
Mat
frame
=
cv
::
Mat
{
bgrFrame
->
height
,
bgrFrame
->
width
,
bgrFrame
->
width
,
CV_8UC3
,
CV_8UC3
,
...
...
This diff is collapsed.
Click to expand it.
lib/accel.h
+
2
−
3
View file @
f7e04bdd
...
@@ -53,8 +53,7 @@ av_frame_new_side_data_from_buf(AVFrame* frame, enum AVFrameSideDataType type, A
...
@@ -53,8 +53,7 @@ av_frame_new_side_data_from_buf(AVFrame* frame, enum AVFrameSideDataType type, A
AVFrame
*
AVFrame
*
transferToMainMemory
(
AVFrame
*
framePtr
,
AVPixelFormat
desiredFormat
)
transferToMainMemory
(
AVFrame
*
framePtr
,
AVPixelFormat
desiredFormat
)
{
{
AVFrame
*
out
;
AVFrame
*
out
=
av_frame_alloc
();
auto
desc
=
av_pix_fmt_desc_get
(
static_cast
<
AVPixelFormat
>
(
framePtr
->
format
));
auto
desc
=
av_pix_fmt_desc_get
(
static_cast
<
AVPixelFormat
>
(
framePtr
->
format
));
if
(
desc
&&
not
(
desc
->
flags
&
AV_PIX_FMT_FLAG_HWACCEL
))
{
if
(
desc
&&
not
(
desc
->
flags
&
AV_PIX_FMT_FLAG_HWACCEL
))
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment