Commit Graph

95 Commits

Author SHA1 Message Date
Vittorio Giovara cf7d2f2d21 lavc: Simplify checking quant bias option 2015-09-29 14:33:01 +02:00
Vittorio Giovara def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara 7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara 40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Vittorio Giovara 5d3addb937 Add a quality factor packet side data
This is necessary to preserve the quality information currently exported
with coded_frame. Add the new side data to every encoder that needs it,
and use it in avconv.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:47 +01:00
Vittorio Giovara d6604b29ef Gather all coded_frame allocations and free functions to a single place
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().

This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:16:15 +01:00
Vittorio Giovara 910247f172 lavc: Deprecate avctx.{inter,intra}_quant_bias
They are used by dnxhd and mpegvideo_enc exclusively, move them to codec
private options instead.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-02 22:37:59 +01:00
Vittorio Giovara 6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Vittorio Giovara 85dc006b1a lavc: fix bitshifts amount bigger than the type
CC: libav-stable@libav.org
Bug-Id: CID 1194387 / CID 1194389 / CID 1194393 / CID 1206638
2014-11-18 00:39:23 +01:00
Vittorio Giovara e3f50f2471 dnxhdenc: check negative index
CC: libav-stable@libav.org
Bug-Id: CID 700464
2014-11-13 01:41:25 +01:00
John Stebbins 998c9f15d1 idct: remove call to ff_idctdsp_init from ff_MPV_common_init
One step in untangling the mpegvideo code and fixing some problems in
the order that initialization is being done in h263dec and h261dec.
2014-08-14 07:58:49 -07:00
Diego Biurrun f46bb608d9 dsputil: Split off pixel block routines into their own context 2014-07-09 08:05:26 -07:00
Diego Biurrun a9aee08d90 dsputil: Split off FDCT bits into their own context 2014-07-07 12:28:45 -07:00
Diego Biurrun c166148409 dsputil: Move pix_sum, pix_norm1, shrink function pointers to mpegvideoenc 2014-07-06 14:26:53 -07:00
Diego Biurrun e3fcb14347 dsputil: Split off IDCT bits into their own context 2014-06-30 07:58:46 -07:00
Diego Biurrun 5dd8c08fd5 mpeg: Change ff_convert_matrix() to take an MpegEncContext parameter
This will come in handy during dsputil splitting.
2014-06-27 05:17:11 -07:00
Diego Biurrun e74433a8e6 dsputil: Split clear_block*/fill_block* off into a separate context 2014-06-18 14:07:23 -07:00
Timothy Gu 676856204b DNxHD: make get_pixel_8x4_sym accept ptrdiff_t as stride 2014-04-11 12:09:09 +02:00
Vittorio Giovara 89ef08c992 DNxHD: K&R formatting cosmetics 2014-04-11 12:09:08 +02:00
Timothy Gu 68e95ab81b dnxhdenc: return meaningful return codes 2014-03-30 14:55:09 +02:00
Janne Grunau fb0c9d41d6 avutil: remove timer.h include from internal.h
Added libavutil/timer.h include to all files with {START,STOP}_TIMER.
2014-01-25 21:50:20 +01:00
Anton Khirnov 57e7b3a89f dnxhdenc: use the AVFrame API properly. 2013-11-16 17:47:58 +01:00
Diego Biurrun b2bed9325d cosmetics: Group .name and .long_name together in codec/format declarations 2013-10-03 23:32:01 +02:00
Diego Biurrun 2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Diego Biurrun bd8ac88214 avcodec: Add av_cold attributes to end functions missing them 2013-05-05 20:51:28 +02:00
Diego Biurrun 6fee1b90ce avcodec: Add av_cold attributes to init functions missing them 2013-05-04 21:09:45 +02:00
Diego Biurrun 218aefce44 dsputil: Move LOCAL_ALIGNED macros to libavutil 2013-02-08 23:13:37 +01:00
Anton Khirnov 69c25c9284 dnxhdenc: fix invalid reads in dnxhd_mb_var_thread().
Do not assume that frame dimensions are mod16 (or that height is mod32
for interlaced).

