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
a6842670
Commit
a6842670
authored
Aug 31, 2012
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pixdesc: cosmetics
parent
cc86bd4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
12 deletions
+18
-12
pixdesc.c
libavutil/pixdesc.c
+18
-12
No files found.
libavutil/pixdesc.c
View file @
a6842670
...
@@ -26,8 +26,10 @@
...
@@ -26,8 +26,10 @@
#include "intreadwrite.h"
#include "intreadwrite.h"
void
av_read_image_line
(
uint16_t
*
dst
,
const
uint8_t
*
data
[
4
],
const
int
linesize
[
4
],
void
av_read_image_line
(
uint16_t
*
dst
,
const
AVPixFmtDescriptor
*
desc
,
int
x
,
int
y
,
int
c
,
int
w
,
const
uint8_t
*
data
[
4
],
const
int
linesize
[
4
],
const
AVPixFmtDescriptor
*
desc
,
int
x
,
int
y
,
int
c
,
int
w
,
int
read_pal_component
)
int
read_pal_component
)
{
{
AVComponentDescriptor
comp
=
desc
->
comp
[
c
];
AVComponentDescriptor
comp
=
desc
->
comp
[
c
];
...
@@ -53,7 +55,8 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
...
@@ -53,7 +55,8 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
*
dst
++
=
val
;
*
dst
++
=
val
;
}
}
}
else
{
}
else
{
const
uint8_t
*
p
=
data
[
plane
]
+
y
*
linesize
[
plane
]
+
x
*
step
+
comp
.
offset_plus1
-
1
;
const
uint8_t
*
p
=
data
[
plane
]
+
y
*
linesize
[
plane
]
+
x
*
step
+
comp
.
offset_plus1
-
1
;
int
is_8bit
=
shift
+
depth
<=
8
;
int
is_8bit
=
shift
+
depth
<=
8
;
if
(
is_8bit
)
if
(
is_8bit
)
...
@@ -71,8 +74,10 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
...
@@ -71,8 +74,10 @@ void av_read_image_line(uint16_t *dst, const uint8_t *data[4], const int linesiz
}
}
}
}
void
av_write_image_line
(
const
uint16_t
*
src
,
uint8_t
*
data
[
4
],
const
int
linesize
[
4
],
void
av_write_image_line
(
const
uint16_t
*
src
,
const
AVPixFmtDescriptor
*
desc
,
int
x
,
int
y
,
int
c
,
int
w
)
uint8_t
*
data
[
4
],
const
int
linesize
[
4
],
const
AVPixFmtDescriptor
*
desc
,
int
x
,
int
y
,
int
c
,
int
w
)
{
{
AVComponentDescriptor
comp
=
desc
->
comp
[
c
];
AVComponentDescriptor
comp
=
desc
->
comp
[
c
];
int
plane
=
comp
.
plane
;
int
plane
=
comp
.
plane
;
...
@@ -93,7 +98,8 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesi
...
@@ -93,7 +98,8 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesi
}
}
}
else
{
}
else
{
int
shift
=
comp
.
shift
;
int
shift
=
comp
.
shift
;
uint8_t
*
p
=
data
[
plane
]
+
y
*
linesize
[
plane
]
+
x
*
step
+
comp
.
offset_plus1
-
1
;
uint8_t
*
p
=
data
[
plane
]
+
y
*
linesize
[
plane
]
+
x
*
step
+
comp
.
offset_plus1
-
1
;
if
(
shift
+
depth
<=
8
)
{
if
(
shift
+
depth
<=
8
)
{
p
+=
!!
(
flags
&
PIX_FMT_BE
);
p
+=
!!
(
flags
&
PIX_FMT_BE
);
...
@@ -395,9 +401,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
...
@@ -395,9 +401,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
.
log2_chroma_w
=
1
,
.
log2_chroma_w
=
1
,
.
log2_chroma_h
=
1
,
.
log2_chroma_h
=
1
,
.
comp
=
{
.
comp
=
{
{
0
,
0
,
1
,
0
,
7
},
/* Y */
{
0
,
0
,
1
,
0
,
7
},
/* Y */
{
1
,
1
,
1
,
0
,
7
},
/* U */
{
1
,
1
,
1
,
0
,
7
},
/* U */
{
1
,
1
,
2
,
0
,
7
},
/* V */
{
1
,
1
,
2
,
0
,
7
},
/* V */
},
},
.
flags
=
PIX_FMT_PLANAR
,
.
flags
=
PIX_FMT_PLANAR
,
},
},
...
@@ -863,9 +869,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
...
@@ -863,9 +869,9 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = {
.
log2_chroma_w
=
1
,
.
log2_chroma_w
=
1
,
.
log2_chroma_h
=
0
,
.
log2_chroma_h
=
0
,
.
comp
=
{
.
comp
=
{
{
0
,
1
,
1
,
0
,
8
},
/* Y */
{
0
,
1
,
1
,
0
,
8
},
/* Y */
{
1
,
1
,
1
,
0
,
8
},
/* U */
{
1
,
1
,
1
,
0
,
8
},
/* U */
{
2
,
1
,
1
,
0
,
8
},
/* V */
{
2
,
1
,
1
,
0
,
8
},
/* V */
},
},
.
flags
=
PIX_FMT_BE
|
PIX_FMT_PLANAR
,
.
flags
=
PIX_FMT_BE
|
PIX_FMT_PLANAR
,
},
},
...
...
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