Revision 55fde95e libavcodec/dsputil.c

View differences:

libavcodec/dsputil.c
40 40
/* vorbis.c */
41 41
void vorbis_inverse_coupling(float *mag, float *ang, int blocksize);
42 42

  
43
uint8_t cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
43
uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
44 44
uint32_t squareTbl[512] = {0, };
45 45

  
46 46
const uint8_t ff_zigzag_direct[64] = {
......
436 436
                                 int line_size)
437 437
{
438 438
    int i;
439
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
439
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
440 440

  
441 441
    /* read the pixels */
442 442
    for(i=0;i<8;i++) {
......
458 458
                                 int line_size)
459 459
{
460 460
    int i;
461
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
461
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
462 462

  
463 463
    /* read the pixels */
464 464
    for(i=0;i<4;i++) {
......
476 476
                                 int line_size)
477 477
{
478 478
    int i;
479
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
479
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
480 480

  
481 481
    /* read the pixels */
482 482
    for(i=0;i<2;i++) {
......
513 513
                          int line_size)
514 514
{
515 515
    int i;
516
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
516
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
517 517

  
518 518
    /* read the pixels */
519 519
    for(i=0;i<8;i++) {
......
534 534
                          int line_size)
535 535
{
536 536
    int i;
537
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
537
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
538 538

  
539 539
    /* read the pixels */
540 540
    for(i=0;i<4;i++) {
......
551 551
                          int line_size)
552 552
{
553 553
    int i;
554
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
554
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
555 555

  
556 556
    /* read the pixels */
557 557
    for(i=0;i<2;i++) {
......
1592 1592

  
1593 1593
#define QPEL_MC(r, OPNAME, RND, OP) \
1594 1594
static void OPNAME ## mpeg4_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\
1595
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
1595
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
1596 1596
    int i;\
1597 1597
    for(i=0; i<h; i++)\
1598 1598
    {\
......
1611 1611
\
1612 1612
static void OPNAME ## mpeg4_qpel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
1613 1613
    const int w=8;\
1614
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
1614
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
1615 1615
    int i;\
1616 1616
    for(i=0; i<w; i++)\
1617 1617
    {\
......
1638 1638
}\
1639 1639
\
1640 1640
static void OPNAME ## mpeg4_qpel16_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){\
1641
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
1641
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
1642 1642
    int i;\
1643 1643
    \
1644 1644
    for(i=0; i<h; i++)\
......
1665 1665
}\
1666 1666
\
1667 1667
static void OPNAME ## mpeg4_qpel16_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
1668
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
1668
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
1669 1669
    int i;\
1670 1670
    const int w=16;\
1671 1671
    for(i=0; i<w; i++)\
......
2091 2091
#define H264_LOWPASS(OPNAME, OP, OP2) \
2092 2092
static void OPNAME ## h264_qpel2_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2093 2093
    const int h=2;\
2094
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2094
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2095 2095
    int i;\
2096 2096
    for(i=0; i<h; i++)\
2097 2097
    {\
......
2104 2104
\
2105 2105
static void OPNAME ## h264_qpel2_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2106 2106
    const int w=2;\
2107
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2107
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2108 2108
    int i;\
2109 2109
    for(i=0; i<w; i++)\
2110 2110
    {\
......
2125 2125
static void OPNAME ## h264_qpel2_hv_lowpass(uint8_t *dst, int16_t *tmp, uint8_t *src, int dstStride, int tmpStride, int srcStride){\
2126 2126
    const int h=2;\
2127 2127
    const int w=2;\
2128
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2128
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2129 2129
    int i;\
2130 2130
    src -= 2*srcStride;\
2131 2131
    for(i=0; i<h+5; i++)\
......
2153 2153
}\
2154 2154
static void OPNAME ## h264_qpel4_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2155 2155
    const int h=4;\
2156
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2156
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2157 2157
    int i;\
2158 2158
    for(i=0; i<h; i++)\
2159 2159
    {\
......
2168 2168
\
2169 2169
static void OPNAME ## h264_qpel4_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2170 2170
    const int w=4;\
2171
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2171
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2172 2172
    int i;\
2173 2173
    for(i=0; i<w; i++)\
2174 2174
    {\
......
2193 2193
static void OPNAME ## h264_qpel4_hv_lowpass(uint8_t *dst, int16_t *tmp, uint8_t *src, int dstStride, int tmpStride, int srcStride){\
2194 2194
    const int h=4;\
2195 2195
    const int w=4;\
2196
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2196
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2197 2197
    int i;\
2198 2198
    src -= 2*srcStride;\
2199 2199
    for(i=0; i<h+5; i++)\
......
2228 2228
\
2229 2229
static void OPNAME ## h264_qpel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2230 2230
    const int h=8;\
2231
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2231
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2232 2232
    int i;\
2233 2233
    for(i=0; i<h; i++)\
2234 2234
    {\
......
2247 2247
\
2248 2248
static void OPNAME ## h264_qpel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
2249 2249
    const int w=8;\
2250
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2250
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2251 2251
    int i;\
2252 2252
    for(i=0; i<w; i++)\
2253 2253
    {\
......
2280 2280
static void OPNAME ## h264_qpel8_hv_lowpass(uint8_t *dst, int16_t *tmp, uint8_t *src, int dstStride, int tmpStride, int srcStride){\
2281 2281
    const int h=8;\
2282 2282
    const int w=8;\
2283
    uint8_t *cm = cropTbl + MAX_NEG_CROP;\
2283
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
2284 2284
    int i;\
2285 2285
    src -= 2*srcStride;\
2286 2286
    for(i=0; i<h+5; i++)\
......
2582 2582
#undef H264_WEIGHT
2583 2583

  
2584 2584
static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){
2585
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
2585
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
2586 2586
    int i;
2587 2587

  
2588 2588
    for(i=0; i<h; i++){
......
2627 2627
#endif /* CONFIG_VC1_DECODER||CONFIG_WMV3_DECODER */
2628 2628

  
2629 2629
static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
2630
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
2630
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
2631 2631
    int i;
2632 2632

  
2633 2633
    for(i=0; i<w; i++){
......
3847 3847

  
3848 3848
static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block)
3849 3849
{
3850
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
3850
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
3851 3851

  
3852 3852
    dest[0] = cm[(block[0] + 4)>>3];
3853 3853
}
3854 3854
static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block)
3855 3855
{
3856
    uint8_t *cm = cropTbl + MAX_NEG_CROP;
3856
    uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
3857 3857

  
3858 3858
    dest[0] = cm[dest[0] + ((block[0] + 4)>>3)];
3859 3859
}
......
3865 3865
{
3866 3866
    int i;
3867 3867

  
3868
    for(i=0;i<256;i++) cropTbl[i + MAX_NEG_CROP] = i;
3868
    for(i=0;i<256;i++) ff_cropTbl[i + MAX_NEG_CROP] = i;
3869 3869
    for(i=0;i<MAX_NEG_CROP;i++) {
3870
        cropTbl[i] = 0;
3871
        cropTbl[i + MAX_NEG_CROP + 256] = 255;
3870
        ff_cropTbl[i] = 0;
3871
        ff_cropTbl[i + MAX_NEG_CROP + 256] = 255;
3872 3872
    }
3873 3873

  
3874 3874
    for(i=0;i<512;i++) {

Also available in: Unified diff