Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
11777eb8
Commit
11777eb8
authored
Sep 19, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/rscc: Support pal8 in rscc.
Fixes the colours of the sample for ticket #5611.
parent
2c48014a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
rscc.c
libavcodec/rscc.c
+13
-2
version.h
libavcodec/version.h
+1
-1
No files found.
libavcodec/rscc.c
View file @
11777eb8
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
* and it can be deflated or not. Similarly, pixel data comes after the header
* and it can be deflated or not. Similarly, pixel data comes after the header
* and a variable size value, and it can be deflated or just raw.
* and a variable size value, and it can be deflated or just raw.
*
*
* Supports:
GRAY8, BGRA, BGR24, RGB555, RGB
8
* Supports:
BGRA, BGR24, RGB555, PAL
8
*/
*/
#include <stdint.h>
#include <stdint.h>
...
@@ -58,6 +58,7 @@ typedef struct RsccContext {
...
@@ -58,6 +58,7 @@ typedef struct RsccContext {
Tile
*
tiles
;
Tile
*
tiles
;
unsigned
int
tiles_size
;
unsigned
int
tiles_size
;
int
component_size
;
int
component_size
;
uint32_t
pal
[
AVPALETTE_COUNT
];
/* zlib interaction */
/* zlib interaction */
uint8_t
*
inflated_buf
;
uint8_t
*
inflated_buf
;
...
@@ -89,7 +90,7 @@ static av_cold int rscc_init(AVCodecContext *avctx)
...
@@ -89,7 +90,7 @@ static av_cold int rscc_init(AVCodecContext *avctx)
ctx
->
component_size
=
avctx
->
bits_per_coded_sample
/
8
;
ctx
->
component_size
=
avctx
->
bits_per_coded_sample
/
8
;
switch
(
avctx
->
bits_per_coded_sample
)
{
switch
(
avctx
->
bits_per_coded_sample
)
{
case
8
:
case
8
:
avctx
->
pix_fmt
=
AV_PIX_FMT_
GRAY
8
;
avctx
->
pix_fmt
=
AV_PIX_FMT_
PAL
8
;
break
;
break
;
case
16
:
case
16
:
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555LE
;
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555LE
;
...
@@ -308,6 +309,16 @@ static int rscc_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -308,6 +309,16 @@ static int rscc_decode_frame(AVCodecContext *avctx, void *data,
}
else
{
}
else
{
frame
->
pict_type
=
AV_PICTURE_TYPE_P
;
frame
->
pict_type
=
AV_PICTURE_TYPE_P
;
}
}
if
(
avctx
->
pix_fmt
==
AV_PIX_FMT_PAL8
)
{
const
uint8_t
*
pal
=
av_packet_get_side_data
(
avpkt
,
AV_PKT_DATA_PALETTE
,
NULL
);
if
(
pal
)
{
frame
->
palette_has_changed
=
1
;
memcpy
(
ctx
->
pal
,
pal
,
AVPALETTE_SIZE
);
}
memcpy
(
frame
->
data
[
1
],
ctx
->
pal
,
AVPALETTE_SIZE
);
}
*
got_frame
=
1
;
*
got_frame
=
1
;
end:
end:
...
...
libavcodec/version.h
View file @
11777eb8
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MINOR 57
#define LIBAVCODEC_VERSION_MICRO 10
0
#define LIBAVCODEC_VERSION_MICRO 10
1
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
LIBAVCODEC_VERSION_MINOR, \
...
...
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