Revision 451b4b86

View differences:

libavcodec/arm/asm-offsets.h
29 29
#endif
30 30

  
31 31
/* MpegEncContext */
32
#if defined(__ARM_EABI__) || defined(__eabi__)
33
#define Y_DC_SCALE               0xab4
34
#define C_DC_SCALE               0xab8
35
#define AC_PRED                  0xae0
36
#define BLOCK_LAST_INDEX         0x21c0
37
#define INTER_SCANTAB_RASTER_END 0x23c0
38
#define H263_AIC                 0x2670
39
#elif defined(__APPLE__)
40
#define Y_DC_SCALE               0xa70
41
#define C_DC_SCALE               0xa74
42
#define AC_PRED                  0xa9c
43
#define BLOCK_LAST_INDEX         0x217c
44
#define INTER_SCANTAB_RASTER_END 0x237c
45
#define H263_AIC                 0x2620
46
#endif
32
#define Y_DC_SCALE               0xb4
33
#define C_DC_SCALE               0xb8
34
#define AC_PRED                  0xbc
35
#define BLOCK_LAST_INDEX         0xc0
36
#define H263_AIC                 0xf0
37
#define INTER_SCANTAB_RASTER_END 0x138
47 38

  
48 39
#endif
libavcodec/arm/mpegvideo_neon.S
22 22
#include "asm-offsets.h"
23 23

  
24 24
function ff_dct_unquantize_h263_inter_neon, export=1
25
        add             r0,  r0,  #0x2200
26
        add             r12, r0,  #BLOCK_LAST_INDEX-0x2200
25
        add             r12, r0,  #BLOCK_LAST_INDEX
27 26
        ldr             r12, [r12, r2, lsl #2]
28
        add             r0,  r0,  #INTER_SCANTAB_RASTER_END-0x2200
27
        add             r0,  r0,  #INTER_SCANTAB_RASTER_END
29 28
        ldrb            r12, [r0, r12]
30 29
        sub             r2,  r3,  #1
31 30
        lsl             r0,  r3,  #1
......
75 74

  
76 75
function ff_dct_unquantize_h263_intra_neon, export=1
77 76
        push            {r4-r6,lr}
77
        add             r12, r0,  #BLOCK_LAST_INDEX
78 78
        ldr             r6,  [r0, #AC_PRED]
79
        add             r5,  r0,  #0x2700
79
        add             lr,  r0,  #INTER_SCANTAB_RASTER_END
80 80
        cmp             r6,  #0
81 81
        movne           r12, #63
82 82
        bne             1f
83
        add             lr,  r0,  #0x2200
84
        add             r12, lr,  #BLOCK_LAST_INDEX-0x2200
85
        add             lr,  lr,  #INTER_SCANTAB_RASTER_END-0x2200
86 83
        ldr             r12, [r12, r2, lsl #2]
87 84
        ldrb            r12, [lr, r12]
88
1:      ldr             r5,  [r5, #H263_AIC-0x2700]
85
1:      ldr             r5,  [r0, #H263_AIC]
89 86
        ldrsh           r4,  [r1]
90 87
        cmp             r5,  #0
91 88
        mov             r5,  r1
libavcodec/mpegvideo.h
224 224
    int stream_codec_tag;      ///< internal stream_codec_tag upper case converted from avctx stream_codec_tag
225 225
    /* the following fields are managed internally by the encoder */
226 226

  
227
    /** bit output */
228
    PutBitContext pb;
229

  
230 227
    /* sequence parameters */
231 228
    int context_initialized;
232 229
    int input_picture_number;  ///< used to set pic->display_picture_number, should not be used for/by anything else
......
247 244
    Picture **input_picture;   ///< next pictures on display order for encoding
248 245
    Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
249 246

  
247
    int y_dc_scale, c_dc_scale;
248
    int ac_pred;
249
    int block_last_index[12];  ///< last non zero coefficient in block
250
    int h263_aic;              ///< Advanded INTRA Coding (AIC)
251

  
252
    /* scantables */
253
    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
254
    ScanTable intra_scantable;
255
    ScanTable intra_h_scantable;
256
    ScanTable intra_v_scantable;
257

  
258
    /* WARNING: changes above this line require updates to hardcoded
259
     *          offsets used in asm. */
260

  
261
    /** bit output */
262
    PutBitContext pb;
263

  
250 264
    int start_mb_y;            ///< start mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
251 265
    int end_mb_y;              ///< end   mb_y of this thread (so current thread should process start_mb_y <= row < end_mb_y)
252 266
    struct MpegEncContext *thread_context[MAX_THREADS];
......
283 297
    int16_t *dc_val_base;
284 298
    int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
285 299
    int16_t dc_cache[4*5];
286
    int y_dc_scale, c_dc_scale;
287 300
    const uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table
288 301
    const uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table
289 302
    const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (h263)
......
291 304
    uint8_t *coded_block;          ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
292 305
    int16_t (*ac_val_base)[16];
293 306
    int16_t (*ac_val[3])[16];      ///< used for for mpeg4 AC prediction, all 3 arrays must be continuous
294
    int ac_pred;
295 307
    uint8_t *prev_pict_types;     ///< previous picture types in bitstream order, used for mb skip
296 308
#define PREV_PICT_TYPES_BUFFER_SIZE 256
297 309
    int mb_skipped;                ///< MUST BE SET only during DECODING
......
434 446
    /** identical to the above but for MMX & these are not permutated, second 64 entries are bias*/
435 447
    uint16_t (*q_intra_matrix16)[2][64];
436 448
    uint16_t (*q_inter_matrix16)[2][64];
437
    int block_last_index[12];  ///< last non zero coefficient in block
438
    /* scantables */
439
    ScanTable intra_scantable;
440
    ScanTable intra_h_scantable;
441
    ScanTable intra_v_scantable;
442
    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
443 449

  
444 450
    /* noise reduction */
445 451
    int (*dct_error_sum)[64];
......
495 501

  
496 502
    /* H.263+ specific */
497 503
    int umvplus;                    ///< == H263+ && unrestricted_mv
498
    int h263_aic;                   ///< Advanded INTRA Coding (AIC)
499 504
    int h263_aic_dir;               ///< AIC direction: 0 = left, 1 = top
500 505
    int h263_slice_structured;
501 506
    int alt_inter_vlc;              ///< alternative inter vlc

Also available in: Unified diff