Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-bad
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
994
Issues
994
List
Boards
Labels
Service Desk
Milestones
Merge Requests
192
Merge Requests
192
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gst-plugins-bad
Commits
a512f5b6
Commit
a512f5b6
authored
May 09, 2019
by
Seungha Yang
🐑
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nvenc: Respect display aspect ratio and set to encoding parameter
It should be written in VUI parameter for proper rendering
parent
39c8c206
Pipeline
#35932
passed with stages
in 37 minutes and 54 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
sys/nvenc/gstnvbaseenc.c
sys/nvenc/gstnvbaseenc.c
+9
-0
No files found.
sys/nvenc/gstnvbaseenc.c
View file @
a512f5b6
...
...
@@ -1099,6 +1099,7 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
NV_ENC_INITIALIZE_PARAMS
*
params
;
NV_ENC_PRESET_CONFIG
preset_config
=
{
0
,
};
NVENCSTATUS
nv_ret
;
gint
dar_n
,
dar_d
;
g_atomic_int_set
(
&
nvenc
->
reconfig
,
FALSE
);
...
...
@@ -1206,6 +1207,14 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc, GstVideoCodecState * state)
GST_FIXME_OBJECT
(
nvenc
,
"variable framerate"
);
}
if
(
gst_util_fraction_multiply
(
GST_VIDEO_INFO_WIDTH
(
info
),
GST_VIDEO_INFO_HEIGHT
(
info
),
GST_VIDEO_INFO_PAR_N
(
info
),
GST_VIDEO_INFO_PAR_D
(
info
),
&
dar_n
,
&
dar_d
)
&&
dar_n
>
0
&&
dar_d
>
0
)
{
params
->
darWidth
=
dar_n
;
params
->
darHeight
=
dar_d
;
}
if
(
nvenc
->
rate_control_mode
!=
GST_NV_RC_MODE_DEFAULT
)
{
params
->
encodeConfig
->
rcParams
.
rateControlMode
=
_rc_mode_to_nv
(
nvenc
->
rate_control_mode
);
...
...
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