Go to the documentation of this file.
40 int w =
r->s.width,
h =
r->s.height;
56 if (rpr >
r->max_rpr) {
63 "Insufficient extradata - need at least %d bytes, got %d\n",
68 w =
r->s.avctx->extradata[6 + rpr*2] << 2;
69 h =
r->s.avctx->extradata[7 + rpr*2] << 2;
76 mb_size = ((
w + 15) >> 4) * ((
h + 15) >> 4);
90 for(
i = 0;
i < 4;
i++, dst +=
r->intra_types_stride - 4){
91 for(j = 0; j < 4; j+= 2){
97 for(k = 0; k < 2; k++){
98 int A = dst[-
r->intra_types_stride] + 1;
131 return rv30_p_types[
code];
133 return rv30_b_types[
code];
137 const int stride,
const int lim)
142 for(
i = 0;
i < 4;
i++){
157 int loc_lim, cur_lim, left_lim = 0, top_lim = 0;
159 mb_pos = row *
s->mb_stride;
160 for(mb_x = 0; mb_x <
s->mb_width; mb_x++, mb_pos++){
161 int mbtype =
s->current_picture_ptr->mb_type[mb_pos];
163 r->deblock_coefs[mb_pos] = 0xFFFF;
165 r->cbp_chroma[mb_pos] = 0xFF;
171 mb_pos = row *
s->mb_stride;
172 for(mb_x = 0; mb_x <
s->mb_width; mb_x++, mb_pos++){
176 for(j = 0; j < 16; j += 4){
177 Y =
s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) *
s->linesize + 4 * !mb_x;
178 for(
i = !mb_x;
i < 4;
i++,
Y += 4){
181 if(
r->deblock_coefs[mb_pos] & (1 << ij))
183 else if(!
i &&
r->deblock_coefs[mb_pos - 1] & (1 << (ij + 3)))
185 else if(
i &&
r->deblock_coefs[mb_pos] & (1 << (ij - 1)))
191 for(k = 0; k < 2; k++){
192 int cur_cbp, left_cbp = 0;
193 cur_cbp = (
r->cbp_chroma[mb_pos] >> (k*4)) & 0xF;
195 left_cbp = (
r->cbp_chroma[mb_pos - 1] >> (k*4)) & 0xF;
196 for(j = 0; j < 8; j += 4){
197 C =
s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j) *
s->uvlinesize + 4 * !mb_x;
198 for(
i = !mb_x;
i < 2;
i++,
C += 4){
199 int ij =
i + (j >> 1);
201 if (cur_cbp & (1 << ij))
203 else if(!
i && left_cbp & (1 << (ij + 1)))
205 else if(
i && cur_cbp & (1 << (ij - 1)))
213 mb_pos = row *
s->mb_stride;
214 for(mb_x = 0; mb_x <
s->mb_width; mb_x++, mb_pos++){
218 for(j = 4*!row; j < 16; j += 4){
219 Y =
s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) *
s->linesize;
220 for(
i = 0;
i < 4;
i++,
Y += 4){
223 if(
r->deblock_coefs[mb_pos] & (1 << ij))
225 else if(!j &&
r->deblock_coefs[mb_pos -
s->mb_stride] & (1 << (ij + 12)))
227 else if( j &&
r->deblock_coefs[mb_pos] & (1 << (ij - 4)))
233 for(k = 0; k < 2; k++){
234 int cur_cbp, top_cbp = 0;
235 cur_cbp = (
r->cbp_chroma[mb_pos] >> (k*4)) & 0xF;
237 top_cbp = (
r->cbp_chroma[mb_pos -
s->mb_stride] >> (k*4)) & 0xF;
238 for(j = 4*!row; j < 8; j += 4){
239 C =
s->current_picture_ptr->f->data[k+1] + mb_x*8 + (row*8 + j) *
s->uvlinesize;
240 for(
i = 0;
i < 2;
i++,
C += 4){
241 int ij =
i + (j >> 1);
243 if (
r->cbp_chroma[mb_pos] & (1 << ij))
245 else if(!j && top_cbp & (1 << (ij + 2)))
247 else if( j && cur_cbp & (1 << (ij - 2)))
#define AV_LOG_WARNING
Something somehow does not look correct.
AVPixelFormat
Pixel format.
static av_cold int init(AVCodecContext *avctx)
av_cold int ff_rv34_decode_end(AVCodecContext *avctx)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int ff_rv34_get_start_offset(GetBitContext *gb, int mb_size)
Decode starting slice position.
static unsigned get_interleaved_ue_golomb(GetBitContext *gb)
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
int ff_rv34_decode_update_thread_context(AVCodecContext *dst, const AVCodecContext *src)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
@ RV34_MB_B_FORWARD
B-frame macroblock, forward prediction.
@ RV34_MB_B_DIRECT
Bidirectionally predicted B-frame macroblock, no motion vectors.
static int rv30_parse_slice_header(RV34DecContext *r, GetBitContext *gb, SliceInfo *si)
s EdgeDetect Foobar g libavfilter vf_edgedetect c libavfilter vf_foobar c edit libavfilter and add an entry for foobar following the pattern of the other filters edit libavfilter allfilters and add an entry for foobar following the pattern of the other filters configure make j< whatever > ffmpeg ffmpeg i you should get a foobar png with Lena edge detected That s your new playground is ready Some little details about what s going which in turn will define variables for the build system and the C
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
Initialize decoder.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
static enum AVPixelFormat pix_fmts[]
static void rv30_loop_filter(RV34DecContext *r, int row)
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
static void flush(AVCodecContext *avctx)
@ RV34_MB_SKIP
Skipped block.
static int rv30_decode_mb_info(RV34DecContext *r)
Decode macroblock information.
int type
slice type (intra, inter)
static int rv30_decode_intra_types(RV34DecContext *r, GetBitContext *gb, int8_t *dst)
Decode 4x4 intra types array.
int ff_rv34_decode_frame(AVCodecContext *avctx, void *data, int *got_picture_ptr, AVPacket *avpkt)
static unsigned int get_bits1(GetBitContext *s)
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
static void rv30_weak_loop_filter(uint8_t *src, const int step, const int stride, const int lim)
int quant
quantizer used for this slice
@ RV34_MB_P_8x8
P-frame macroblock, 8x8 motion compensation partitions.
#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.
@ RV34_MB_B_BACKWARD
B-frame macroblock, backward prediction.
void ff_mpeg_flush(AVCodecContext *avctx)
static void skip_bits1(GetBitContext *s)
@ RV34_MB_TYPE_INTRA16x16
Intra macroblock with DCs in a separate 4x4 block.
#define i(width, name, range_min, range_max)
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some it can consider them to be part of the FIFO and delay acknowledging a status change accordingly Example code
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
@ RV34_MB_TYPE_INTRA
Intra macroblock.
const char * name
Name of the codec implementation.
static const uint8_t rv30_luma_dc_quant[32]
DC quantizer mapping for RV30.
essential slice information
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 ug o o w
main external API structure.
@ AV_PICTURE_TYPE_B
Bi-dir predicted.
#define IS_SEPARATE_DC(a)
static const uint8_t rv30_loop_filt_lim[32]
Loop filter limits are taken from this table.
#define AV_CODEC_CAP_DELAY
Encoder or decoder requires flushing with NULL input at the end in order to give the complete and cor...
static av_cold int rv30_decode_init(AVCodecContext *avctx)
Initialize decoder.
int coded_width
Bitstream width / height, may be different from width/height e.g.
#define FF_CODEC_CAP_ALLOCATE_PROGRESS
static av_always_inline int diff(const uint32_t a, const uint32_t b)
@ RV34_MB_P_16x16
P-frame macroblock, one motion frame.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static const uint8_t rv30_itype_from_context[900]
This table is used for retrieving the current intra type based on its neighbors and adjustment provid...
static const uint8_t rv30_itype_code[9 *9 *2]
This table is used for storing the differences between the predicted and the real intra type.