[FFmpeg-soc] [PATCH 8/9] Obfusticate the mimic decoder to make the context copyable earlier.

Michael Niedermayer michaelni at gmx.at
Fri May 30 12:26:29 CEST 2008


On Wed, May 28, 2008 at 11:59:27PM -0400, Alexander Strange wrote:
> Flaw of git-format-email: the original commit message is a bad email  
> subject, but it's better next to the name of the file.
> Is there a better solution for this?
> ---
>   libavcodec/mimic.c |   12 +++++++++---
>   1 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
> index bbb9229..530692a 100644
> --- a/libavcodec/mimic.c
> +++ b/libavcodec/mimic.c
> @@ -51,6 +51,9 @@ typedef struct {
>       ScanTable       scantable;
>       DSPContext      dsp;
>       VLC             vlc;
> +
> +    int             next_cur_index;
> +    int             next_prev_index;

These definitly need comments explaining what they are ...


>   } MimicContext;
> 
>   static const uint32_t huffcodes[] = {
> @@ -329,6 +332,10 @@ static int mimic_decode_frame(AVCodecContext  
> *avctx, void *data,
>           return -1;
>       }
> 
> +    ctx->next_prev_index = ctx->cur_index;

> +    ctx->next_cur_index = ctx->cur_index - 1;
> +    ctx->next_cur_index &= 15;

ctx->next_cur_index = (ctx->cur_index - 1) & 15;

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-soc/attachments/20080530/35efd1f3/attachment.pgp>


More information about the FFmpeg-soc mailing list