#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "common.h"#include "avcodec.h"#include "dsputil.h"

Go to the source code of this file.
Data Structures | |
| struct | QtrleContext |
Defines | |
| #define | CHECK_STREAM_PTR(n) |
| #define | CHECK_PIXEL_PTR(n) |
Functions | |
| static void | qtrle_decode_1bpp (QtrleContext *s) |
| static void | qtrle_decode_2bpp (QtrleContext *s) |
| static void | qtrle_decode_4bpp (QtrleContext *s) |
| static void | qtrle_decode_8bpp (QtrleContext *s) |
| static void | qtrle_decode_16bpp (QtrleContext *s) |
| static void | qtrle_decode_24bpp (QtrleContext *s) |
| static void | qtrle_decode_32bpp (QtrleContext *s) |
| static int | qtrle_decode_init (AVCodecContext *avctx) |
| static int | qtrle_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | qtrle_decode_end (AVCodecContext *avctx) |
Variables | |
| AVCodec | qtrle_decoder |
The QT RLE decoder has seven modes of operation: 1, 2, 4, 8, 16, 24, and 32 bits per pixel. For modes 1, 2, 4, and 8 the decoder outputs PAL8 colorspace data. 16-bit data yields RGB555 data. 24-bit data is RGB24 and 32-bit data is RGBA32.
Definition in file qtrle.c.
| #define CHECK_PIXEL_PTR | ( | n | ) |
Value:
if (pixel_ptr + n > pixel_limit) { \ av_log (s->avctx, AV_LOG_INFO, "Problem: pixel_ptr >= pixel_limit (%d >= %d)\n", \ pixel_ptr + n, pixel_limit); \ return; \ } \
Definition at line 60 of file qtrle.c.
Referenced by qtrle_decode_16bpp(), qtrle_decode_24bpp(), qtrle_decode_32bpp(), qtrle_decode_4bpp(), and qtrle_decode_8bpp().
| #define CHECK_STREAM_PTR | ( | n | ) |
| static void qtrle_decode_16bpp | ( | QtrleContext * | s | ) | [static] |
Definition at line 246 of file qtrle.c.
References QtrleContext::avctx, BE_16, QtrleContext::buf, CHECK_PIXEL_PTR, CHECK_STREAM_PTR, QtrleContext::frame, header, AVCodecContext::height, and QtrleContext::size.
Referenced by qtrle_decode_frame().
| static void qtrle_decode_1bpp | ( | QtrleContext * | s | ) | [static] |
| static void qtrle_decode_24bpp | ( | QtrleContext * | s | ) | [static] |
Definition at line 323 of file qtrle.c.
References QtrleContext::avctx, b, BE_16, QtrleContext::buf, CHECK_PIXEL_PTR, CHECK_STREAM_PTR, QtrleContext::frame, header, AVCodecContext::height, r, and QtrleContext::size.
Referenced by qtrle_decode_frame().
| static void qtrle_decode_2bpp | ( | QtrleContext * | s | ) | [static] |
| static void qtrle_decode_32bpp | ( | QtrleContext * | s | ) | [static] |
Definition at line 401 of file qtrle.c.
References QtrleContext::avctx, b, BE_16, QtrleContext::buf, CHECK_PIXEL_PTR, CHECK_STREAM_PTR, QtrleContext::frame, header, AVCodecContext::height, r, and QtrleContext::size.
Referenced by qtrle_decode_frame().
| static void qtrle_decode_4bpp | ( | QtrleContext * | s | ) | [static] |
Definition at line 75 of file qtrle.c.
References QtrleContext::avctx, BE_16, QtrleContext::buf, CHECK_PIXEL_PTR, CHECK_STREAM_PTR, QtrleContext::frame, header, AVCodecContext::height, and QtrleContext::size.
Referenced by qtrle_decode_frame().
| static void qtrle_decode_8bpp | ( | QtrleContext * | s | ) | [static] |
Definition at line 165 of file qtrle.c.
References QtrleContext::avctx, BE_16, QtrleContext::buf, CHECK_PIXEL_PTR, CHECK_STREAM_PTR, QtrleContext::frame, header, AVCodecContext::height, and QtrleContext::size.
Referenced by qtrle_decode_frame().
| static int qtrle_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 602 of file qtrle.c.
References QtrleContext::frame, AVCodecContext::priv_data, AVCodecContext::release_buffer, and s.
| static int qtrle_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 527 of file qtrle.c.
References av_log(), AV_LOG_ERROR, QtrleContext::avctx, AVPALETTE_SIZE, AVCodecContext::bits_per_sample, QtrleContext::buf, FF_BUFFER_HINTS_PRESERVE, FF_BUFFER_HINTS_READABLE, FF_BUFFER_HINTS_REUSABLE, FF_BUFFER_HINTS_VALID, QtrleContext::frame, memcpy, AVCodecContext::palctrl, AVPaletteControl::palette, AVPaletteControl::palette_changed, AVCodecContext::priv_data, qtrle_decode_16bpp(), qtrle_decode_1bpp(), qtrle_decode_24bpp(), qtrle_decode_2bpp(), qtrle_decode_32bpp(), qtrle_decode_4bpp(), qtrle_decode_8bpp(), AVCodecContext::reget_buffer, s, and QtrleContext::size.

| static int qtrle_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 485 of file qtrle.c.
References av_log(), AV_LOG_ERROR, QtrleContext::avctx, AVCodecContext::bits_per_sample, QtrleContext::dsp, dsputil_init(), QtrleContext::frame, AVCodecContext::has_b_frames, NULL, AVCodecContext::pix_fmt, PIX_FMT_PAL8, PIX_FMT_RGB24, PIX_FMT_RGB555, PIX_FMT_RGBA32, AVCodecContext::priv_data, and s.

Initial value:
{
"qtrle",
CODEC_TYPE_VIDEO,
CODEC_ID_QTRLE,
sizeof(QtrleContext),
qtrle_decode_init,
NULL,
qtrle_decode_end,
qtrle_decode_frame,
CODEC_CAP_DR1,
}
Definition at line 612 of file qtrle.c.
Referenced by avcodec_register_all().
1.5.5