Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
12733c0c
Commit
12733c0c
authored
Nov 01, 2022
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: remove unused slice offset querying
parent
2537fdc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
26 deletions
+0
-26
nvenc.c
libavcodec/nvenc.c
+0
-26
No files found.
libavcodec/nvenc.c
View file @
12733c0c
...
...
@@ -2060,38 +2060,16 @@ static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, NvencSur
NvencDynLoadFunctions
*
dl_fn
=
&
ctx
->
nvenc_dload_funcs
;
NV_ENCODE_API_FUNCTION_LIST
*
p_nvenc
=
&
dl_fn
->
nvenc_funcs
;
uint32_t
slice_mode_data
;
uint32_t
*
slice_offsets
=
NULL
;
NV_ENC_LOCK_BITSTREAM
lock_params
=
{
0
};
NVENCSTATUS
nv_status
;
int
res
=
0
;
enum
AVPictureType
pict_type
;
switch
(
avctx
->
codec
->
id
)
{
case
AV_CODEC_ID_H264
:
slice_mode_data
=
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
sliceModeData
;
break
;
case
AV_CODEC_ID_H265
:
slice_mode_data
=
ctx
->
encode_config
.
encodeCodecConfig
.
hevcConfig
.
sliceModeData
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unknown codec name
\n
"
);
res
=
AVERROR
(
EINVAL
);
goto
error
;
}
slice_offsets
=
av_mallocz
(
slice_mode_data
*
sizeof
(
*
slice_offsets
));
if
(
!
slice_offsets
)
{
res
=
AVERROR
(
ENOMEM
);
goto
error
;
}
lock_params
.
version
=
NV_ENC_LOCK_BITSTREAM_VER
;
lock_params
.
doNotWait
=
0
;
lock_params
.
outputBitstream
=
tmpoutsurf
->
output_surface
;
lock_params
.
sliceOffsets
=
slice_offsets
;
nv_status
=
p_nvenc
->
nvEncLockBitstream
(
ctx
->
nvencoder
,
&
lock_params
);
if
(
nv_status
!=
NV_ENC_SUCCESS
)
{
...
...
@@ -2162,16 +2140,12 @@ static int process_output_surface(AVCodecContext *avctx, AVPacket *pkt, NvencSur
if
(
res
<
0
)
goto
error2
;
av_free
(
slice_offsets
);
return
0
;
error:
timestamp_queue_dequeue
(
ctx
->
timestamp_list
);
error2:
av_free
(
slice_offsets
);
return
res
;
}
...
...
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