annotate huffman.h @ 5876:731ee5ad6bde libavcodec

Correct assignment of interlaced_frame; was being set on output frames, in display order, based on decoding information in decoding order. Now set properly, immediately upon completion of decode. Based on original patch from Reinhard Nissl, rnisssl % gmx , de Original Thread: [FFmpeg-devel] H.264 + PAFF: BBC HD recording shows extreme interlacing artefacts, Thu, 01 Nov 2007 22:43:09
author heydowns
date Mon, 05 Nov 2007 18:16:42 +0000
parents 1d83e9c34641
children aa110f457c5a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5820
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
1 /**
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
2 * @file huffman.h
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
3 * huffman tree builder and VLC generator
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
4 * Copyright (C) 2007 Aurelien Jacobs <aurel@gnuage.org>
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
5 *
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
6 * This file is part of FFmpeg.
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
7 *
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
8 * FFmpeg is free software; you can redistribute it and/or
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
9 * modify it under the terms of the GNU Lesser General Public
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
10 * License as published by the Free Software Foundation; either
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
11 * version 2.1 of the License, or (at your option) any later version.
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
12 *
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
13 * FFmpeg is distributed in the hope that it will be useful,
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
16 * Lesser General Public License for more details.
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
17 *
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
18 * You should have received a copy of the GNU Lesser General Public
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
19 * License along with FFmpeg; if not, write to the Free Software
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
21 */
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
22
5830
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 5824
diff changeset
23 #ifndef FFMPEG_HUFFMAN_H
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 5824
diff changeset
24 #define FFMPEG_HUFFMAN_H
5820
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
25
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
26 #include "avcodec.h"
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
27
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
28 typedef struct {
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
29 int16_t sym;
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
30 int16_t n0;
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
31 uint32_t count;
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
32 } Node;
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
33
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
34 typedef int (*huff_cmp_t)(const void *va, const void *vb);
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
35 int ff_huff_build_tree(AVCodecContext *avctx, VLC *vlc, int nb_codes,
5824
6ac956b341f2 Cygwin don't like this function declaration.
aurel
parents: 5820
diff changeset
36 Node *nodes, huff_cmp_t cmp, int hnode_first);
5820
ffac546a3861 moves fraps huffman decoder to its own file, making it more generic
aurel
parents:
diff changeset
37
5830
1d83e9c34641 Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents: 5824
diff changeset
38 #endif /* FFMPEG_HUFFMAN_H */