Go to the documentation of this file.
   27 #include "config_components.h" 
   64                        uint8_t *dst_start, 
int width, 
int height, 
int linesize)
 
   70     for (y = 0; y < 
height; y += 4) {
 
   71         for (x = 0; x < 
width; x += 4) {
 
   75             mask = bytestream2_get_be16u(gb);
 
   76             v[0] = bytestream2_get_be16u(gb);
 
   77             v[1] = bytestream2_get_be16u(gb);
 
   78             if ((v[0] & 0x8000)) {
 
   83                 for (
i = 2; 
i < 8; 
i++)
 
   84                     v[
i] = bytestream2_get_be16u(gb);
 
   86                 v[2] = v[4] = v[6] = v[0];
 
   87                 v[3] = v[5] = v[7] = v[1];
 
   90 #define PIX16(target, true, false)                                            \ 
   91     i = (mask & target) ? true : false;                                       \ 
   92     AV_WN16A(dst, v[i] & 0x7FFF);                                             \ 
   95 #define ROW16(row, a1, a0, b1, b0)                                            \ 
   96     dst = dst_start + (y + row) * linesize + x * 2;                           \ 
   97     PIX16(1 << (row * 4), a1, a0)                                             \ 
   98     PIX16(1 << (row * 4 + 1), a1, a0)                                         \ 
   99     PIX16(1 << (row * 4 + 2), b1, b0)                                         \ 
  100     PIX16(1 << (row * 4 + 3), b1, b0) 
  102             ROW16(0, 0, 1, 2, 3);
 
  103             ROW16(1, 0, 1, 2, 3);
 
  104             ROW16(2, 4, 5, 6, 7);
 
  105             ROW16(3, 4, 5, 6, 7);
 
  114     for (j = 0; j < 4; j++)
 
  115         for (
i = 0; 
i < 4; 
i++)
 
  119 #define PIX32(target, true, false)                                            \ 
  120     AV_WN32A(dst, (mask & target) ? v[true] : v[false]);                      \ 
  123 #define ROW32(row, a1, a0, b1, b0)                                            \ 
  124     dst = dst_start + (y + row) * linesize + x * 4;                           \ 
  125     PIX32(1 << (row * 4), a1, a0)                                             \ 
  126     PIX32(1 << (row * 4 + 1), a1, a0)                                         \ 
  127     PIX32(1 << (row * 4 + 2), b1, b0)                                         \ 
  128     PIX32(1 << (row * 4 + 3), b1, b0) 
  131     ROW32(0, 1, 0, 3, 2);                                                     \ 
  132     ROW32(1, 1, 0, 3, 2);                                                     \ 
  133     ROW32(2, 5, 4, 7, 6);                                                     \ 
  134     ROW32(3, 5, 4, 7, 6); 
  138                        int linesize, 
int vflip)
 
  141     uint32_t 
color[128], v[8];
 
  142     int w, 
h, nb_colors, 
i, x, y, p0, p1, 
mask;
 
  147     w = bytestream2_get_be16u(gb);
 
  148     h = bytestream2_get_be16u(gb);
 
  152     if (bytestream2_get_byteu(gb)) {
 
  157     nb_colors = bytestream2_get_byteu(gb);
 
  160     for (
i = 0; 
i < 
FFMIN(nb_colors, 128); 
i++)
 
  161         color[
i] = 0xFF000000 | bytestream2_get_be24u(gb);
 
  166         dst_start += (
height - 1) * linesize;
 
  167         linesize   = -linesize;
 
  171         p0 = bytestream2_get_byteu(gb);
 
  175                 p0  = (p0 << 2) | (p0 >> 4);
 
  177                               0xFF000000 | (p0 << 16) | (p0 << 8) | p0);
 
  181                 p0  = (p0 << 2) | (p0 >> 4);
 
  184                 g = bytestream2_get_byteu(gb);
 
  185                 r = bytestream2_get_byteu(gb);
 
  187                               0xFF000000 | (
r << 16) | (
g << 8) | p0);
 
  192             p1 = bytestream2_get_byteu(gb);
 
  194                 if ((p0 & 0x7F) == (p1 & 0x7F)) {
 
  200                     v[0] = v[2] = v[4] = v[6] = 
color[p0 & 0x7F];
 
  201                     v[1] = v[3] = v[5] = v[7] = 
color[p1 & 0x7F];
 
  202                     mask = bytestream2_get_le16u(gb);
 
  208                 v[0] = 
color[p0 & 0x7F];
 
  209                 v[1] = 
color[p1 & 0x7F];
 
  210                 for (
i = 2; 
i < 8; 
i++)
 
  211                     v[
i] = 
color[bytestream2_get_byteu(gb) & 0x7F];
 
  212                 mask = bytestream2_get_le16u(gb);
 
  254 #if CONFIG_MVC1_DECODER 
  267 #if CONFIG_MVC2_DECODER 
  
#define AV_LOG_WARNING
Something somehow does not look correct.
 
static av_cold int mvc_decode_init(AVCodecContext *avctx)
 
This structure describes decoded (raw) audio or video data.
 
int ff_set_dimensions(AVCodecContext *s, int width, int height)
Check that the provided frame dimensions are valid and set them on the codec context.
 
static int decode_mvc2(AVCodecContext *avctx, GetByteContext *gb, uint8_t *dst_start, int width, int height, int linesize, int vflip)
 
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
 
AVCodec p
The public AVCodec.
 
#define FF_CODEC_DECODE_CB(func)
 
static int decode_mvc1(AVCodecContext *avctx, GetByteContext *gb, uint8_t *dst_start, int width, int height, int linesize)
 
static int mvc_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static void set_4x4_block(uint8_t *dst, int linesize, uint32_t pixel)
 
#define CODEC_LONG_NAME(str)
 
#define ROW16(row, a1, a0, b1, b0)
 
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
 
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
 
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
 
int(* init)(AVBSFContext *ctx)
 
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
 
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
 
const FFCodec ff_mvc1_decoder
 
const FFCodec ff_mvc2_decoder
 
#define i(width, name, range_min, range_max)
 
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
 
#define AV_PIX_FMT_RGB555
 
const char * name
Name of the codec implementation.
 
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
 
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a frame
 
main external API structure.
 
#define avpriv_request_sample(...)
 
This structure stores compressed data.
 
int width
picture width / height.
 
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
 
#define AVERROR_INVALIDDATA
Invalid data found when processing input.