Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
b2eef2f0
Commit
b2eef2f0
authored
20 years ago
by
Roberto Togni
Browse files
Options
Downloads
Patches
Plain Diff
Add 32bit RGB support
Originally committed as revision 3912 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e993bc03
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/tscc.c
+13
-2
13 additions, 2 deletions
libavcodec/tscc.c
with
13 additions
and
2 deletions
libavcodec/tscc.c
+
13
−
2
View file @
b2eef2f0
...
@@ -116,7 +116,7 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
...
@@ -116,7 +116,7 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
}
}
pos
+=
p2
;
pos
+=
p2
;
}
else
{
//Run of pixels
}
else
{
//Run of pixels
int
pix
[
3
];
//original pixel
int
pix
[
4
];
//original pixel
switch
(
c
->
bpp
){
switch
(
c
->
bpp
){
case
8
:
pix
[
0
]
=
*
src
++
;
case
8
:
pix
[
0
]
=
*
src
++
;
break
;
break
;
...
@@ -127,6 +127,11 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
...
@@ -127,6 +127,11 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
pix
[
1
]
=
*
src
++
;
pix
[
1
]
=
*
src
++
;
pix
[
2
]
=
*
src
++
;
pix
[
2
]
=
*
src
++
;
break
;
break
;
case
32
:
pix
[
0
]
=
*
src
++
;
pix
[
1
]
=
*
src
++
;
pix
[
2
]
=
*
src
++
;
pix
[
3
]
=
*
src
++
;
break
;
}
}
if
(
output
+
p1
*
(
c
->
bpp
/
8
)
>
output_end
)
if
(
output
+
p1
*
(
c
->
bpp
/
8
)
>
output_end
)
continue
;
continue
;
...
@@ -141,6 +146,11 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
...
@@ -141,6 +146,11 @@ static int decode_rle(CamtasiaContext *c, unsigned int srcsize)
*
output
++
=
pix
[
1
];
*
output
++
=
pix
[
1
];
*
output
++
=
pix
[
2
];
*
output
++
=
pix
[
2
];
break
;
break
;
case
32
:
*
output
++
=
pix
[
0
];
*
output
++
=
pix
[
1
];
*
output
++
=
pix
[
2
];
*
output
++
=
pix
[
3
];
break
;
}
}
}
}
pos
+=
p1
;
pos
+=
p1
;
...
@@ -252,9 +262,10 @@ static int decode_init(AVCodecContext *avctx)
...
@@ -252,9 +262,10 @@ static int decode_init(AVCodecContext *avctx)
switch
(
avctx
->
bits_per_sample
){
switch
(
avctx
->
bits_per_sample
){
case
8
:
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
break
;
case
8
:
avctx
->
pix_fmt
=
PIX_FMT_PAL8
;
break
;
case
16
:
avctx
->
pix_fmt
=
PIX_FMT_RGB555
;
break
;
case
16
:
avctx
->
pix_fmt
=
PIX_FMT_RGB555
;
break
;
case
24
:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Camtasia warning: RGB24 is just guessed
\n
"
);
case
24
:
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
avctx
->
pix_fmt
=
PIX_FMT_BGR24
;
break
;
break
;
case
32
:
avctx
->
pix_fmt
=
PIX_FMT_RGBA32
;
break
;
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Camtasia error: unknown depth %i bpp
\n
"
,
avctx
->
bits_per_sample
);
default:
av_log
(
avctx
,
AV_LOG_ERROR
,
"Camtasia error: unknown depth %i bpp
\n
"
,
avctx
->
bits_per_sample
);
return
-
1
;
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment