summaryrefslogtreecommitdiff
path: root/libavcodec/avcodec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/avcodec.h')
-rw-r--r--libavcodec/avcodec.h26
1 files changed, 20 insertions, 6 deletions
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ad3eb546a1..90b20f425d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -453,7 +453,13 @@ typedef struct AVPanScan{
* - decoding: set by lavc\
*/\
AVPanScan *pan_scan;\
-
+ \
+ /**\
+ * tell user application that palette has changed from previous frame.\
+ * - encoding: ??? (no palette-enabled encoder yet)\
+ * - decoding: set by lavc (default 0)\
+ */\
+ int palette_has_changed;\
#define FF_QSCALE_TYPE_MPEG1 0
#define FF_QSCALE_TYPE_MPEG2 1
@@ -1345,6 +1351,13 @@ typedef struct AVCodecContext {
* - decoding: unused
*/
int lmax;
+
+ /**
+ * Palette control structure
+ * - encoding: ??? (no palette-enabled encoder yet)
+ * - decoding: set by user.
+ */
+ struct AVPaletteControl *palctrl;
} AVCodecContext;
@@ -1426,17 +1439,18 @@ typedef struct AVPicture {
* This structure defines a method for communicating palette changes
* between and demuxer and a decoder.
*/
+#define AVPALETTE_SIZE 256
typedef struct AVPaletteControl {
/* demuxer sets this to 1 to indicate the palette has changed;
* decoder resets to 0 */
int palette_changed;
- /* 256 3-byte RGB palette entries; the components should be
- * formatted in the buffer as "RGBRGB..." and should be scaled to
- * 8 bits if they originally represented 6-bit VGA palette
- * components */
- unsigned char palette[256 * 3];
+ /* 4-byte ARGB palette entries, stored in native byte order; note that
+ * the individual palette components should be on a 8-bit scale; if
+ * the palette data comes from a IBM VGA native format, the component
+ * data is probably 6 bits in size and needs to be scaled */
+ unsigned int palette[AVPALETTE_SIZE];
} AVPaletteControl;