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
fc83c99c
Commit
fc83c99c
authored
Oct 05, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/dpx: cosmetics: fix identation
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
0841652b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
44 deletions
+44
-44
dpx.c
libavcodec/dpx.c
+44
-44
No files found.
libavcodec/dpx.c
View file @
fc83c99c
...
...
@@ -149,53 +149,53 @@ static int decode_frame(AVCodecContext *avctx,
avctx
->
sample_aspect_ratio
=
(
AVRational
){
0
,
1
};
switch
(
descriptor
)
{
case
51
:
// RGBA
elements
=
4
;
break
;
case
50
:
// RGB
elements
=
3
;
break
;
default:
avpriv_report_missing_feature
(
avctx
,
"Descriptor %d"
,
descriptor
);
return
AVERROR_PATCHWELCOME
;
case
51
:
// RGBA
elements
=
4
;
break
;
case
50
:
// RGB
elements
=
3
;
break
;
default:
avpriv_report_missing_feature
(
avctx
,
"Descriptor %d"
,
descriptor
);
return
AVERROR_PATCHWELCOME
;
}
switch
(
bits_per_color
)
{
case
8
:
if
(
elements
==
4
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
}
else
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
}
total_size
=
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
case
10
:
if
(
!
packing
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packing to 32bit required
\n
"
);
return
-
1
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP10
;
total_size
=
(
avctx
->
width
*
elements
+
2
)
/
3
*
4
*
avctx
->
height
;
break
;
case
12
:
if
(
!
packing
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packing to 16bit required
\n
"
);
return
-
1
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP12
;
total_size
=
2
*
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
case
16
:
if
(
endian
)
{
avctx
->
pix_fmt
=
elements
==
4
?
AV_PIX_FMT_RGBA64BE
:
AV_PIX_FMT_RGB48BE
;
}
else
{
avctx
->
pix_fmt
=
elements
==
4
?
AV_PIX_FMT_RGBA64LE
:
AV_PIX_FMT_RGB48LE
;
}
total_size
=
2
*
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported color depth : %d
\n
"
,
bits_per_color
);
return
AVERROR_INVALIDDATA
;
case
8
:
if
(
elements
==
4
)
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGBA
;
}
else
{
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB24
;
}
total_size
=
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
case
10
:
if
(
!
packing
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packing to 32bit required
\n
"
);
return
-
1
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP10
;
total_size
=
(
avctx
->
width
*
elements
+
2
)
/
3
*
4
*
avctx
->
height
;
break
;
case
12
:
if
(
!
packing
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Packing to 16bit required
\n
"
);
return
-
1
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_GBRP12
;
total_size
=
2
*
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
case
16
:
if
(
endian
)
{
avctx
->
pix_fmt
=
elements
==
4
?
AV_PIX_FMT_RGBA64BE
:
AV_PIX_FMT_RGB48BE
;
}
else
{
avctx
->
pix_fmt
=
elements
==
4
?
AV_PIX_FMT_RGBA64LE
:
AV_PIX_FMT_RGB48LE
;
}
total_size
=
2
*
avctx
->
width
*
avctx
->
height
*
elements
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Unsupported color depth : %d
\n
"
,
bits_per_color
);
return
AVERROR_INVALIDDATA
;
}
if
((
ret
=
ff_get_buffer
(
avctx
,
p
,
0
))
<
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