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
db3f8687
Commit
db3f8687
authored
Apr 22, 2015
by
James Zern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libvpxdec: cosmetics: reindent
Signed-off-by:
James Zern
<
jzern@google.com
>
parent
e07ef1ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
41 deletions
+42
-41
libvpxdec.c
libavcodec/libvpxdec.c
+42
-41
No files found.
libavcodec/libvpxdec.c
View file @
db3f8687
...
...
@@ -60,55 +60,56 @@ static av_cold int vpx_init(AVCodecContext *avctx,
}
// returns 0 on success, AVERROR_INVALIDDATA otherwise
static
int
set_pix_fmt
(
AVCodecContext
*
avctx
,
struct
vpx_image
*
img
)
{
static
int
set_pix_fmt
(
AVCodecContext
*
avctx
,
struct
vpx_image
*
img
)
{
if
(
avctx
->
codec_id
==
AV_CODEC_ID_VP8
&&
img
->
fmt
!=
VPX_IMG_FMT_I420
)
return
AVERROR_INVALIDDATA
;
switch
(
img
->
fmt
)
{
case
VPX_IMG_FMT_I420
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
return
0
;
case
VPX_IMG_FMT_I420
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P
;
return
0
;
#if CONFIG_LIBVPX_VP9_DECODER
case
VPX_IMG_FMT_I422
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P
;
case
VPX_IMG_FMT_I422
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P
;
return
0
;
case
VPX_IMG_FMT_I444
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P
;
return
0
;
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
case
VPX_IMG_FMT_I42016
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P10LE
;
return
0
;
case
VPX_IMG_FMT_I444
:
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV4
44P
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV4
20P12LE
;
return
0
;
#ifdef VPX_IMG_FMT_HIGHBITDEPTH
case
VPX_IMG_FMT_I42016
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P10LE
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV420P12LE
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
}
case
VPX_IMG_FMT_I42216
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10LE
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P12LE
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
}
case
VPX_IMG_FMT_I44416
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P10LE
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P12LE
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
}
}
else
{
return
AVERROR_INVALIDDATA
;
}
case
VPX_IMG_FMT_I42216
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P10LE
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV422P12LE
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
}
case
VPX_IMG_FMT_I44416
:
if
(
img
->
bit_depth
==
10
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P10LE
;
return
0
;
}
else
if
(
img
->
bit_depth
==
12
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_YUV444P12LE
;
return
0
;
}
else
{
return
AVERROR_INVALIDDATA
;
}
#endif
#endif
default:
return
AVERROR_INVALIDDATA
;
default:
return
AVERROR_INVALIDDATA
;
}
}
...
...
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