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
3407d811
Commit
3407d811
authored
Jul 18, 2017
by
Yogender Gupta
Committed by
Philip Langdale
Aug 03, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hwcontext_cuda : Support YUV444P16 format
Signed-off-by:
Philip Langdale
<
philipl@overt.org
>
parent
2e867937
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
hwcontext_cuda.c
libavutil/hwcontext_cuda.c
+7
-1
version.h
libavutil/version.h
+1
-1
No files found.
libavutil/hwcontext_cuda.c
View file @
3407d811
...
...
@@ -37,6 +37,7 @@ static const enum AVPixelFormat supported_formats[] = {
AV_PIX_FMT_YUV444P
,
AV_PIX_FMT_P010
,
AV_PIX_FMT_P016
,
AV_PIX_FMT_YUV444P16
,
};
static
int
cuda_frames_get_constraints
(
AVHWDeviceContext
*
ctx
,
...
...
@@ -142,6 +143,9 @@ static int cuda_frames_init(AVHWFramesContext *ctx)
case
AV_PIX_FMT_P016
:
size
=
aligned_width
*
ctx
->
height
*
3
;
break
;
case
AV_PIX_FMT_YUV444P16
:
size
=
aligned_width
*
ctx
->
height
*
6
;
break
;
default:
av_log
(
ctx
,
AV_LOG_ERROR
,
"BUG: Pixel format missing from size calculation."
);
return
AVERROR_BUG
;
...
...
@@ -161,7 +165,8 @@ static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
int
width_in_bytes
=
ctx
->
width
;
if
(
ctx
->
sw_format
==
AV_PIX_FMT_P010
||
ctx
->
sw_format
==
AV_PIX_FMT_P016
)
{
ctx
->
sw_format
==
AV_PIX_FMT_P016
||
ctx
->
sw_format
==
AV_PIX_FMT_YUV444P16
)
{
width_in_bytes
*=
2
;
}
aligned_width
=
FFALIGN
(
width_in_bytes
,
CUDA_FRAME_ALIGNMENT
);
...
...
@@ -188,6 +193,7 @@ static int cuda_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
frame
->
linesize
[
2
]
=
aligned_width
/
2
;
break
;
case
AV_PIX_FMT_YUV444P
:
case
AV_PIX_FMT_YUV444P16
:
frame
->
data
[
0
]
=
frame
->
buf
[
0
]
->
data
;
frame
->
data
[
1
]
=
frame
->
data
[
0
]
+
aligned_width
*
ctx
->
height
;
frame
->
data
[
2
]
=
frame
->
data
[
1
]
+
aligned_width
*
ctx
->
height
;
...
...
libavutil/version.h
View file @
3407d811
...
...
@@ -81,7 +81,7 @@
#define LIBAVUTIL_VERSION_MAJOR 55
#define LIBAVUTIL_VERSION_MINOR 69
#define LIBAVUTIL_VERSION_MICRO 10
0
#define LIBAVUTIL_VERSION_MICRO 10
1
#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