Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b7cc4eb3
Commit
b7cc4eb3
authored
Mar 20, 2017
by
Clément Bœsch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/nvenc: misc cosmetics to reduce diff with Libav
parent
e849296d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
nvenc.c
libavcodec/nvenc.c
+13
-13
No files found.
libavcodec/nvenc.c
View file @
b7cc4eb3
...
...
@@ -48,8 +48,8 @@ const enum AVPixelFormat ff_nvenc_pix_fmts[] = {
AV_PIX_FMT_NONE
};
#define IS_10BIT(pix_fmt)
(pix_fmt == AV_PIX_FMT_P010 ||
\
pix_fmt == AV_PIX_FMT_YUV444P16)
#define IS_10BIT(pix_fmt)
(pix_fmt == AV_PIX_FMT_P010 ||
\
pix_fmt == AV_PIX_FMT_YUV444P16)
#define IS_YUV444(pix_fmt) (pix_fmt == AV_PIX_FMT_YUV444P || \
pix_fmt == AV_PIX_FMT_YUV444P16)
...
...
@@ -103,7 +103,7 @@ static int nvenc_map_error(NVENCSTATUS err, const char **desc)
}
static
int
nvenc_print_error
(
void
*
log_ctx
,
NVENCSTATUS
err
,
const
char
*
error_string
)
const
char
*
error_string
)
{
const
char
*
desc
;
int
ret
;
...
...
@@ -114,7 +114,7 @@ static int nvenc_print_error(void *log_ctx, NVENCSTATUS err,
static
av_cold
int
nvenc_load_libraries
(
AVCodecContext
*
avctx
)
{
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencDynLoadFunctions
*
dl_fn
=
&
ctx
->
nvenc_dload_funcs
;
NVENCSTATUS
err
;
uint32_t
nvenc_max_ver
;
...
...
@@ -176,7 +176,7 @@ static av_cold int nvenc_open_session(AVCodecContext *avctx)
static
int
nvenc_check_codec_support
(
AVCodecContext
*
avctx
)
{
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencContext
*
ctx
=
avctx
->
priv_data
;
NV_ENCODE_API_FUNCTION_LIST
*
p_nvenc
=
&
ctx
->
nvenc_dload_funcs
.
nvenc_funcs
;
int
i
,
ret
,
count
=
0
;
GUID
*
guids
=
NULL
;
...
...
@@ -386,7 +386,7 @@ fail:
static
av_cold
int
nvenc_setup_device
(
AVCodecContext
*
avctx
)
{
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencDynLoadFunctions
*
dl_fn
=
&
ctx
->
nvenc_dload_funcs
;
switch
(
avctx
->
codec
->
id
)
{
...
...
@@ -544,7 +544,7 @@ static av_cold void set_vbr(AVCodecContext *avctx)
rc
->
minQP
.
qpInterB
=
avctx
->
qmin
;
rc
->
minQP
.
qpInterP
=
avctx
->
qmin
;
rc
->
minQP
.
qpIntra
=
avctx
->
qmin
;
rc
->
minQP
.
qpIntra
=
avctx
->
qmin
;
rc
->
maxQP
.
qpInterB
=
avctx
->
qmax
;
rc
->
maxQP
.
qpInterP
=
avctx
->
qmax
;
...
...
@@ -602,7 +602,7 @@ static av_cold void set_lossless(AVCodecContext *avctx)
rc
->
rateControlMode
=
NV_ENC_PARAMS_RC_CONSTQP
;
rc
->
constQP
.
qpInterB
=
0
;
rc
->
constQP
.
qpInterP
=
0
;
rc
->
constQP
.
qpIntra
=
0
;
rc
->
constQP
.
qpIntra
=
0
;
avctx
->
qmin
=
-
1
;
avctx
->
qmax
=
-
1
;
...
...
@@ -883,18 +883,18 @@ static av_cold int nvenc_setup_hevc_config(AVCodecContext *avctx)
hevc
->
outputPictureTimingSEI
=
1
;
}
switch
(
ctx
->
profile
)
{
switch
(
ctx
->
profile
)
{
case
NV_ENC_HEVC_PROFILE_MAIN
:
cc
->
profileGUID
=
NV_ENC_HEVC_PROFILE_MAIN_GUID
;
avctx
->
profile
=
FF_PROFILE_HEVC_MAIN
;
avctx
->
profile
=
FF_PROFILE_HEVC_MAIN
;
break
;
case
NV_ENC_HEVC_PROFILE_MAIN_10
:
cc
->
profileGUID
=
NV_ENC_HEVC_PROFILE_MAIN10_GUID
;
avctx
->
profile
=
FF_PROFILE_HEVC_MAIN_10
;
avctx
->
profile
=
FF_PROFILE_HEVC_MAIN_10
;
break
;
case
NV_ENC_HEVC_PROFILE_REXT
:
cc
->
profileGUID
=
NV_ENC_HEVC_PROFILE_FREXT_GUID
;
avctx
->
profile
=
FF_PROFILE_HEVC_REXT
;
avctx
->
profile
=
FF_PROFILE_HEVC_REXT
;
break
;
}
...
...
@@ -1299,7 +1299,7 @@ static NvencSurface *get_free_frame(NvencContext *ctx)
{
int
i
;
for
(
i
=
0
;
i
<
ctx
->
nb_surfaces
;
++
i
)
{
for
(
i
=
0
;
i
<
ctx
->
nb_surfaces
;
i
++
)
{
if
(
!
ctx
->
surfaces
[
i
].
lockCount
)
{
ctx
->
surfaces
[
i
].
lockCount
=
1
;
return
&
ctx
->
surfaces
[
i
];
...
...
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