Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
41a18982
Commit
41a18982
authored
May 09, 2018
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/hwcontext_cuda: add support for nvenc rgb formats
parent
93d1756a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
hwcontext_cuda.c
libavutil/hwcontext_cuda.c
+11
-0
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/hwcontext_cuda.c
View file @
41a18982
...
...
@@ -38,6 +38,8 @@ static const enum AVPixelFormat supported_formats[] = {
AV_PIX_FMT_P010
,
AV_PIX_FMT_P016
,
AV_PIX_FMT_YUV444P16
,
AV_PIX_FMT_0RGB32
,
AV_PIX_FMT_0BGR32
,
};
static
int
cuda_frames_get_constraints
(
AVHWDeviceContext
*
ctx
,
...
...
@@ -146,6 +148,10 @@ static int cuda_frames_init(AVHWFramesContext *ctx)
case
AV_PIX_FMT_YUV444P16
:
size
=
aligned_width
*
ctx
->
height
*
6
;
break
;
case
AV_PIX_FMT_0RGB32
:
case
AV_PIX_FMT_0BGR32
:
size
=
aligned_width
*
ctx
->
height
*
4
;
break
;
default:
av_log
(
ctx
,
AV_LOG_ERROR
,
"BUG: Pixel format missing from size calculation."
);
return
AVERROR_BUG
;
...
...
@@ -201,6 +207,11 @@ static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
frame
->
linesize
[
1
]
=
aligned_width
;
frame
->
linesize
[
2
]
=
aligned_width
;
break
;
case
AV_PIX_FMT_0BGR32
:
case
AV_PIX_FMT_0RGB32
:
frame
->
data
[
0
]
=
frame
->
buf
[
0
]
->
data
;
frame
->
linesize
[
0
]
=
aligned_width
*
4
;
break
;
default:
av_frame_unref
(
frame
);
return
AVERROR_BUG
;
...
...
libavutil/version.h
View file @
41a18982
...
...
@@ -80,7 +80,7 @@
#define LIBAVUTIL_VERSION_MAJOR 56
#define LIBAVUTIL_VERSION_MINOR 18
#define LIBAVUTIL_VERSION_MICRO 10
1
#define LIBAVUTIL_VERSION_MICRO 10
2
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
LIBAVUTIL_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