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
ab75ad01
Commit
ab75ad01
authored
Apr 19, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make targa-in-mov QuickTime-compatible for more colour-spaces.
See ticket #1228.
parent
a4a88fd4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
targaenc.c
libavcodec/targaenc.c
+3
-0
No files found.
libavcodec/targaenc.c
View file @
ab75ad01
...
@@ -96,13 +96,16 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -96,13 +96,16 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
/* image descriptor byte: origin is always top-left, bits 0-3 specify alpha */
/* image descriptor byte: origin is always top-left, bits 0-3 specify alpha */
pkt
->
data
[
17
]
=
0x20
|
(
avctx
->
pix_fmt
==
PIX_FMT_BGRA
?
8
:
0
);
pkt
->
data
[
17
]
=
0x20
|
(
avctx
->
pix_fmt
==
PIX_FMT_BGRA
?
8
:
0
);
avctx
->
bits_per_coded_sample
=
av_get_bits_per_pixel
(
&
av_pix_fmt_descriptors
[
avctx
->
pix_fmt
]);
switch
(
avctx
->
pix_fmt
)
{
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_GRAY8
:
case
PIX_FMT_GRAY8
:
pkt
->
data
[
2
]
=
TGA_BW
;
/* uncompressed grayscale image */
pkt
->
data
[
2
]
=
TGA_BW
;
/* uncompressed grayscale image */
avctx
->
bits_per_coded_sample
=
0x28
;
pkt
->
data
[
16
]
=
8
;
/* bpp */
pkt
->
data
[
16
]
=
8
;
/* bpp */
break
;
break
;
case
PIX_FMT_RGB555LE
:
case
PIX_FMT_RGB555LE
:
pkt
->
data
[
2
]
=
TGA_RGB
;
/* uncompresses true-color image */
pkt
->
data
[
2
]
=
TGA_RGB
;
/* uncompresses true-color image */
avctx
->
bits_per_coded_sample
=
pkt
->
data
[
16
]
=
16
;
/* bpp */
pkt
->
data
[
16
]
=
16
;
/* bpp */
break
;
break
;
case
PIX_FMT_BGR24
:
case
PIX_FMT_BGR24
:
...
...
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