Go to the documentation of this file.
51 int plane,
int x,
int y,
int ilace,
52 int16_t *block0, int16_t *
block1)
56 c->hqhqadsp.idct_put(p + y * pic->
linesize[plane],
57 pic->
linesize[plane] << ilace, block0);
58 c->hqhqadsp.idct_put(p + (y + (ilace ? 1 : 8)) * pic->
linesize[plane],
63 int qsel,
int is_chroma,
int is_hqa)
102 for (
i = 0;
i < 8;
i++) {
117 int prof_num,
size_t data_size)
122 uint32_t slice_off[21];
123 int slice, start_off, next_off,
i,
ret;
137 ctx->avctx->bits_per_raw_sample = 8;
146 slice_off[
i] = bytestream2_get_be24(&
ctx->gbc) - 4;
149 for (slice = 0; slice <
profile->num_slices; slice++) {
150 start_off = next_off;
154 if (slice_off[slice] < (
profile->num_slices + 1) * 3 ||
155 slice_off[slice] >= slice_off[slice + 1] ||
156 slice_off[slice + 1] > data_size) {
162 (slice_off[slice + 1] - slice_off[slice]) * 8);
164 for (
i = 0;
i < (next_off - start_off) *
profile->tab_w;
i++) {
168 "Error decoding macroblock %d at slice %d.\n",
i, slice);
187 cbp =
get_vlc2(gb,
c->hqa_cbp_vlc.table, 5, 1);
189 for (
i = 0;
i < 12;
i++)
190 memset(
c->block[
i], 0,
sizeof(*
c->block));
191 for (
i = 0;
i < 12;
i++)
192 c->block[
i][0] = -128 * (1 << 6);
202 for (
i = 0;
i < 12;
i++) {
203 if (!(cbp & (1 <<
i)))
222 int quant,
int slice_no,
int w,
int h)
227 for (
i = 0;
i <
h;
i += 16) {
228 off = (slice_no * 16 +
i * 3) & 0x70;
229 for (j = off; j <
w; j += 128) {
233 "Error decoding macroblock at %dx%d.\n",
i, j);
245 const int num_slices = 8;
246 uint32_t slice_off[9];
254 width = bytestream2_get_be16(&
ctx->gbc);
255 height = bytestream2_get_be16(&
ctx->gbc);
263 ctx->avctx->bits_per_raw_sample = 8;
268 quant = bytestream2_get_byte(&
ctx->gbc);
272 "Invalid quantization matrix %d.\n",
quant);
281 for (
i = 0;
i < num_slices + 1;
i++)
282 slice_off[
i] = bytestream2_get_be32(&
ctx->gbc) - 4;
284 for (slice = 0; slice < num_slices; slice++) {
285 if (slice_off[slice] < (num_slices + 1) * 3 ||
286 slice_off[slice] >= slice_off[slice + 1] ||
287 slice_off[slice + 1] > data_size) {
293 (slice_off[slice + 1] - slice_off[slice]) * 8);
309 unsigned int data_size;
319 info_tag = bytestream2_peek_le32(&
ctx->gbc);
320 if (info_tag ==
MKTAG(
'I',
'N',
'F',
'O')) {
323 info_size = bytestream2_get_le32(&
ctx->gbc);
342 tag = bytestream2_get_le32(&
ctx->gbc);
343 if ((
tag & 0x00FFFFFF) == (
MKTAG(
'U',
'V',
'C',
' ') & 0x00FFFFFF)) {
345 }
else if (
tag ==
MKTAG(
'H',
'Q',
'A',
'1')) {
static int hq_decode_block(HQContext *c, GetBitContext *gb, int16_t block[64], int qsel, int is_chroma, int is_hqa)
#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 hq_hqa_decode_close(AVCodecContext *avctx)
static av_cold int init(AVCodecContext *avctx)
static int get_bits_left(GetBitContext *gb)
#define MKTAG(a, b, c, d)
static int hq_decode_mb(HQContext *c, AVFrame *pic, GetBitContext *gb, int x, int y)
This structure describes decoded (raw) audio or video data.
AVCodec ff_hq_hqa_decoder
static av_always_inline int get_vlc2(GetBitContext *s, VLC_TYPE(*table)[2], int bits, int max_depth)
Parse a vlc code.
#define AV_LOG_VERBOSE
Detailed information.
static int hq_hqa_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
const int32_t *const ff_hq_quants[16][2][4]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static int hq_decode_frame(HQContext *ctx, AVFrame *pic, int prof_num, size_t data_size)
static av_always_inline void bytestream2_skip(GetByteContext *g, unsigned int size)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
int ff_canopus_parse_info_tag(AVCodecContext *avctx, const uint8_t *src, size_t size)
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
int key_frame
1 -> keyframe, 0-> not
static double val(void *priv, double ch)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
const HQProfile ff_hq_profile[NUM_HQ_PROFILES]
static int hqa_decode_slice(HQContext *ctx, AVFrame *pic, GetBitContext *gb, int quant, int slice_no, int w, int h)
static int get_sbits(GetBitContext *s, int n)
void ff_free_vlc(VLC *vlc)
int ff_hq_init_vlcs(HQContext *c)
static int hqa_decode_mb(HQContext *c, AVFrame *pic, int qgroup, GetBitContext *gb, int x, int y)
@ AV_PICTURE_TYPE_I
Intra.
static unsigned int get_bits1(GetBitContext *s)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
const int16_t ff_hq_ac_syms[NUM_HQ_AC_ENTRIES]
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.
av_cold void ff_hqdsp_init(HQDSPContext *c)
static int hqa_decode_frame(HQContext *ctx, AVFrame *pic, size_t data_size)
#define i(width, name, range_min, range_max)
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
static void put_blocks(HQContext *c, AVFrame *pic, int plane, int x, int y, int ilace, int16_t *block0, int16_t *block1)
const char * name
Name of the codec implementation.
const uint8_t ff_zigzag_direct[64]
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_PIX_FMT_YUV422P
planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
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.
#define avpriv_request_sample(...)
This structure stores compressed data.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
The exact code depends on how similar the blocks are and how related they are to the block
const uint8_t ff_hq_ac_skips[NUM_HQ_AC_ENTRIES]
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
static int16_t block1[64]
@ AV_PIX_FMT_YUVA422P
planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
static av_cold int hq_hqa_decode_init(AVCodecContext *avctx)