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
3f6294a5
Commit
3f6294a5
authored
Nov 11, 2017
by
Timo Rothenpieler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/nvdec: add support for 12 bit formats
parent
c60bc02b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
nvdec.c
libavcodec/nvdec.c
+14
-2
No files found.
libavcodec/nvdec.c
View file @
3f6294a5
...
...
@@ -489,9 +489,21 @@ int ff_nvdec_frame_params(AVCodecContext *avctx,
frames_ctx
->
format
=
AV_PIX_FMT_CUDA
;
frames_ctx
->
width
=
avctx
->
coded_width
;
frames_ctx
->
height
=
avctx
->
coded_height
;
frames_ctx
->
sw_format
=
sw_desc
->
comp
[
0
].
depth
>
8
?
AV_PIX_FMT_P010
:
AV_PIX_FMT_NV12
;
frames_ctx
->
initial_pool_size
=
dpb_size
;
switch
(
sw_desc
->
comp
[
0
].
depth
)
{
case
8
:
frames_ctx
->
sw_format
=
AV_PIX_FMT_NV12
;
break
;
case
10
:
frames_ctx
->
sw_format
=
AV_PIX_FMT_P010
;
break
;
case
12
:
frames_ctx
->
sw_format
=
AV_PIX_FMT_P016
;
break
;
default:
return
AVERROR
(
EINVAL
);
}
return
0
;
}
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