Go to the documentation of this file.
30 #define BITSTREAM_READER_LE
46 2, -3, 8, -8, 18, -18, 36, -36,
50 1, -1, 2, -3, 8, -8, 18, -18, 36, -36, 54, -54, 96, -96, 144, -144,
63 uint8_t header_buffer[128] = { 0 };
74 header_size = ((buf[0] >> 5) | (buf[0] << 3)) & 0x7f;
75 if (header_size < 10) {
80 if (header_size + 1 >
size) {
86 for (
i = 1;
i < header_size;
i++)
87 header_buffer[
i - 1] = buf[
i] ^ buf[
i + 1];
89 s->delta_size = header_buffer[1];
90 s->hscale = 1 + !!header_buffer[3];
91 if (
s->delta_size < 2 ||
s->delta_size > 4)
112 int x, y, delta_mode;
119 if ((avctx->
width +
s->hscale - 1)/
s->hscale * avctx->
height *
s->delta_size > avpkt->
size * 8LL * 4)
131 delta_mode =
s->delta_size - 2;
133 for (y = 0; y < avctx->
height; y++) {
135 for (
x = 0;
x < avctx->
width;
x +=
s->hscale) {
144 for (y = 0; y < avctx->
height; y++) {
145 for (
x = 1;
x < avctx->
width;
x +=
s->hscale)
152 for (y = 0; y < avctx->
height; y++) {
154 dst[
x] = av_clip_uint8(dst[
x] + (dst[
x] - 128) / 3);
159 for (y = 0; y < avctx->
height >> 2; y++) {
161 for (
x = 0;
x < avctx->
width >> 2;
x +=
s->hscale) {
163 dst[
x] = av_clip_uint8((y ? dst[
x - p->
linesize[1]] : 128) +
diff);
170 for (y = 0; y < avctx->
height >> 2; y++) {
171 for (
x = 1;
x < avctx->
width >> 2;
x +=
s->hscale)
178 for (y = 0; y < avctx->
height >> 2; y++) {
179 for (
x = 0;
x < avctx->
width >> 2;
x++)
180 dst[
x] += (dst[
x] - 128) / 8;
185 for (y = 0; y < avctx->
height >> 2; y++) {
187 for (
x = 0;
x < avctx->
width >> 2;
x +=
s->hscale) {
189 dst[
x] = av_clip_uint8((y ? dst[
x - p->
linesize[2]] : 128) +
diff);
196 for (y = 0; y < avctx->
height >> 2; y++) {
197 for (
x = 1;
x < avctx->
width >> 2;
x +=
s->hscale)
204 for (y = 0; y < avctx->
height >> 2; y++) {
205 for (
x = 0;
x < avctx->
width >> 2;
x++)
206 dst[
x] += (dst[
x] - 128) / 8;
224 .
name =
"truemotion2rt",
@ AV_CODEC_ID_TRUEMOTION2RT
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
static av_cold int init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
static const int16_t *const delta_tabs[]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
static const int16_t delta_tab2[]
int key_frame
1 -> keyframe, 0-> not
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
AVCodec ff_truemotion2rt_decoder
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static const int16_t delta_tab4[]
@ AV_PICTURE_TYPE_I
Intra.
enum AVPictureType pict_type
Picture type of the frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static const int16_t delta_tab3[]
#define i(width, name, range_min, range_max)
static int truemotion2rt_decode_header(AVCodecContext *avctx, const AVPacket *avpkt)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
main external API structure.
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 av_always_inline int diff(const uint32_t a, const uint32_t b)
static int truemotion2rt_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
@ AV_PIX_FMT_YUV410P
planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static av_cold int truemotion2rt_decode_init(AVCodecContext *avctx)