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
3d9cdfdc
Commit
3d9cdfdc
authored
Oct 08, 2012
by
Bobby Bingham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
targa: use named constants for flag values
Signed-off-by:
Bobby Bingham
<
uhmmmm@gmail.com
>
parent
d07940b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
targa.c
libavcodec/targa.c
+2
-2
targa.h
libavcodec/targa.h
+5
-0
No files found.
libavcodec/targa.c
View file @
3d9cdfdc
...
...
@@ -166,7 +166,7 @@ static int decode_frame(AVCodecContext *avctx,
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
}
if
(
flags
&
0x20
)
{
if
(
flags
&
TGA_TOPTOBOTTOM
)
{
dst
=
p
->
data
[
0
];
stride
=
p
->
linesize
[
0
];
}
else
{
//image is upside-down
...
...
@@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
}
if
(
flags
&
0x10
)
{
// right-to-left, needs horizontal flip
if
(
flags
&
TGA_RIGHTTOLEFT
)
{
// right-to-left, needs horizontal flip
int
x
;
for
(
y
=
0
;
y
<
h
;
y
++
){
void
*
line
=
&
p
->
data
[
0
][
y
*
p
->
linesize
[
0
]];
...
...
libavcodec/targa.h
View file @
3d9cdfdc
...
...
@@ -38,4 +38,9 @@ enum TargaCompr {
TGA_RLE
=
8
,
// flag pointing that data is RLE-coded
};
enum
TargaFlags
{
TGA_RIGHTTOLEFT
=
0x10
,
// right-to-left (flipped horizontally)
TGA_TOPTOBOTTOM
=
0x20
,
// top-to-bottom (NOT flipped vertically)
};
#endif
/* AVCODEC_TARGA_H */
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