On Thu, Dec 15, 2011 at 11:00:17AM +0100, Kostya Shishkov wrote:
> On Wed, Dec 07, 2011 at 04:42:24PM +0100, Kostya Shishkov wrote:
> [...]
>
> Updated for the latest HEAD
If you are OK with this patch, I think it's good to go ...
A FATE test would be nice for this codec, though.
> --- /dev/null
> +++ b/libavcodec/indeo4.c
> @@ -0,0 +1,831 @@
> +
> +#define IVI4_STREAM_ANALYSER 0
> +#define IVI4_DEBUG_CHECKSUM 0
> +
> +#define ALT_BITSTREAM_READER_LE
> +#include "avcodec.h"
> +#include "get_bits.h"
> +#include "dsputil.h"
> +#include "ivi_dsp.h"
> +#include "ivi_common.h"
> +#include "indeo4data.h"
The #defines feel slightly out of place above the #includes, I'd move
them down.
> +/**
> + * Decode subdivision of a plane.
> + * This is a simplified version that checks for two supported subdivisions:
> + * - 1 wavelet band per plane, size factor 1:1, code pattern: 3
> + * - 4 wavelet bands per plane, size factor 1:4, code pattern: 2,3,3,3,3
> + * Anything else is either unsupported or corrupt.
> + *
> + * @param[in,out] gb the GetBit context
> + * @return number of wavelet bands or 0 if error
on error
> +static void switch_buffers(IVI4DecContext *ctx)
> +{
> + switch (ctx->prev_frame_type) {
> + case FRAMETYPE_INTRA:
> + case FRAMETYPE_INTER:
> + ctx->buf_switch ^= 1;
> + ctx->dst_buf = ctx->buf_switch;
> + ctx->ref_buf = ctx->buf_switch ^ 1;
> + break;
> +#if 0
> + case FRAMETYPE_INTER_SCAL:
> + if (!ctx->inter_scal) {
> + ctx->ref2_buf = 2;
> + ctx->inter_scal = 1;
> + }
> + FFSWAP(int, ctx->dst_buf, ctx->ref2_buf);
> + ctx->ref_buf = ctx->ref2_buf;
> + break;
> +#endif
> + case FRAMETYPE_INTER_NOREF:
> + break;
> + }
Ugh, disabled cruft ...
> --- /dev/null
> +++ b/libavcodec/indeo4data.h
> @@ -0,0 +1,348 @@
> +
> +/**
> + * @file
> + * This file contains data needed for the Indeo4 decoder.
Indeo 4
It would be nice to be consistent about this.
> --- a/libavcodec/ivi_dsp.c
> +++ b/libavcodec/ivi_dsp.c
> @@ -178,6 +178,149 @@ void ff_ivi_recompose53(const IVIPlaneDesc *plane,
> uint8_t *dst,
> +
> +void ff_ivi_inverse_haar_8x8(const int32_t *in, int16_t *out, uint32_t
> pitch, const uint8_t *flags)
nit: long line
> +void ff_ivi_dc_haar_2d(const int32_t *in, int16_t *out, uint32_t pitch, int
> blk_size)
ditto
Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel