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
48f7c30b
Commit
48f7c30b
authored
Mar 24, 2015
by
Timo Rothenpieler
Committed by
Michael Niedermayer
Mar 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvenc: Drop support for old nvenc api
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c20eab5c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
17 deletions
+4
-17
Changelog
Changelog
+1
-0
configure
configure
+2
-0
nvenc.c
libavcodec/nvenc.c
+0
-16
version.h
libavcodec/version.h
+1
-1
No files found.
Changelog
View file @
48f7c30b
...
...
@@ -7,6 +7,7 @@ version <next>:
- DTS lossless extension (XLL) decoding (not lossless, disabled by default)
- showwavespic filter
- libdcadec wrapper
- Drop support for nvenc API before 5.0
version 2.6:
...
...
configure
View file @
48f7c30b
...
...
@@ -4998,6 +4998,8 @@ enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzmq
&&
require_pkg_config libzmq zmq.h zmq_ctx_new
enabled libzvbi
&&
require libzvbi libzvbi.h vbi_decoder_new
-lzvbi
enabled nvenc
&&
{
check_header nvEncodeAPI.h
||
die
"ERROR: nvEncodeAPI.h not found."
;
}
&&
{
check_cpp_condition nvEncodeAPI.h
"NVENCAPI_MAJOR_VERSION >= 5"
||
die
"ERROR: NVENC API version 4 or older is not supported"
;
}
&&
{
[
$target_os
!=
cygwin
]
||
die
"ERROR: NVENC is not supported on Cygwin currently."
;
}
enabled openal
&&
{
{
for
al_libs
in
"
${
OPENAL_LIBS
}
"
"-lopenal"
"-lOpenAL32"
;
do
check_lib
'AL/al.h'
alGetError
"
${
al_libs
}
"
&&
break
;
done
}
||
...
...
libavcodec/nvenc.c
View file @
48f7c30b
...
...
@@ -67,10 +67,6 @@ typedef CUresult(CUDAAPI *PCUCTXDESTROY)(CUcontext ctx);
typedef
NVENCSTATUS
(
NVENCAPI
*
PNVENCODEAPICREATEINSTANCE
)(
NV_ENCODE_API_FUNCTION_LIST
*
functionList
);
#if NVENCAPI_MAJOR_VERSION < 5
static
const
GUID
dummy_license
=
{
0x0
,
0x0
,
0x0
,
{
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
,
0x0
}
};
#endif
typedef
struct
NvencInputSurface
{
NV_ENC_INPUT_PTR
input_surface
;
...
...
@@ -474,10 +470,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
int
res
=
0
;
int
dw
,
dh
;
#if NVENCAPI_MAJOR_VERSION < 5
GUID
license
=
dummy_license
;
#endif
NvencContext
*
ctx
=
avctx
->
priv_data
;
NvencDynLoadFunctions
*
dl_fn
=
&
ctx
->
nvenc_dload_funcs
;
NV_ENCODE_API_FUNCTION_LIST
*
p_nvenc
=
&
dl_fn
->
nvenc_funcs
;
...
...
@@ -500,10 +492,6 @@ static av_cold int nvenc_encode_init(AVCodecContext *avctx)
encode_session_params
.
version
=
NV_ENC_OPEN_ENCODE_SESSION_EX_PARAMS_VER
;
encode_session_params
.
apiVersion
=
NVENCAPI_VERSION
;
#if NVENCAPI_MAJOR_VERSION < 5
encode_session_params
.
clientKeyPtr
=
&
license
;
#endif
if
(
ctx
->
gpu
>=
dl_fn
->
nvenc_device_count
)
{
av_log
(
avctx
,
AV_LOG_FATAL
,
"Requested GPU %d, but only %d GPUs are available!
\n
"
,
ctx
->
gpu
,
dl_fn
->
nvenc_device_count
);
res
=
AVERROR
(
EINVAL
);
...
...
@@ -1108,10 +1096,6 @@ static int nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pic_params
.
codecPicParams
.
h264PicParams
.
sliceMode
=
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
sliceMode
;
pic_params
.
codecPicParams
.
h264PicParams
.
sliceModeData
=
ctx
->
encode_config
.
encodeCodecConfig
.
h264Config
.
sliceModeData
;
#if NVENCAPI_MAJOR_VERSION < 5
memcpy
(
&
pic_params
.
rcParams
,
&
ctx
->
encode_config
.
rcParams
,
sizeof
(
NV_ENC_RC_PARAMS
));
#endif
res
=
timestamp_queue_enqueue
(
&
ctx
->
timestamp_list
,
frame
->
pts
);
if
(
res
)
...
...
libavcodec/version.h
View file @
48f7c30b
...
...
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 56
#define LIBAVCODEC_VERSION_MINOR 29
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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