CC:libav-stable@libav.org
2013-01-26 12:30:08 +01:00
Diego Biurrun 88bd7fdc82 Drop DCTELEM typedef
It does not help as an abstraction and adds dsputil dependencies.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2013-01-22 18:32:56 -08:00
Anton Khirnov 716d413c13 Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat 2012-10-08 07:13:26 +02:00
Martin Storsjö e6153f173a avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-09-04 23:13:44 +03:00
Diego Biurrun 26ce9aec03 dnxhdenc: x86: more sensible names for optimization file and init function 2012-08-24 02:23:15 +02:00
Mans Rullgard 7a851153d3 mpegvideo: convert mpegvideo_common.h to a .c file
This file defines a single, huge function, MPV_motion(), which
although being declared inline is not actually inlined by the
compiler (for good reason).  There is thus no sense in defining
this function in a header file, resulting in multiple copies of
it in the final library.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-09 01:31:37 +01:00
Anton Khirnov 36ef5369ee Replace all CODEC_ID_* with AV_CODEC_ID_* 2012-08-07 16:00:24 +02:00
Martin Storsjö 00c3b67b8a cosmetics: Align codec declarations
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-04-06 22:37:38 +03:00
Martin Storsjö 9cf0841ef3 dsputil: Add ff_ prefix to the dsputil*_init* functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:34 +02:00
Martin Storsjö 99560a4caa libavcodec: Add ff_ prefix to some nonstatic symbols
Prefix the functions atrac_generate_tables, atrac_iqmf, dct_quantize_c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:06:29 +02:00
Anton Khirnov 89829242a6 dnxhdenc: switch to encode2. 2012-02-12 08:03:46 +01:00
Diego Biurrun 54e68fb3b8 Merge some declarations and initializations.
This fixes compilation failures related to START_TIMER/STOP_TIMER macros and
-Werror=declaration-after-statement.  START_TIMER declares variables and thus
may not be placed after statements outside of a new block.
2012-01-04 01:28:28 +01:00
Mans Rullgard 3a83b2461e dnxhdenc: fix signed overflows
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-11-26 20:52:10 +00:00
Mans Rullgard d341d5fd2c dnxhdenc: fixed signed multiplication overflow
The low 32 bits of a multiplication are the same for signed
and unsigned operands.  Casting to unsigned before multiplying
is thus equivalent while avoiding signed overflow, which is
undefined by the C99 standard.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-10-14 20:45:22 +01:00
Anton Khirnov 145f741e11 AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_* 2011-10-12 16:51:16 +02:00
Anton Khirnov ec6402b7c5 lavc: use designated initialisers for all codecs.
It's more readable and less prone to breakage.
2011-07-29 08:42:34 +02:00
Mans Rullgard e72f3d10f6 dnxhdenc: fix declarations in for loops
Apparently the gcc warning doesn't trigger on these.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-27 16:36:02 +01:00
Joseph Artsimovich 5ab21439fd dnxhd: 10-bit support
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 18:44:40 +01:00
Mans Rullgard b049978397 dnxhdenc: remove inline from function only called through pointer
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 02:13:03 +01:00
Mans Rullgard 1073823984 dnxhdenc: whitespace cosmetics
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-07-21 02:12:47 +01:00
Diego Biurrun 828e207337 dnxhdenc: Replace a forward declaration by the proper #include. 2011-07-12 19:24:53 +02:00
Baptiste Coudurier 14cf9e698d dnxhdenc: add AVClass in private context.
Fixes private options.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-05-12 13:08:10 +02:00
Anton Khirnov b66752790a AVOptions: make default_val a union, as proposed in AVOption2.
This breaks API and ABI.
2011-05-10 20:22:06 +02:00