#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 | roq_cell |
| struct | roq_qcell |
| struct | RoqContext |
Defines | |
| #define | avg2(a, b) uiclp[(((int)(a)+(int)(b)+1)>>1)] |
| #define | avg4(a, b, c, d) uiclp[(((int)(a)+(int)(b)+(int)(c)+(int)(d)+2)>>2)] |
| #define | RoQ_INFO 0x1001 |
| #define | RoQ_QUAD_CODEBOOK 0x1002 |
| #define | RoQ_QUAD_VQ 0x1011 |
| #define | RoQ_SOUND_MONO 0x1020 |
| #define | RoQ_SOUND_STEREO 0x1021 |
| #define | RoQ_ID_MOT 0x00 |
| #define | RoQ_ID_FCC 0x01 |
| #define | RoQ_ID_SLD 0x02 |
| #define | RoQ_ID_CCC 0x03 |
| #define | get_byte(in_buffer) *(in_buffer++) |
| #define | get_word(in_buffer) |
| #define | get_long(in_buffer) |
Functions | |
| static void | apply_vector_2x2 (RoqContext *ri, int x, int y, roq_cell *cell) |
| static void | apply_vector_4x4 (RoqContext *ri, int x, int y, roq_cell *cell) |
| static void | apply_motion_4x4 (RoqContext *ri, int x, int y, unsigned char mv, signed char mean_x, signed char mean_y) |
| static void | apply_motion_8x8 (RoqContext *ri, int x, int y, unsigned char mv, signed char mean_x, signed char mean_y) |
| static void | roqvideo_decode_frame (RoqContext *ri) |
| static int | roq_decode_init (AVCodecContext *avctx) |
| static int | roq_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | roq_decode_end (AVCodecContext *avctx) |
Variables | |
| static int | uiclip [1024] |
| static int * | uiclp |
| AVCodec | roq_decoder |
Definition in file roqvideo.c.
Definition at line 46 of file roqvideo.c.
| #define get_byte | ( | in_buffer | ) | *(in_buffer++) |
| #define get_long | ( | in_buffer | ) |
Value:
((unsigned long)(in_buffer += 4, \
(in_buffer[-1] << 24 | in_buffer[-2] << 16 | in_buffer[-3] << 8 | in_buffer[-4])))
Definition at line 80 of file roqvideo.c.
Referenced by roqvideo_decode_frame().
| #define get_word | ( | in_buffer | ) |
Value:
((unsigned short)(in_buffer += 2, \
(in_buffer[-1] << 8 | in_buffer[-2])))
Definition at line 78 of file roqvideo.c.
Referenced by http_parse_request(), roqvideo_decode_frame(), and rtsp_parse_request().
| #define RoQ_ID_CCC 0x03 |
| #define RoQ_ID_FCC 0x01 |
| #define RoQ_ID_MOT 0x00 |
| #define RoQ_ID_SLD 0x02 |
| #define RoQ_INFO 0x1001 |
Definition at line 66 of file roqvideo.c.
| #define RoQ_QUAD_CODEBOOK 0x1002 |
| #define RoQ_QUAD_VQ 0x1011 |
| #define RoQ_SOUND_MONO 0x1020 |
Definition at line 69 of file roqvideo.c.
| #define RoQ_SOUND_STEREO 0x1021 |
Definition at line 70 of file roqvideo.c.
| static void apply_motion_4x4 | ( | RoqContext * | ri, | |
| int | x, | |||
| int | y, | |||
| unsigned char | mv, | |||
| signed char | mean_x, | |||
| signed char | mean_y | |||
| ) | [static] |
Definition at line 137 of file roqvideo.c.
References avg2, avg4, RoqContext::c_stride, RoqContext::current_frame, RoqContext::last_frame, and RoqContext::y_stride.
Referenced by roqvideo_decode_frame().
| static void apply_motion_8x8 | ( | RoqContext * | ri, | |
| int | x, | |||
| int | y, | |||
| unsigned char | mv, | |||
| signed char | mean_x, | |||
| signed char | mean_y | |||
| ) | [static] |
Definition at line 218 of file roqvideo.c.
References avg2, avg4, RoqContext::c_stride, RoqContext::current_frame, RoqContext::last_frame, and RoqContext::y_stride.
Referenced by roqvideo_decode_frame().
| static void apply_vector_2x2 | ( | RoqContext * | ri, | |
| int | x, | |||
| int | y, | |||
| roq_cell * | cell | |||
| ) | [static] |
Definition at line 84 of file roqvideo.c.
References RoqContext::c_stride, RoqContext::current_frame, roq_cell::u, roq_cell::v, roq_cell::y0, roq_cell::y1, roq_cell::y2, roq_cell::y3, and RoqContext::y_stride.
Referenced by roqvideo_decode_frame().
| static void apply_vector_4x4 | ( | RoqContext * | ri, | |
| int | x, | |||
| int | y, | |||
| roq_cell * | cell | |||
| ) | [static] |
Definition at line 98 of file roqvideo.c.
References RoqContext::c_stride, RoqContext::current_frame, roq_cell::u, roq_cell::v, roq_cell::y0, roq_cell::y1, roq_cell::y2, roq_cell::y3, and RoqContext::y_stride.
Referenced by roqvideo_decode_frame().
| static int roq_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 479 of file roqvideo.c.
References RoqContext::last_frame, AVCodecContext::priv_data, AVCodecContext::release_buffer, and s.
| static int roq_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 447 of file roqvideo.c.
References av_log(), AV_LOG_ERROR, RoqContext::buf, RoqContext::c_stride, RoqContext::current_frame, RoqContext::first_frame, AVCodecContext::get_buffer, RoqContext::last_frame, AVCodecContext::priv_data, AVCodecContext::release_buffer, roqvideo_decode_frame(), s, RoqContext::size, and RoqContext::y_stride.

| static int roq_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 429 of file roqvideo.c.
References RoqContext::avctx, RoqContext::dsp, dsputil_init(), RoqContext::first_frame, AVCodecContext::has_b_frames, AVCodecContext::pix_fmt, PIX_FMT_YUV420P, AVCodecContext::priv_data, s, uiclip, and uiclp.

| static void roqvideo_decode_frame | ( | RoqContext * | ri | ) | [static] |
Definition at line 310 of file roqvideo.c.
References apply_motion_4x4(), apply_motion_8x8(), apply_vector_2x2(), apply_vector_4x4(), av_log(), AV_LOG_ERROR, RoqContext::avctx, RoqContext::buf, buf, RoqContext::cells, get_byte, get_long, get_word, AVCodecContext::height, roq_qcell::idx, RoqContext::qcells, RoQ_ID_CCC, RoQ_ID_FCC, RoQ_ID_MOT, RoQ_ID_SLD, RoQ_QUAD_CODEBOOK, RoQ_QUAD_VQ, RoqContext::size, roq_cell::u, roq_cell::v, AVCodecContext::width, roq_cell::y0, roq_cell::y1, roq_cell::y2, and roq_cell::y3.
Referenced by roq_decode_frame().

Initial value:
{
"roqvideo",
CODEC_TYPE_VIDEO,
CODEC_ID_ROQ,
sizeof(RoqContext),
roq_decode_init,
NULL,
roq_decode_end,
roq_decode_frame,
CODEC_CAP_DR1,
}
Definition at line 489 of file roqvideo.c.
Referenced by avcodec_register_all().
int uiclip[1024] [static] |
int * uiclp [static] |
1.5.5