FFmpeg
svq1enc.h
Go to the documentation of this file.
1 /*
2  * SVQ1 encoder
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_SVQ1ENC_H
22 #define AVCODEC_SVQ1ENC_H
23 
24 #include <stdint.h>
25 
26 #include "libavutil/frame.h"
27 
28 #include "avcodec.h"
29 #include "hpeldsp.h"
30 #include "me_cmp.h"
31 #include "mpegvideo.h"
32 #include "put_bits.h"
33 
34 typedef struct SVQ1EncContext {
35  /* FIXME: Needed for motion estimation, should not be used for anything
36  * else, the idea is to make the motion estimation eventually independent
37  * of MpegEncContext, so this will be removed then. */
45 
46  /* Some compression statistics */
48  int quality;
49 
50  /* why ooh why this sick breadth first order,
51  * everything is slower and more complex */
53 
56 
57  /* Y plane block dimensions */
60 
61  /* U & V plane (C planes) block dimensions */
64 
65  DECLARE_ALIGNED(16, int16_t, encoded_block_levels)[6][7][256];
66 
67  uint16_t *mb_type;
68  uint32_t *dummy;
69  int16_t (*motion_val8[3])[2];
70  int16_t (*motion_val16[3])[2];
71 
72  int64_t rd_total;
73 
75 
77 
78  int (*ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2,
79  intptr_t size);
81 
84 
85 #endif /* AVCODEC_SVQ1ENC_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:295
uint16_t * mb_type
Definition: svq1enc.h:67
int frame_height
Definition: svq1enc.h:55
MpegEncContext m
Definition: svq1enc.h:38
AVFrame * current_picture
Definition: svq1enc.h:42
int c_block_height
Definition: svq1enc.h:63
mpegvideo header.
int y_block_height
Definition: svq1enc.h:59
uint8_t
int frame_width
Definition: svq1enc.h:54
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
Definition: undefined.txt:32
int16_t encoded_block_levels[6][7][256]
Definition: svq1enc.h:65
enum AVPictureType pict_type
Definition: svq1enc.h:47
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:112
ptrdiff_t size
Definition: opengl_enc.c:100
int c_block_width
Definition: svq1enc.h:62
int64_t rd_total
Definition: svq1enc.h:72
uint8_t * scratchbuf
Definition: svq1enc.h:74
int y_block_width
Definition: svq1enc.h:58
int16_t(*[3] motion_val16)[2]
Definition: svq1enc.h:70
int motion_est
Definition: svq1enc.h:76
reference-counted frame API
PutBitContext reorder_pb[6]
Definition: svq1enc.h:52
Half-pel DSP context.
Definition: hpeldsp.h:45
int(* ssd_int8_vs_int16)(const int8_t *pix1, const int16_t *pix2, intptr_t size)
Definition: svq1enc.h:78
MECmpContext mecc
Definition: svq1enc.h:40
void ff_svq1enc_init_ppc(SVQ1EncContext *c)
PutBitContext pb
Definition: svq1enc.h:44
int16_t(*[3] motion_val8)[2]
Definition: svq1enc.h:69
Half-pel DSP functions.
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:1621
AVPictureType
Definition: avutil.h:272
void ff_svq1enc_init_x86(SVQ1EncContext *c)
Definition: svq1enc_init.c:32
AVFrame * last_picture
Definition: svq1enc.h:43
MpegEncContext.
Definition: mpegvideo.h:81
int
AVCodecContext * avctx
Definition: svq1enc.h:39
uint32_t * dummy
Definition: svq1enc.h:68
HpelDSPContext hdsp
Definition: svq1enc.h:41
bitstream writer API