/src/ffmpeg/libavcodec/h264dsp_template.c
Line | Count | Source |
1 | | /* |
2 | | * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder |
3 | | * Copyright (c) 2003-2011 Michael Niedermayer <michaelni@gmx.at> |
4 | | * |
5 | | * This file is part of FFmpeg. |
6 | | * |
7 | | * FFmpeg is free software; you can redistribute it and/or |
8 | | * modify it under the terms of the GNU Lesser General Public |
9 | | * License as published by the Free Software Foundation; either |
10 | | * version 2.1 of the License, or (at your option) any later version. |
11 | | * |
12 | | * FFmpeg is distributed in the hope that it will be useful, |
13 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | | * Lesser General Public License for more details. |
16 | | * |
17 | | * You should have received a copy of the GNU Lesser General Public |
18 | | * License along with FFmpeg; if not, write to the Free Software |
19 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
20 | | */ |
21 | | |
22 | | /** |
23 | | * @file |
24 | | * H.264 / AVC / MPEG-4 part10 DSP functions. |
25 | | * @author Michael Niedermayer <michaelni@gmx.at> |
26 | | */ |
27 | | |
28 | | #include "bit_depth_template.c" |
29 | | |
30 | 14.4G | #define op_scale1(x) block[x] = av_clip_pixel( (block[x]*weight + offset) >> log2_denom ) |
31 | 990M | #define op_scale2(x) dst[x] = av_clip_pixel( (src[x]*weights + dst[x]*weightd + offset) >> (log2_denom+1)) |
32 | | #define H264_WEIGHT(W) \ |
33 | | static void FUNCC(weight_h264_pixels ## W)(uint8_t *_block, ptrdiff_t stride, int height, \ |
34 | 106M | int log2_denom, int weight, int offset) \ |
35 | 106M | { \ |
36 | 106M | int y; \ |
37 | 106M | pixel *block = (pixel*)_block; \ |
38 | 106M | stride >>= sizeof(pixel)-1; \ |
39 | 106M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ |
40 | 106M | if(log2_denom) offset += 1<<(log2_denom-1); \ |
41 | 1.32G | for (y = 0; y < height; y++, block += stride) { \ |
42 | 1.21G | op_scale1(0); \ |
43 | 1.21G | op_scale1(1); \ |
44 | 1.21G | if(W==2) continue; \ |
45 | 1.21G | op_scale1(2); \ |
46 | 1.19G | op_scale1(3); \ |
47 | 1.19G | if(W==4) continue; \ |
48 | 1.19G | op_scale1(4); \ |
49 | 1.12G | op_scale1(5); \ |
50 | 1.12G | op_scale1(6); \ |
51 | 1.12G | op_scale1(7); \ |
52 | 1.12G | if(W==8) continue; \ |
53 | 1.12G | op_scale1(8); \ |
54 | 553M | op_scale1(9); \ |
55 | 553M | op_scale1(10); \ |
56 | 553M | op_scale1(11); \ |
57 | 553M | op_scale1(12); \ |
58 | 553M | op_scale1(13); \ |
59 | 553M | op_scale1(14); \ |
60 | 553M | op_scale1(15); \ |
61 | 553M | } \ |
62 | 106M | } \ h264dsp.c:weight_h264_pixels16_9_c Line | Count | Source | 34 | 5.48M | int log2_denom, int weight, int offset) \ | 35 | 5.48M | { \ | 36 | 5.48M | int y; \ | 37 | 5.48M | pixel *block = (pixel*)_block; \ | 38 | 5.48M | stride >>= sizeof(pixel)-1; \ | 39 | 5.48M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 5.48M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 92.2M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 86.7M | op_scale1(0); \ | 43 | 86.7M | op_scale1(1); \ | 44 | 86.7M | if(W==2) continue; \ | 45 | 86.7M | op_scale1(2); \ | 46 | 86.7M | op_scale1(3); \ | 47 | 86.7M | if(W==4) continue; \ | 48 | 86.7M | op_scale1(4); \ | 49 | 86.7M | op_scale1(5); \ | 50 | 86.7M | op_scale1(6); \ | 51 | 86.7M | op_scale1(7); \ | 52 | 86.7M | if(W==8) continue; \ | 53 | 86.7M | op_scale1(8); \ | 54 | 86.7M | op_scale1(9); \ | 55 | 86.7M | op_scale1(10); \ | 56 | 86.7M | op_scale1(11); \ | 57 | 86.7M | op_scale1(12); \ | 58 | 86.7M | op_scale1(13); \ | 59 | 86.7M | op_scale1(14); \ | 60 | 86.7M | op_scale1(15); \ | 61 | 86.7M | } \ | 62 | 5.48M | } \ |
h264dsp.c:weight_h264_pixels8_9_c Line | Count | Source | 34 | 8.88M | int log2_denom, int weight, int offset) \ | 35 | 8.88M | { \ | 36 | 8.88M | int y; \ | 37 | 8.88M | pixel *block = (pixel*)_block; \ | 38 | 8.88M | stride >>= sizeof(pixel)-1; \ | 39 | 8.88M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 8.88M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 111M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 102M | op_scale1(0); \ | 43 | 102M | op_scale1(1); \ | 44 | 102M | if(W==2) continue; \ | 45 | 102M | op_scale1(2); \ | 46 | 102M | op_scale1(3); \ | 47 | 102M | if(W==4) continue; \ | 48 | 102M | op_scale1(4); \ | 49 | 102M | op_scale1(5); \ | 50 | 102M | op_scale1(6); \ | 51 | 102M | op_scale1(7); \ | 52 | 102M | if(W==8) continue; \ | 53 | 102M | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 8.88M | } \ |
h264dsp.c:weight_h264_pixels4_9_c Line | Count | Source | 34 | 1.31M | int log2_denom, int weight, int offset) \ | 35 | 1.31M | { \ | 36 | 1.31M | int y; \ | 37 | 1.31M | pixel *block = (pixel*)_block; \ | 38 | 1.31M | stride >>= sizeof(pixel)-1; \ | 39 | 1.31M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 1.31M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 9.23M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 7.92M | op_scale1(0); \ | 43 | 7.92M | op_scale1(1); \ | 44 | 7.92M | if(W==2) continue; \ | 45 | 7.92M | op_scale1(2); \ | 46 | 7.92M | op_scale1(3); \ | 47 | 7.92M | if(W==4) continue; \ | 48 | 7.92M | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 1.31M | } \ |
h264dsp.c:weight_h264_pixels2_9_c Line | Count | Source | 34 | 528k | int log2_denom, int weight, int offset) \ | 35 | 528k | { \ | 36 | 528k | int y; \ | 37 | 528k | pixel *block = (pixel*)_block; \ | 38 | 528k | stride >>= sizeof(pixel)-1; \ | 39 | 528k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 528k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 2.99M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 2.46M | op_scale1(0); \ | 43 | 2.46M | op_scale1(1); \ | 44 | 2.46M | if(W==2) continue; \ | 45 | 2.46M | op_scale1(2); \ | 46 | 0 | op_scale1(3); \ | 47 | 0 | if(W==4) continue; \ | 48 | 0 | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 528k | } \ |
h264dsp.c:weight_h264_pixels16_10_c Line | Count | Source | 34 | 15.9M | int log2_denom, int weight, int offset) \ | 35 | 15.9M | { \ | 36 | 15.9M | int y; \ | 37 | 15.9M | pixel *block = (pixel*)_block; \ | 38 | 15.9M | stride >>= sizeof(pixel)-1; \ | 39 | 15.9M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 15.9M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 268M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 252M | op_scale1(0); \ | 43 | 252M | op_scale1(1); \ | 44 | 252M | if(W==2) continue; \ | 45 | 252M | op_scale1(2); \ | 46 | 252M | op_scale1(3); \ | 47 | 252M | if(W==4) continue; \ | 48 | 252M | op_scale1(4); \ | 49 | 252M | op_scale1(5); \ | 50 | 252M | op_scale1(6); \ | 51 | 252M | op_scale1(7); \ | 52 | 252M | if(W==8) continue; \ | 53 | 252M | op_scale1(8); \ | 54 | 252M | op_scale1(9); \ | 55 | 252M | op_scale1(10); \ | 56 | 252M | op_scale1(11); \ | 57 | 252M | op_scale1(12); \ | 58 | 252M | op_scale1(13); \ | 59 | 252M | op_scale1(14); \ | 60 | 252M | op_scale1(15); \ | 61 | 252M | } \ | 62 | 15.9M | } \ |
h264dsp.c:weight_h264_pixels8_10_c Line | Count | Source | 34 | 22.3M | int log2_denom, int weight, int offset) \ | 35 | 22.3M | { \ | 36 | 22.3M | int y; \ | 37 | 22.3M | pixel *block = (pixel*)_block; \ | 38 | 22.3M | stride >>= sizeof(pixel)-1; \ | 39 | 22.3M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 22.3M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 271M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 248M | op_scale1(0); \ | 43 | 248M | op_scale1(1); \ | 44 | 248M | if(W==2) continue; \ | 45 | 248M | op_scale1(2); \ | 46 | 248M | op_scale1(3); \ | 47 | 248M | if(W==4) continue; \ | 48 | 248M | op_scale1(4); \ | 49 | 248M | op_scale1(5); \ | 50 | 248M | op_scale1(6); \ | 51 | 248M | op_scale1(7); \ | 52 | 248M | if(W==8) continue; \ | 53 | 248M | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 22.3M | } \ |
h264dsp.c:weight_h264_pixels4_10_c Line | Count | Source | 34 | 2.52M | int log2_denom, int weight, int offset) \ | 35 | 2.52M | { \ | 36 | 2.52M | int y; \ | 37 | 2.52M | pixel *block = (pixel*)_block; \ | 38 | 2.52M | stride >>= sizeof(pixel)-1; \ | 39 | 2.52M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 2.52M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 13.4M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 10.9M | op_scale1(0); \ | 43 | 10.9M | op_scale1(1); \ | 44 | 10.9M | if(W==2) continue; \ | 45 | 10.9M | op_scale1(2); \ | 46 | 10.9M | op_scale1(3); \ | 47 | 10.9M | if(W==4) continue; \ | 48 | 10.9M | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 2.52M | } \ |
h264dsp.c:weight_h264_pixels2_10_c Line | Count | Source | 34 | 779k | int log2_denom, int weight, int offset) \ | 35 | 779k | { \ | 36 | 779k | int y; \ | 37 | 779k | pixel *block = (pixel*)_block; \ | 38 | 779k | stride >>= sizeof(pixel)-1; \ | 39 | 779k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 779k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 3.71M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 2.93M | op_scale1(0); \ | 43 | 2.93M | op_scale1(1); \ | 44 | 2.93M | if(W==2) continue; \ | 45 | 2.93M | op_scale1(2); \ | 46 | 0 | op_scale1(3); \ | 47 | 0 | if(W==4) continue; \ | 48 | 0 | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 779k | } \ |
h264dsp.c:weight_h264_pixels16_12_c Line | Count | Source | 34 | 1.55M | int log2_denom, int weight, int offset) \ | 35 | 1.55M | { \ | 36 | 1.55M | int y; \ | 37 | 1.55M | pixel *block = (pixel*)_block; \ | 38 | 1.55M | stride >>= sizeof(pixel)-1; \ | 39 | 1.55M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 1.55M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 24.1M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 22.5M | op_scale1(0); \ | 43 | 22.5M | op_scale1(1); \ | 44 | 22.5M | if(W==2) continue; \ | 45 | 22.5M | op_scale1(2); \ | 46 | 22.5M | op_scale1(3); \ | 47 | 22.5M | if(W==4) continue; \ | 48 | 22.5M | op_scale1(4); \ | 49 | 22.5M | op_scale1(5); \ | 50 | 22.5M | op_scale1(6); \ | 51 | 22.5M | op_scale1(7); \ | 52 | 22.5M | if(W==8) continue; \ | 53 | 22.5M | op_scale1(8); \ | 54 | 22.5M | op_scale1(9); \ | 55 | 22.5M | op_scale1(10); \ | 56 | 22.5M | op_scale1(11); \ | 57 | 22.5M | op_scale1(12); \ | 58 | 22.5M | op_scale1(13); \ | 59 | 22.5M | op_scale1(14); \ | 60 | 22.5M | op_scale1(15); \ | 61 | 22.5M | } \ | 62 | 1.55M | } \ |
h264dsp.c:weight_h264_pixels8_12_c Line | Count | Source | 34 | 3.67M | int log2_denom, int weight, int offset) \ | 35 | 3.67M | { \ | 36 | 3.67M | int y; \ | 37 | 3.67M | pixel *block = (pixel*)_block; \ | 38 | 3.67M | stride >>= sizeof(pixel)-1; \ | 39 | 3.67M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 3.67M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 43.8M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 40.1M | op_scale1(0); \ | 43 | 40.1M | op_scale1(1); \ | 44 | 40.1M | if(W==2) continue; \ | 45 | 40.1M | op_scale1(2); \ | 46 | 40.1M | op_scale1(3); \ | 47 | 40.1M | if(W==4) continue; \ | 48 | 40.1M | op_scale1(4); \ | 49 | 40.1M | op_scale1(5); \ | 50 | 40.1M | op_scale1(6); \ | 51 | 40.1M | op_scale1(7); \ | 52 | 40.1M | if(W==8) continue; \ | 53 | 40.1M | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 3.67M | } \ |
h264dsp.c:weight_h264_pixels4_12_c Line | Count | Source | 34 | 3.16M | int log2_denom, int weight, int offset) \ | 35 | 3.16M | { \ | 36 | 3.16M | int y; \ | 37 | 3.16M | pixel *block = (pixel*)_block; \ | 38 | 3.16M | stride >>= sizeof(pixel)-1; \ | 39 | 3.16M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 3.16M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 21.7M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 18.5M | op_scale1(0); \ | 43 | 18.5M | op_scale1(1); \ | 44 | 18.5M | if(W==2) continue; \ | 45 | 18.5M | op_scale1(2); \ | 46 | 18.5M | op_scale1(3); \ | 47 | 18.5M | if(W==4) continue; \ | 48 | 18.5M | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 3.16M | } \ |
h264dsp.c:weight_h264_pixels2_12_c Line | Count | Source | 34 | 2.05M | int log2_denom, int weight, int offset) \ | 35 | 2.05M | { \ | 36 | 2.05M | int y; \ | 37 | 2.05M | pixel *block = (pixel*)_block; \ | 38 | 2.05M | stride >>= sizeof(pixel)-1; \ | 39 | 2.05M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 2.05M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 10.6M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 8.63M | op_scale1(0); \ | 43 | 8.63M | op_scale1(1); \ | 44 | 8.63M | if(W==2) continue; \ | 45 | 8.63M | op_scale1(2); \ | 46 | 0 | op_scale1(3); \ | 47 | 0 | if(W==4) continue; \ | 48 | 0 | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 2.05M | } \ |
h264dsp.c:weight_h264_pixels16_14_c Line | Count | Source | 34 | 541k | int log2_denom, int weight, int offset) \ | 35 | 541k | { \ | 36 | 541k | int y; \ | 37 | 541k | pixel *block = (pixel*)_block; \ | 38 | 541k | stride >>= sizeof(pixel)-1; \ | 39 | 541k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 541k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 8.85M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 8.31M | op_scale1(0); \ | 43 | 8.31M | op_scale1(1); \ | 44 | 8.31M | if(W==2) continue; \ | 45 | 8.31M | op_scale1(2); \ | 46 | 8.31M | op_scale1(3); \ | 47 | 8.31M | if(W==4) continue; \ | 48 | 8.31M | op_scale1(4); \ | 49 | 8.31M | op_scale1(5); \ | 50 | 8.31M | op_scale1(6); \ | 51 | 8.31M | op_scale1(7); \ | 52 | 8.31M | if(W==8) continue; \ | 53 | 8.31M | op_scale1(8); \ | 54 | 8.31M | op_scale1(9); \ | 55 | 8.31M | op_scale1(10); \ | 56 | 8.31M | op_scale1(11); \ | 57 | 8.31M | op_scale1(12); \ | 58 | 8.31M | op_scale1(13); \ | 59 | 8.31M | op_scale1(14); \ | 60 | 8.31M | op_scale1(15); \ | 61 | 8.31M | } \ | 62 | 541k | } \ |
h264dsp.c:weight_h264_pixels8_14_c Line | Count | Source | 34 | 881k | int log2_denom, int weight, int offset) \ | 35 | 881k | { \ | 36 | 881k | int y; \ | 37 | 881k | pixel *block = (pixel*)_block; \ | 38 | 881k | stride >>= sizeof(pixel)-1; \ | 39 | 881k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 881k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 11.1M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 10.2M | op_scale1(0); \ | 43 | 10.2M | op_scale1(1); \ | 44 | 10.2M | if(W==2) continue; \ | 45 | 10.2M | op_scale1(2); \ | 46 | 10.2M | op_scale1(3); \ | 47 | 10.2M | if(W==4) continue; \ | 48 | 10.2M | op_scale1(4); \ | 49 | 10.2M | op_scale1(5); \ | 50 | 10.2M | op_scale1(6); \ | 51 | 10.2M | op_scale1(7); \ | 52 | 10.2M | if(W==8) continue; \ | 53 | 10.2M | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 881k | } \ |
h264dsp.c:weight_h264_pixels4_14_c Line | Count | Source | 34 | 569k | int log2_denom, int weight, int offset) \ | 35 | 569k | { \ | 36 | 569k | int y; \ | 37 | 569k | pixel *block = (pixel*)_block; \ | 38 | 569k | stride >>= sizeof(pixel)-1; \ | 39 | 569k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 569k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 4.74M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 4.17M | op_scale1(0); \ | 43 | 4.17M | op_scale1(1); \ | 44 | 4.17M | if(W==2) continue; \ | 45 | 4.17M | op_scale1(2); \ | 46 | 4.17M | op_scale1(3); \ | 47 | 4.17M | if(W==4) continue; \ | 48 | 4.17M | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 569k | } \ |
h264dsp.c:weight_h264_pixels2_14_c Line | Count | Source | 34 | 171k | int log2_denom, int weight, int offset) \ | 35 | 171k | { \ | 36 | 171k | int y; \ | 37 | 171k | pixel *block = (pixel*)_block; \ | 38 | 171k | stride >>= sizeof(pixel)-1; \ | 39 | 171k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 171k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 1.15M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 988k | op_scale1(0); \ | 43 | 988k | op_scale1(1); \ | 44 | 988k | if(W==2) continue; \ | 45 | 988k | op_scale1(2); \ | 46 | 0 | op_scale1(3); \ | 47 | 0 | if(W==4) continue; \ | 48 | 0 | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 171k | } \ |
h264dsp.c:weight_h264_pixels16_8_c Line | Count | Source | 34 | 11.6M | int log2_denom, int weight, int offset) \ | 35 | 11.6M | { \ | 36 | 11.6M | int y; \ | 37 | 11.6M | pixel *block = (pixel*)_block; \ | 38 | 11.6M | stride >>= sizeof(pixel)-1; \ | 39 | 11.6M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 11.6M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 195M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 183M | op_scale1(0); \ | 43 | 183M | op_scale1(1); \ | 44 | 183M | if(W==2) continue; \ | 45 | 183M | op_scale1(2); \ | 46 | 183M | op_scale1(3); \ | 47 | 183M | if(W==4) continue; \ | 48 | 183M | op_scale1(4); \ | 49 | 183M | op_scale1(5); \ | 50 | 183M | op_scale1(6); \ | 51 | 183M | op_scale1(7); \ | 52 | 183M | if(W==8) continue; \ | 53 | 183M | op_scale1(8); \ | 54 | 183M | op_scale1(9); \ | 55 | 183M | op_scale1(10); \ | 56 | 183M | op_scale1(11); \ | 57 | 183M | op_scale1(12); \ | 58 | 183M | op_scale1(13); \ | 59 | 183M | op_scale1(14); \ | 60 | 183M | op_scale1(15); \ | 61 | 183M | } \ | 62 | 11.6M | } \ |
h264dsp.c:weight_h264_pixels8_8_c Line | Count | Source | 34 | 18.5M | int log2_denom, int weight, int offset) \ | 35 | 18.5M | { \ | 36 | 18.5M | int y; \ | 37 | 18.5M | pixel *block = (pixel*)_block; \ | 38 | 18.5M | stride >>= sizeof(pixel)-1; \ | 39 | 18.5M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 18.5M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 187M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 169M | op_scale1(0); \ | 43 | 169M | op_scale1(1); \ | 44 | 169M | if(W==2) continue; \ | 45 | 169M | op_scale1(2); \ | 46 | 169M | op_scale1(3); \ | 47 | 169M | if(W==4) continue; \ | 48 | 169M | op_scale1(4); \ | 49 | 169M | op_scale1(5); \ | 50 | 169M | op_scale1(6); \ | 51 | 169M | op_scale1(7); \ | 52 | 169M | if(W==8) continue; \ | 53 | 169M | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 18.5M | } \ |
h264dsp.c:weight_h264_pixels4_8_c Line | Count | Source | 34 | 4.71M | int log2_denom, int weight, int offset) \ | 35 | 4.71M | { \ | 36 | 4.71M | int y; \ | 37 | 4.71M | pixel *block = (pixel*)_block; \ | 38 | 4.71M | stride >>= sizeof(pixel)-1; \ | 39 | 4.71M | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 4.71M | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 37.5M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 32.8M | op_scale1(0); \ | 43 | 32.8M | op_scale1(1); \ | 44 | 32.8M | if(W==2) continue; \ | 45 | 32.8M | op_scale1(2); \ | 46 | 32.8M | op_scale1(3); \ | 47 | 32.8M | if(W==4) continue; \ | 48 | 32.8M | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 4.71M | } \ |
h264dsp.c:weight_h264_pixels2_8_c Line | Count | Source | 34 | 819k | int log2_denom, int weight, int offset) \ | 35 | 819k | { \ | 36 | 819k | int y; \ | 37 | 819k | pixel *block = (pixel*)_block; \ | 38 | 819k | stride >>= sizeof(pixel)-1; \ | 39 | 819k | offset = (unsigned)offset << (log2_denom + (BIT_DEPTH-8)); \ | 40 | 819k | if(log2_denom) offset += 1<<(log2_denom-1); \ | 41 | 4.12M | for (y = 0; y < height; y++, block += stride) { \ | 42 | 3.30M | op_scale1(0); \ | 43 | 3.30M | op_scale1(1); \ | 44 | 3.30M | if(W==2) continue; \ | 45 | 3.30M | op_scale1(2); \ | 46 | 0 | op_scale1(3); \ | 47 | 0 | if(W==4) continue; \ | 48 | 0 | op_scale1(4); \ | 49 | 0 | op_scale1(5); \ | 50 | 0 | op_scale1(6); \ | 51 | 0 | op_scale1(7); \ | 52 | 0 | if(W==8) continue; \ | 53 | 0 | op_scale1(8); \ | 54 | 0 | op_scale1(9); \ | 55 | 0 | op_scale1(10); \ | 56 | 0 | op_scale1(11); \ | 57 | 0 | op_scale1(12); \ | 58 | 0 | op_scale1(13); \ | 59 | 0 | op_scale1(14); \ | 60 | 0 | op_scale1(15); \ | 61 | 0 | } \ | 62 | 819k | } \ |
|
63 | | static void FUNCC(biweight_h264_pixels ## W)(uint8_t *_dst, uint8_t *_src, ptrdiff_t stride, int height, \ |
64 | 14.9M | int log2_denom, int weightd, int weights, int offset) \ |
65 | 14.9M | { \ |
66 | 14.9M | int y; \ |
67 | 14.9M | pixel *dst = (pixel*)_dst; \ |
68 | 14.9M | pixel *src = (pixel*)_src; \ |
69 | 14.9M | stride >>= sizeof(pixel)-1; \ |
70 | 14.9M | offset = (unsigned)offset << (BIT_DEPTH-8); \ |
71 | 14.9M | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ |
72 | 128M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ |
73 | 113M | op_scale2(0); \ |
74 | 113M | op_scale2(1); \ |
75 | 113M | if(W==2) continue; \ |
76 | 113M | op_scale2(2); \ |
77 | 109M | op_scale2(3); \ |
78 | 109M | if(W==4) continue; \ |
79 | 109M | op_scale2(4); \ |
80 | 75.8M | op_scale2(5); \ |
81 | 75.8M | op_scale2(6); \ |
82 | 75.8M | op_scale2(7); \ |
83 | 75.8M | if(W==8) continue; \ |
84 | 75.8M | op_scale2(8); \ |
85 | 18.3M | op_scale2(9); \ |
86 | 18.3M | op_scale2(10); \ |
87 | 18.3M | op_scale2(11); \ |
88 | 18.3M | op_scale2(12); \ |
89 | 18.3M | op_scale2(13); \ |
90 | 18.3M | op_scale2(14); \ |
91 | 18.3M | op_scale2(15); \ |
92 | 18.3M | } \ |
93 | 14.9M | } h264dsp.c:biweight_h264_pixels16_9_c Line | Count | Source | 64 | 151k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 151k | { \ | 66 | 151k | int y; \ | 67 | 151k | pixel *dst = (pixel*)_dst; \ | 68 | 151k | pixel *src = (pixel*)_src; \ | 69 | 151k | stride >>= sizeof(pixel)-1; \ | 70 | 151k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 151k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 2.44M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 2.28M | op_scale2(0); \ | 74 | 2.28M | op_scale2(1); \ | 75 | 2.28M | if(W==2) continue; \ | 76 | 2.28M | op_scale2(2); \ | 77 | 2.28M | op_scale2(3); \ | 78 | 2.28M | if(W==4) continue; \ | 79 | 2.28M | op_scale2(4); \ | 80 | 2.28M | op_scale2(5); \ | 81 | 2.28M | op_scale2(6); \ | 82 | 2.28M | op_scale2(7); \ | 83 | 2.28M | if(W==8) continue; \ | 84 | 2.28M | op_scale2(8); \ | 85 | 2.28M | op_scale2(9); \ | 86 | 2.28M | op_scale2(10); \ | 87 | 2.28M | op_scale2(11); \ | 88 | 2.28M | op_scale2(12); \ | 89 | 2.28M | op_scale2(13); \ | 90 | 2.28M | op_scale2(14); \ | 91 | 2.28M | op_scale2(15); \ | 92 | 2.28M | } \ | 93 | 151k | } |
h264dsp.c:biweight_h264_pixels8_9_c Line | Count | Source | 64 | 572k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 572k | { \ | 66 | 572k | int y; \ | 67 | 572k | pixel *dst = (pixel*)_dst; \ | 68 | 572k | pixel *src = (pixel*)_src; \ | 69 | 572k | stride >>= sizeof(pixel)-1; \ | 70 | 572k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 572k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 6.20M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 5.63M | op_scale2(0); \ | 74 | 5.63M | op_scale2(1); \ | 75 | 5.63M | if(W==2) continue; \ | 76 | 5.63M | op_scale2(2); \ | 77 | 5.63M | op_scale2(3); \ | 78 | 5.63M | if(W==4) continue; \ | 79 | 5.63M | op_scale2(4); \ | 80 | 5.63M | op_scale2(5); \ | 81 | 5.63M | op_scale2(6); \ | 82 | 5.63M | op_scale2(7); \ | 83 | 5.63M | if(W==8) continue; \ | 84 | 5.63M | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 572k | } |
h264dsp.c:biweight_h264_pixels4_9_c Line | Count | Source | 64 | 885k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 885k | { \ | 66 | 885k | int y; \ | 67 | 885k | pixel *dst = (pixel*)_dst; \ | 68 | 885k | pixel *src = (pixel*)_src; \ | 69 | 885k | stride >>= sizeof(pixel)-1; \ | 70 | 885k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 885k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 4.90M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 4.02M | op_scale2(0); \ | 74 | 4.02M | op_scale2(1); \ | 75 | 4.02M | if(W==2) continue; \ | 76 | 4.02M | op_scale2(2); \ | 77 | 4.02M | op_scale2(3); \ | 78 | 4.02M | if(W==4) continue; \ | 79 | 4.02M | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 885k | } |
h264dsp.c:biweight_h264_pixels2_9_c Line | Count | Source | 64 | 146k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 146k | { \ | 66 | 146k | int y; \ | 67 | 146k | pixel *dst = (pixel*)_dst; \ | 68 | 146k | pixel *src = (pixel*)_src; \ | 69 | 146k | stride >>= sizeof(pixel)-1; \ | 70 | 146k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 146k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 719k | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 573k | op_scale2(0); \ | 74 | 573k | op_scale2(1); \ | 75 | 573k | if(W==2) continue; \ | 76 | 573k | op_scale2(2); \ | 77 | 0 | op_scale2(3); \ | 78 | 0 | if(W==4) continue; \ | 79 | 0 | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 146k | } |
h264dsp.c:biweight_h264_pixels16_10_c Line | Count | Source | 64 | 690k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 690k | { \ | 66 | 690k | int y; \ | 67 | 690k | pixel *dst = (pixel*)_dst; \ | 68 | 690k | pixel *src = (pixel*)_src; \ | 69 | 690k | stride >>= sizeof(pixel)-1; \ | 70 | 690k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 690k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 11.3M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 10.6M | op_scale2(0); \ | 74 | 10.6M | op_scale2(1); \ | 75 | 10.6M | if(W==2) continue; \ | 76 | 10.6M | op_scale2(2); \ | 77 | 10.6M | op_scale2(3); \ | 78 | 10.6M | if(W==4) continue; \ | 79 | 10.6M | op_scale2(4); \ | 80 | 10.6M | op_scale2(5); \ | 81 | 10.6M | op_scale2(6); \ | 82 | 10.6M | op_scale2(7); \ | 83 | 10.6M | if(W==8) continue; \ | 84 | 10.6M | op_scale2(8); \ | 85 | 10.6M | op_scale2(9); \ | 86 | 10.6M | op_scale2(10); \ | 87 | 10.6M | op_scale2(11); \ | 88 | 10.6M | op_scale2(12); \ | 89 | 10.6M | op_scale2(13); \ | 90 | 10.6M | op_scale2(14); \ | 91 | 10.6M | op_scale2(15); \ | 92 | 10.6M | } \ | 93 | 690k | } |
h264dsp.c:biweight_h264_pixels8_10_c Line | Count | Source | 64 | 3.17M | int log2_denom, int weightd, int weights, int offset) \ | 65 | 3.17M | { \ | 66 | 3.17M | int y; \ | 67 | 3.17M | pixel *dst = (pixel*)_dst; \ | 68 | 3.17M | pixel *src = (pixel*)_src; \ | 69 | 3.17M | stride >>= sizeof(pixel)-1; \ | 70 | 3.17M | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 3.17M | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 37.0M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 33.8M | op_scale2(0); \ | 74 | 33.8M | op_scale2(1); \ | 75 | 33.8M | if(W==2) continue; \ | 76 | 33.8M | op_scale2(2); \ | 77 | 33.8M | op_scale2(3); \ | 78 | 33.8M | if(W==4) continue; \ | 79 | 33.8M | op_scale2(4); \ | 80 | 33.8M | op_scale2(5); \ | 81 | 33.8M | op_scale2(6); \ | 82 | 33.8M | op_scale2(7); \ | 83 | 33.8M | if(W==8) continue; \ | 84 | 33.8M | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 3.17M | } |
h264dsp.c:biweight_h264_pixels4_10_c Line | Count | Source | 64 | 3.57M | int log2_denom, int weightd, int weights, int offset) \ | 65 | 3.57M | { \ | 66 | 3.57M | int y; \ | 67 | 3.57M | pixel *dst = (pixel*)_dst; \ | 68 | 3.57M | pixel *src = (pixel*)_src; \ | 69 | 3.57M | stride >>= sizeof(pixel)-1; \ | 70 | 3.57M | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 3.57M | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 19.2M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 15.6M | op_scale2(0); \ | 74 | 15.6M | op_scale2(1); \ | 75 | 15.6M | if(W==2) continue; \ | 76 | 15.6M | op_scale2(2); \ | 77 | 15.6M | op_scale2(3); \ | 78 | 15.6M | if(W==4) continue; \ | 79 | 15.6M | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 3.57M | } |
h264dsp.c:biweight_h264_pixels2_10_c Line | Count | Source | 64 | 112k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 112k | { \ | 66 | 112k | int y; \ | 67 | 112k | pixel *dst = (pixel*)_dst; \ | 68 | 112k | pixel *src = (pixel*)_src; \ | 69 | 112k | stride >>= sizeof(pixel)-1; \ | 70 | 112k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 112k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 422k | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 309k | op_scale2(0); \ | 74 | 309k | op_scale2(1); \ | 75 | 309k | if(W==2) continue; \ | 76 | 309k | op_scale2(2); \ | 77 | 0 | op_scale2(3); \ | 78 | 0 | if(W==4) continue; \ | 79 | 0 | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 112k | } |
h264dsp.c:biweight_h264_pixels16_12_c Line | Count | Source | 64 | 89.2k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 89.2k | { \ | 66 | 89.2k | int y; \ | 67 | 89.2k | pixel *dst = (pixel*)_dst; \ | 68 | 89.2k | pixel *src = (pixel*)_src; \ | 69 | 89.2k | stride >>= sizeof(pixel)-1; \ | 70 | 89.2k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 89.2k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 1.43M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 1.34M | op_scale2(0); \ | 74 | 1.34M | op_scale2(1); \ | 75 | 1.34M | if(W==2) continue; \ | 76 | 1.34M | op_scale2(2); \ | 77 | 1.34M | op_scale2(3); \ | 78 | 1.34M | if(W==4) continue; \ | 79 | 1.34M | op_scale2(4); \ | 80 | 1.34M | op_scale2(5); \ | 81 | 1.34M | op_scale2(6); \ | 82 | 1.34M | op_scale2(7); \ | 83 | 1.34M | if(W==8) continue; \ | 84 | 1.34M | op_scale2(8); \ | 85 | 1.34M | op_scale2(9); \ | 86 | 1.34M | op_scale2(10); \ | 87 | 1.34M | op_scale2(11); \ | 88 | 1.34M | op_scale2(12); \ | 89 | 1.34M | op_scale2(13); \ | 90 | 1.34M | op_scale2(14); \ | 91 | 1.34M | op_scale2(15); \ | 92 | 1.34M | } \ | 93 | 89.2k | } |
h264dsp.c:biweight_h264_pixels8_12_c Line | Count | Source | 64 | 351k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 351k | { \ | 66 | 351k | int y; \ | 67 | 351k | pixel *dst = (pixel*)_dst; \ | 68 | 351k | pixel *src = (pixel*)_src; \ | 69 | 351k | stride >>= sizeof(pixel)-1; \ | 70 | 351k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 351k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 3.67M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 3.32M | op_scale2(0); \ | 74 | 3.32M | op_scale2(1); \ | 75 | 3.32M | if(W==2) continue; \ | 76 | 3.32M | op_scale2(2); \ | 77 | 3.32M | op_scale2(3); \ | 78 | 3.32M | if(W==4) continue; \ | 79 | 3.32M | op_scale2(4); \ | 80 | 3.32M | op_scale2(5); \ | 81 | 3.32M | op_scale2(6); \ | 82 | 3.32M | op_scale2(7); \ | 83 | 3.32M | if(W==8) continue; \ | 84 | 3.32M | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 351k | } |
h264dsp.c:biweight_h264_pixels4_12_c Line | Count | Source | 64 | 421k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 421k | { \ | 66 | 421k | int y; \ | 67 | 421k | pixel *dst = (pixel*)_dst; \ | 68 | 421k | pixel *src = (pixel*)_src; \ | 69 | 421k | stride >>= sizeof(pixel)-1; \ | 70 | 421k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 421k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 3.18M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 2.75M | op_scale2(0); \ | 74 | 2.75M | op_scale2(1); \ | 75 | 2.75M | if(W==2) continue; \ | 76 | 2.75M | op_scale2(2); \ | 77 | 2.75M | op_scale2(3); \ | 78 | 2.75M | if(W==4) continue; \ | 79 | 2.75M | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 421k | } |
h264dsp.c:biweight_h264_pixels2_12_c Line | Count | Source | 64 | 205k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 205k | { \ | 66 | 205k | int y; \ | 67 | 205k | pixel *dst = (pixel*)_dst; \ | 68 | 205k | pixel *src = (pixel*)_src; \ | 69 | 205k | stride >>= sizeof(pixel)-1; \ | 70 | 205k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 205k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 944k | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 739k | op_scale2(0); \ | 74 | 739k | op_scale2(1); \ | 75 | 739k | if(W==2) continue; \ | 76 | 739k | op_scale2(2); \ | 77 | 0 | op_scale2(3); \ | 78 | 0 | if(W==4) continue; \ | 79 | 0 | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 205k | } |
h264dsp.c:biweight_h264_pixels16_14_c Line | Count | Source | 64 | 62.0k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 62.0k | { \ | 66 | 62.0k | int y; \ | 67 | 62.0k | pixel *dst = (pixel*)_dst; \ | 68 | 62.0k | pixel *src = (pixel*)_src; \ | 69 | 62.0k | stride >>= sizeof(pixel)-1; \ | 70 | 62.0k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 62.0k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 936k | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 873k | op_scale2(0); \ | 74 | 873k | op_scale2(1); \ | 75 | 873k | if(W==2) continue; \ | 76 | 873k | op_scale2(2); \ | 77 | 873k | op_scale2(3); \ | 78 | 873k | if(W==4) continue; \ | 79 | 873k | op_scale2(4); \ | 80 | 873k | op_scale2(5); \ | 81 | 873k | op_scale2(6); \ | 82 | 873k | op_scale2(7); \ | 83 | 873k | if(W==8) continue; \ | 84 | 873k | op_scale2(8); \ | 85 | 873k | op_scale2(9); \ | 86 | 873k | op_scale2(10); \ | 87 | 873k | op_scale2(11); \ | 88 | 873k | op_scale2(12); \ | 89 | 873k | op_scale2(13); \ | 90 | 873k | op_scale2(14); \ | 91 | 873k | op_scale2(15); \ | 92 | 873k | } \ | 93 | 62.0k | } |
h264dsp.c:biweight_h264_pixels8_14_c Line | Count | Source | 64 | 458k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 458k | { \ | 66 | 458k | int y; \ | 67 | 458k | pixel *dst = (pixel*)_dst; \ | 68 | 458k | pixel *src = (pixel*)_src; \ | 69 | 458k | stride >>= sizeof(pixel)-1; \ | 70 | 458k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 458k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 4.91M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 4.45M | op_scale2(0); \ | 74 | 4.45M | op_scale2(1); \ | 75 | 4.45M | if(W==2) continue; \ | 76 | 4.45M | op_scale2(2); \ | 77 | 4.45M | op_scale2(3); \ | 78 | 4.45M | if(W==4) continue; \ | 79 | 4.45M | op_scale2(4); \ | 80 | 4.45M | op_scale2(5); \ | 81 | 4.45M | op_scale2(6); \ | 82 | 4.45M | op_scale2(7); \ | 83 | 4.45M | if(W==8) continue; \ | 84 | 4.45M | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 458k | } |
h264dsp.c:biweight_h264_pixels4_14_c Line | Count | Source | 64 | 862k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 862k | { \ | 66 | 862k | int y; \ | 67 | 862k | pixel *dst = (pixel*)_dst; \ | 68 | 862k | pixel *src = (pixel*)_src; \ | 69 | 862k | stride >>= sizeof(pixel)-1; \ | 70 | 862k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 862k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 6.73M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 5.87M | op_scale2(0); \ | 74 | 5.87M | op_scale2(1); \ | 75 | 5.87M | if(W==2) continue; \ | 76 | 5.87M | op_scale2(2); \ | 77 | 5.87M | op_scale2(3); \ | 78 | 5.87M | if(W==4) continue; \ | 79 | 5.87M | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 862k | } |
h264dsp.c:biweight_h264_pixels2_14_c Line | Count | Source | 64 | 578k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 578k | { \ | 66 | 578k | int y; \ | 67 | 578k | pixel *dst = (pixel*)_dst; \ | 68 | 578k | pixel *src = (pixel*)_src; \ | 69 | 578k | stride >>= sizeof(pixel)-1; \ | 70 | 578k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 578k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 2.16M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 1.58M | op_scale2(0); \ | 74 | 1.58M | op_scale2(1); \ | 75 | 1.58M | if(W==2) continue; \ | 76 | 1.58M | op_scale2(2); \ | 77 | 0 | op_scale2(3); \ | 78 | 0 | if(W==4) continue; \ | 79 | 0 | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 578k | } |
h264dsp.c:biweight_h264_pixels16_8_c Line | Count | Source | 64 | 209k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 209k | { \ | 66 | 209k | int y; \ | 67 | 209k | pixel *dst = (pixel*)_dst; \ | 68 | 209k | pixel *src = (pixel*)_src; \ | 69 | 209k | stride >>= sizeof(pixel)-1; \ | 70 | 209k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 209k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 3.43M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 3.22M | op_scale2(0); \ | 74 | 3.22M | op_scale2(1); \ | 75 | 3.22M | if(W==2) continue; \ | 76 | 3.22M | op_scale2(2); \ | 77 | 3.22M | op_scale2(3); \ | 78 | 3.22M | if(W==4) continue; \ | 79 | 3.22M | op_scale2(4); \ | 80 | 3.22M | op_scale2(5); \ | 81 | 3.22M | op_scale2(6); \ | 82 | 3.22M | op_scale2(7); \ | 83 | 3.22M | if(W==8) continue; \ | 84 | 3.22M | op_scale2(8); \ | 85 | 3.22M | op_scale2(9); \ | 86 | 3.22M | op_scale2(10); \ | 87 | 3.22M | op_scale2(11); \ | 88 | 3.22M | op_scale2(12); \ | 89 | 3.22M | op_scale2(13); \ | 90 | 3.22M | op_scale2(14); \ | 91 | 3.22M | op_scale2(15); \ | 92 | 3.22M | } \ | 93 | 209k | } |
h264dsp.c:biweight_h264_pixels8_8_c Line | Count | Source | 64 | 1.17M | int log2_denom, int weightd, int weights, int offset) \ | 65 | 1.17M | { \ | 66 | 1.17M | int y; \ | 67 | 1.17M | pixel *dst = (pixel*)_dst; \ | 68 | 1.17M | pixel *src = (pixel*)_src; \ | 69 | 1.17M | stride >>= sizeof(pixel)-1; \ | 70 | 1.17M | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 1.17M | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 11.4M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 10.2M | op_scale2(0); \ | 74 | 10.2M | op_scale2(1); \ | 75 | 10.2M | if(W==2) continue; \ | 76 | 10.2M | op_scale2(2); \ | 77 | 10.2M | op_scale2(3); \ | 78 | 10.2M | if(W==4) continue; \ | 79 | 10.2M | op_scale2(4); \ | 80 | 10.2M | op_scale2(5); \ | 81 | 10.2M | op_scale2(6); \ | 82 | 10.2M | op_scale2(7); \ | 83 | 10.2M | if(W==8) continue; \ | 84 | 10.2M | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 1.17M | } |
h264dsp.c:biweight_h264_pixels4_8_c Line | Count | Source | 64 | 1.05M | int log2_denom, int weightd, int weights, int offset) \ | 65 | 1.05M | { \ | 66 | 1.05M | int y; \ | 67 | 1.05M | pixel *dst = (pixel*)_dst; \ | 68 | 1.05M | pixel *src = (pixel*)_src; \ | 69 | 1.05M | stride >>= sizeof(pixel)-1; \ | 70 | 1.05M | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 1.05M | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 6.34M | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 5.29M | op_scale2(0); \ | 74 | 5.29M | op_scale2(1); \ | 75 | 5.29M | if(W==2) continue; \ | 76 | 5.29M | op_scale2(2); \ | 77 | 5.29M | op_scale2(3); \ | 78 | 5.29M | if(W==4) continue; \ | 79 | 5.29M | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 1.05M | } |
h264dsp.c:biweight_h264_pixels2_8_c Line | Count | Source | 64 | 187k | int log2_denom, int weightd, int weights, int offset) \ | 65 | 187k | { \ | 66 | 187k | int y; \ | 67 | 187k | pixel *dst = (pixel*)_dst; \ | 68 | 187k | pixel *src = (pixel*)_src; \ | 69 | 187k | stride >>= sizeof(pixel)-1; \ | 70 | 187k | offset = (unsigned)offset << (BIT_DEPTH-8); \ | 71 | 187k | offset = (unsigned)((offset + 1) | 1) << log2_denom; \ | 72 | 605k | for (y = 0; y < height; y++, dst += stride, src += stride) { \ | 73 | 417k | op_scale2(0); \ | 74 | 417k | op_scale2(1); \ | 75 | 417k | if(W==2) continue; \ | 76 | 417k | op_scale2(2); \ | 77 | 0 | op_scale2(3); \ | 78 | 0 | if(W==4) continue; \ | 79 | 0 | op_scale2(4); \ | 80 | 0 | op_scale2(5); \ | 81 | 0 | op_scale2(6); \ | 82 | 0 | op_scale2(7); \ | 83 | 0 | if(W==8) continue; \ | 84 | 0 | op_scale2(8); \ | 85 | 0 | op_scale2(9); \ | 86 | 0 | op_scale2(10); \ | 87 | 0 | op_scale2(11); \ | 88 | 0 | op_scale2(12); \ | 89 | 0 | op_scale2(13); \ | 90 | 0 | op_scale2(14); \ | 91 | 0 | op_scale2(15); \ | 92 | 0 | } \ | 93 | 187k | } |
|
94 | | |
95 | | H264_WEIGHT(16) |
96 | | H264_WEIGHT(8) |
97 | | H264_WEIGHT(4) |
98 | | H264_WEIGHT(2) |
99 | | |
100 | | #undef op_scale1 |
101 | | #undef op_scale2 |
102 | | #undef H264_WEIGHT |
103 | | |
104 | | static av_always_inline av_flatten void FUNCC(h264_loop_filter_luma)(uint8_t *p_pix, ptrdiff_t xstride, ptrdiff_t ystride, int inner_iters, int alpha, int beta, int8_t *tc0) |
105 | 51.5M | { |
106 | 51.5M | pixel *pix = (pixel*)p_pix; |
107 | 51.5M | int i, d; |
108 | 51.5M | xstride >>= sizeof(pixel)-1; |
109 | 51.5M | ystride >>= sizeof(pixel)-1; |
110 | 51.5M | alpha <<= BIT_DEPTH - 8; |
111 | 51.5M | beta <<= BIT_DEPTH - 8; |
112 | 257M | for( i = 0; i < 4; i++ ) { |
113 | 206M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); |
114 | 206M | if( tc_orig < 0 ) { |
115 | 26.4M | pix += inner_iters*ystride; |
116 | 26.4M | continue; |
117 | 26.4M | } |
118 | 878M | for( d = 0; d < inner_iters; d++ ) { |
119 | 698M | const int p0 = pix[-1*xstride]; |
120 | 698M | const int p1 = pix[-2*xstride]; |
121 | 698M | const int p2 = pix[-3*xstride]; |
122 | 698M | const int q0 = pix[0]; |
123 | 698M | const int q1 = pix[1*xstride]; |
124 | 698M | const int q2 = pix[2*xstride]; |
125 | | |
126 | 698M | if( FFABS( p0 - q0 ) < alpha && |
127 | 653M | FFABS( p1 - p0 ) < beta && |
128 | 607M | FFABS( q1 - q0 ) < beta ) { |
129 | | |
130 | 571M | int tc = tc_orig; |
131 | 571M | int i_delta; |
132 | | |
133 | 571M | if( FFABS( p2 - p0 ) < beta ) { |
134 | 551M | if(tc_orig) |
135 | 533M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); |
136 | 551M | tc++; |
137 | 551M | } |
138 | 571M | if( FFABS( q2 - q0 ) < beta ) { |
139 | 551M | if(tc_orig) |
140 | 533M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); |
141 | 551M | tc++; |
142 | 551M | } |
143 | | |
144 | 571M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); |
145 | 571M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ |
146 | 571M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ |
147 | 571M | } |
148 | 698M | pix += ystride; |
149 | 698M | } |
150 | 179M | } |
151 | 51.5M | } h264dsp.c:h264_loop_filter_luma_9_c Line | Count | Source | 105 | 7.66M | { | 106 | 7.66M | pixel *pix = (pixel*)p_pix; | 107 | 7.66M | int i, d; | 108 | 7.66M | xstride >>= sizeof(pixel)-1; | 109 | 7.66M | ystride >>= sizeof(pixel)-1; | 110 | 7.66M | alpha <<= BIT_DEPTH - 8; | 111 | 7.66M | beta <<= BIT_DEPTH - 8; | 112 | 38.3M | for( i = 0; i < 4; i++ ) { | 113 | 30.6M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); | 114 | 30.6M | if( tc_orig < 0 ) { | 115 | 4.09M | pix += inner_iters*ystride; | 116 | 4.09M | continue; | 117 | 4.09M | } | 118 | 130M | for( d = 0; d < inner_iters; d++ ) { | 119 | 103M | const int p0 = pix[-1*xstride]; | 120 | 103M | const int p1 = pix[-2*xstride]; | 121 | 103M | const int p2 = pix[-3*xstride]; | 122 | 103M | const int q0 = pix[0]; | 123 | 103M | const int q1 = pix[1*xstride]; | 124 | 103M | const int q2 = pix[2*xstride]; | 125 | | | 126 | 103M | if( FFABS( p0 - q0 ) < alpha && | 127 | 94.5M | FFABS( p1 - p0 ) < beta && | 128 | 87.8M | FFABS( q1 - q0 ) < beta ) { | 129 | | | 130 | 81.7M | int tc = tc_orig; | 131 | 81.7M | int i_delta; | 132 | | | 133 | 81.7M | if( FFABS( p2 - p0 ) < beta ) { | 134 | 78.6M | if(tc_orig) | 135 | 77.1M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); | 136 | 78.6M | tc++; | 137 | 78.6M | } | 138 | 81.7M | if( FFABS( q2 - q0 ) < beta ) { | 139 | 78.6M | if(tc_orig) | 140 | 77.1M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); | 141 | 78.6M | tc++; | 142 | 78.6M | } | 143 | | | 144 | 81.7M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); | 145 | 81.7M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ | 146 | 81.7M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ | 147 | 81.7M | } | 148 | 103M | pix += ystride; | 149 | 103M | } | 150 | 26.5M | } | 151 | 7.66M | } |
h264dsp.c:h264_loop_filter_luma_10_c Line | Count | Source | 105 | 14.4M | { | 106 | 14.4M | pixel *pix = (pixel*)p_pix; | 107 | 14.4M | int i, d; | 108 | 14.4M | xstride >>= sizeof(pixel)-1; | 109 | 14.4M | ystride >>= sizeof(pixel)-1; | 110 | 14.4M | alpha <<= BIT_DEPTH - 8; | 111 | 14.4M | beta <<= BIT_DEPTH - 8; | 112 | 72.4M | for( i = 0; i < 4; i++ ) { | 113 | 57.9M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); | 114 | 57.9M | if( tc_orig < 0 ) { | 115 | 6.59M | pix += inner_iters*ystride; | 116 | 6.59M | continue; | 117 | 6.59M | } | 118 | 247M | for( d = 0; d < inner_iters; d++ ) { | 119 | 196M | const int p0 = pix[-1*xstride]; | 120 | 196M | const int p1 = pix[-2*xstride]; | 121 | 196M | const int p2 = pix[-3*xstride]; | 122 | 196M | const int q0 = pix[0]; | 123 | 196M | const int q1 = pix[1*xstride]; | 124 | 196M | const int q2 = pix[2*xstride]; | 125 | | | 126 | 196M | if( FFABS( p0 - q0 ) < alpha && | 127 | 181M | FFABS( p1 - p0 ) < beta && | 128 | 169M | FFABS( q1 - q0 ) < beta ) { | 129 | | | 130 | 158M | int tc = tc_orig; | 131 | 158M | int i_delta; | 132 | | | 133 | 158M | if( FFABS( p2 - p0 ) < beta ) { | 134 | 152M | if(tc_orig) | 135 | 147M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); | 136 | 152M | tc++; | 137 | 152M | } | 138 | 158M | if( FFABS( q2 - q0 ) < beta ) { | 139 | 152M | if(tc_orig) | 140 | 147M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); | 141 | 152M | tc++; | 142 | 152M | } | 143 | | | 144 | 158M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); | 145 | 158M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ | 146 | 158M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ | 147 | 158M | } | 148 | 196M | pix += ystride; | 149 | 196M | } | 150 | 51.3M | } | 151 | 14.4M | } |
h264dsp.c:h264_loop_filter_luma_12_c Line | Count | Source | 105 | 7.59M | { | 106 | 7.59M | pixel *pix = (pixel*)p_pix; | 107 | 7.59M | int i, d; | 108 | 7.59M | xstride >>= sizeof(pixel)-1; | 109 | 7.59M | ystride >>= sizeof(pixel)-1; | 110 | 7.59M | alpha <<= BIT_DEPTH - 8; | 111 | 7.59M | beta <<= BIT_DEPTH - 8; | 112 | 37.9M | for( i = 0; i < 4; i++ ) { | 113 | 30.3M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); | 114 | 30.3M | if( tc_orig < 0 ) { | 115 | 5.36M | pix += inner_iters*ystride; | 116 | 5.36M | continue; | 117 | 5.36M | } | 118 | 121M | for( d = 0; d < inner_iters; d++ ) { | 119 | 96.0M | const int p0 = pix[-1*xstride]; | 120 | 96.0M | const int p1 = pix[-2*xstride]; | 121 | 96.0M | const int p2 = pix[-3*xstride]; | 122 | 96.0M | const int q0 = pix[0]; | 123 | 96.0M | const int q1 = pix[1*xstride]; | 124 | 96.0M | const int q2 = pix[2*xstride]; | 125 | | | 126 | 96.0M | if( FFABS( p0 - q0 ) < alpha && | 127 | 88.9M | FFABS( p1 - p0 ) < beta && | 128 | 82.4M | FFABS( q1 - q0 ) < beta ) { | 129 | | | 130 | 77.6M | int tc = tc_orig; | 131 | 77.6M | int i_delta; | 132 | | | 133 | 77.6M | if( FFABS( p2 - p0 ) < beta ) { | 134 | 74.5M | if(tc_orig) | 135 | 70.8M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); | 136 | 74.5M | tc++; | 137 | 74.5M | } | 138 | 77.6M | if( FFABS( q2 - q0 ) < beta ) { | 139 | 74.5M | if(tc_orig) | 140 | 70.8M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); | 141 | 74.5M | tc++; | 142 | 74.5M | } | 143 | | | 144 | 77.6M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); | 145 | 77.6M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ | 146 | 77.6M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ | 147 | 77.6M | } | 148 | 96.0M | pix += ystride; | 149 | 96.0M | } | 150 | 25.0M | } | 151 | 7.59M | } |
h264dsp.c:h264_loop_filter_luma_14_c Line | Count | Source | 105 | 4.39M | { | 106 | 4.39M | pixel *pix = (pixel*)p_pix; | 107 | 4.39M | int i, d; | 108 | 4.39M | xstride >>= sizeof(pixel)-1; | 109 | 4.39M | ystride >>= sizeof(pixel)-1; | 110 | 4.39M | alpha <<= BIT_DEPTH - 8; | 111 | 4.39M | beta <<= BIT_DEPTH - 8; | 112 | 21.9M | for( i = 0; i < 4; i++ ) { | 113 | 17.5M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); | 114 | 17.5M | if( tc_orig < 0 ) { | 115 | 1.97M | pix += inner_iters*ystride; | 116 | 1.97M | continue; | 117 | 1.97M | } | 118 | 75.1M | for( d = 0; d < inner_iters; d++ ) { | 119 | 59.5M | const int p0 = pix[-1*xstride]; | 120 | 59.5M | const int p1 = pix[-2*xstride]; | 121 | 59.5M | const int p2 = pix[-3*xstride]; | 122 | 59.5M | const int q0 = pix[0]; | 123 | 59.5M | const int q1 = pix[1*xstride]; | 124 | 59.5M | const int q2 = pix[2*xstride]; | 125 | | | 126 | 59.5M | if( FFABS( p0 - q0 ) < alpha && | 127 | 56.3M | FFABS( p1 - p0 ) < beta && | 128 | 53.5M | FFABS( q1 - q0 ) < beta ) { | 129 | | | 130 | 51.7M | int tc = tc_orig; | 131 | 51.7M | int i_delta; | 132 | | | 133 | 51.7M | if( FFABS( p2 - p0 ) < beta ) { | 134 | 50.3M | if(tc_orig) | 135 | 48.4M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); | 136 | 50.3M | tc++; | 137 | 50.3M | } | 138 | 51.7M | if( FFABS( q2 - q0 ) < beta ) { | 139 | 50.5M | if(tc_orig) | 140 | 48.6M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); | 141 | 50.5M | tc++; | 142 | 50.5M | } | 143 | | | 144 | 51.7M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); | 145 | 51.7M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ | 146 | 51.7M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ | 147 | 51.7M | } | 148 | 59.5M | pix += ystride; | 149 | 59.5M | } | 150 | 15.6M | } | 151 | 4.39M | } |
h264dsp.c:h264_loop_filter_luma_8_c Line | Count | Source | 105 | 17.3M | { | 106 | 17.3M | pixel *pix = (pixel*)p_pix; | 107 | 17.3M | int i, d; | 108 | 17.3M | xstride >>= sizeof(pixel)-1; | 109 | 17.3M | ystride >>= sizeof(pixel)-1; | 110 | 17.3M | alpha <<= BIT_DEPTH - 8; | 111 | 17.3M | beta <<= BIT_DEPTH - 8; | 112 | 86.9M | for( i = 0; i < 4; i++ ) { | 113 | 69.5M | const int tc_orig = tc0[i] * (1 << (BIT_DEPTH - 8)); | 114 | 69.5M | if( tc_orig < 0 ) { | 115 | 8.46M | pix += inner_iters*ystride; | 116 | 8.46M | continue; | 117 | 8.46M | } | 118 | 303M | for( d = 0; d < inner_iters; d++ ) { | 119 | 242M | const int p0 = pix[-1*xstride]; | 120 | 242M | const int p1 = pix[-2*xstride]; | 121 | 242M | const int p2 = pix[-3*xstride]; | 122 | 242M | const int q0 = pix[0]; | 123 | 242M | const int q1 = pix[1*xstride]; | 124 | 242M | const int q2 = pix[2*xstride]; | 125 | | | 126 | 242M | if( FFABS( p0 - q0 ) < alpha && | 127 | 231M | FFABS( p1 - p0 ) < beta && | 128 | 213M | FFABS( q1 - q0 ) < beta ) { | 129 | | | 130 | 202M | int tc = tc_orig; | 131 | 202M | int i_delta; | 132 | | | 133 | 202M | if( FFABS( p2 - p0 ) < beta ) { | 134 | 195M | if(tc_orig) | 135 | 189M | pix[-2*xstride] = p1 + av_clip( (( p2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - p1, -tc_orig, tc_orig ); | 136 | 195M | tc++; | 137 | 195M | } | 138 | 202M | if( FFABS( q2 - q0 ) < beta ) { | 139 | 195M | if(tc_orig) | 140 | 189M | pix[ xstride] = q1 + av_clip( (( q2 + ( ( p0 + q0 + 1 ) >> 1 ) ) >> 1) - q1, -tc_orig, tc_orig ); | 141 | 195M | tc++; | 142 | 195M | } | 143 | | | 144 | 202M | i_delta = av_clip( (((q0 - p0 ) * 4) + (p1 - q1) + 4) >> 3, -tc, tc ); | 145 | 202M | pix[-xstride] = av_clip_pixel( p0 + i_delta ); /* p0' */ | 146 | 202M | pix[0] = av_clip_pixel( q0 - i_delta ); /* q0' */ | 147 | 202M | } | 148 | 242M | pix += ystride; | 149 | 242M | } | 150 | 61.0M | } | 151 | 17.3M | } |
|
152 | | static void FUNCC(h264_v_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
153 | 25.3M | { |
154 | 25.3M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); |
155 | 25.3M | } h264dsp.c:h264_v_loop_filter_luma_9_c Line | Count | Source | 153 | 3.77M | { | 154 | 3.77M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); | 155 | 3.77M | } |
h264dsp.c:h264_v_loop_filter_luma_10_c Line | Count | Source | 153 | 7.22M | { | 154 | 7.22M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); | 155 | 7.22M | } |
h264dsp.c:h264_v_loop_filter_luma_12_c Line | Count | Source | 153 | 3.50M | { | 154 | 3.50M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); | 155 | 3.50M | } |
h264dsp.c:h264_v_loop_filter_luma_14_c Line | Count | Source | 153 | 2.15M | { | 154 | 2.15M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); | 155 | 2.15M | } |
h264dsp.c:h264_v_loop_filter_luma_8_c Line | Count | Source | 153 | 8.66M | { | 154 | 8.66M | FUNCC(h264_loop_filter_luma)(pix, stride, sizeof(pixel), 4, alpha, beta, tc0); | 155 | 8.66M | } |
|
156 | | static void FUNCC(h264_h_loop_filter_luma)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
157 | 23.7M | { |
158 | 23.7M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); |
159 | 23.7M | } h264dsp.c:h264_h_loop_filter_luma_9_c Line | Count | Source | 157 | 3.59M | { | 158 | 3.59M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 159 | 3.59M | } |
h264dsp.c:h264_h_loop_filter_luma_10_c Line | Count | Source | 157 | 6.16M | { | 158 | 6.16M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 159 | 6.16M | } |
h264dsp.c:h264_h_loop_filter_luma_12_c Line | Count | Source | 157 | 3.58M | { | 158 | 3.58M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 159 | 3.58M | } |
h264dsp.c:h264_h_loop_filter_luma_14_c Line | Count | Source | 157 | 1.87M | { | 158 | 1.87M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 159 | 1.87M | } |
h264dsp.c:h264_h_loop_filter_luma_8_c Line | Count | Source | 157 | 8.49M | { | 158 | 8.49M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 159 | 8.49M | } |
|
160 | | static void FUNCC(h264_h_loop_filter_luma_mbaff)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
161 | 2.49M | { |
162 | 2.49M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); |
163 | 2.49M | } h264dsp.c:h264_h_loop_filter_luma_mbaff_9_c Line | Count | Source | 161 | 295k | { | 162 | 295k | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 163 | 295k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_10_c Line | Count | Source | 161 | 1.10M | { | 162 | 1.10M | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 163 | 1.10M | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_12_c Line | Count | Source | 161 | 506k | { | 162 | 506k | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 163 | 506k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_14_c Line | Count | Source | 161 | 362k | { | 162 | 362k | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 163 | 362k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_8_c Line | Count | Source | 161 | 227k | { | 162 | 227k | FUNCC(h264_loop_filter_luma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 163 | 227k | } |
|
164 | | |
165 | | static av_always_inline av_flatten void FUNCC(h264_loop_filter_luma_intra)(uint8_t *p_pix, ptrdiff_t xstride, ptrdiff_t ystride, int inner_iters, int alpha, int beta) |
166 | 4.96M | { |
167 | 4.96M | pixel *pix = (pixel*)p_pix; |
168 | 4.96M | int d; |
169 | 4.96M | xstride >>= sizeof(pixel)-1; |
170 | 4.96M | ystride >>= sizeof(pixel)-1; |
171 | 4.96M | alpha <<= BIT_DEPTH - 8; |
172 | 4.96M | beta <<= BIT_DEPTH - 8; |
173 | 82.0M | for( d = 0; d < 4 * inner_iters; d++ ) { |
174 | 77.0M | const int p2 = pix[-3*xstride]; |
175 | 77.0M | const int p1 = pix[-2*xstride]; |
176 | 77.0M | const int p0 = pix[-1*xstride]; |
177 | | |
178 | 77.0M | const int q0 = pix[ 0*xstride]; |
179 | 77.0M | const int q1 = pix[ 1*xstride]; |
180 | 77.0M | const int q2 = pix[ 2*xstride]; |
181 | | |
182 | 77.0M | if( FFABS( p0 - q0 ) < alpha && |
183 | 72.2M | FFABS( p1 - p0 ) < beta && |
184 | 67.8M | FFABS( q1 - q0 ) < beta ) { |
185 | | |
186 | 65.6M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ |
187 | 61.0M | if( FFABS( p2 - p0 ) < beta) |
188 | 59.5M | { |
189 | 59.5M | const int p3 = pix[-4*xstride]; |
190 | | /* p0', p1', p2' */ |
191 | 59.5M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; |
192 | 59.5M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; |
193 | 59.5M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; |
194 | 59.5M | } else { |
195 | | /* p0' */ |
196 | 1.41M | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; |
197 | 1.41M | } |
198 | 61.0M | if( FFABS( q2 - q0 ) < beta) |
199 | 59.7M | { |
200 | 59.7M | const int q3 = pix[3*xstride]; |
201 | | /* q0', q1', q2' */ |
202 | 59.7M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; |
203 | 59.7M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; |
204 | 59.7M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; |
205 | 59.7M | } else { |
206 | | /* q0' */ |
207 | 1.30M | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; |
208 | 1.30M | } |
209 | 61.0M | }else{ |
210 | | /* p0', q0' */ |
211 | 4.62M | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; |
212 | 4.62M | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; |
213 | 4.62M | } |
214 | 65.6M | } |
215 | 77.0M | pix += ystride; |
216 | 77.0M | } |
217 | 4.96M | } h264dsp.c:h264_loop_filter_luma_intra_9_c Line | Count | Source | 166 | 757k | { | 167 | 757k | pixel *pix = (pixel*)p_pix; | 168 | 757k | int d; | 169 | 757k | xstride >>= sizeof(pixel)-1; | 170 | 757k | ystride >>= sizeof(pixel)-1; | 171 | 757k | alpha <<= BIT_DEPTH - 8; | 172 | 757k | beta <<= BIT_DEPTH - 8; | 173 | 12.3M | for( d = 0; d < 4 * inner_iters; d++ ) { | 174 | 11.6M | const int p2 = pix[-3*xstride]; | 175 | 11.6M | const int p1 = pix[-2*xstride]; | 176 | 11.6M | const int p0 = pix[-1*xstride]; | 177 | | | 178 | 11.6M | const int q0 = pix[ 0*xstride]; | 179 | 11.6M | const int q1 = pix[ 1*xstride]; | 180 | 11.6M | const int q2 = pix[ 2*xstride]; | 181 | | | 182 | 11.6M | if( FFABS( p0 - q0 ) < alpha && | 183 | 9.83M | FFABS( p1 - p0 ) < beta && | 184 | 8.59M | FFABS( q1 - q0 ) < beta ) { | 185 | | | 186 | 8.26M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ | 187 | 7.41M | if( FFABS( p2 - p0 ) < beta) | 188 | 7.23M | { | 189 | 7.23M | const int p3 = pix[-4*xstride]; | 190 | | /* p0', p1', p2' */ | 191 | 7.23M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; | 192 | 7.23M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; | 193 | 7.23M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; | 194 | 7.23M | } else { | 195 | | /* p0' */ | 196 | 178k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 197 | 178k | } | 198 | 7.41M | if( FFABS( q2 - q0 ) < beta) | 199 | 7.27M | { | 200 | 7.27M | const int q3 = pix[3*xstride]; | 201 | | /* q0', q1', q2' */ | 202 | 7.27M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; | 203 | 7.27M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; | 204 | 7.27M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; | 205 | 7.27M | } else { | 206 | | /* q0' */ | 207 | 142k | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 208 | 142k | } | 209 | 7.41M | }else{ | 210 | | /* p0', q0' */ | 211 | 847k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 212 | 847k | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 213 | 847k | } | 214 | 8.26M | } | 215 | 11.6M | pix += ystride; | 216 | 11.6M | } | 217 | 757k | } |
h264dsp.c:h264_loop_filter_luma_intra_10_c Line | Count | Source | 166 | 829k | { | 167 | 829k | pixel *pix = (pixel*)p_pix; | 168 | 829k | int d; | 169 | 829k | xstride >>= sizeof(pixel)-1; | 170 | 829k | ystride >>= sizeof(pixel)-1; | 171 | 829k | alpha <<= BIT_DEPTH - 8; | 172 | 829k | beta <<= BIT_DEPTH - 8; | 173 | 12.8M | for( d = 0; d < 4 * inner_iters; d++ ) { | 174 | 12.0M | const int p2 = pix[-3*xstride]; | 175 | 12.0M | const int p1 = pix[-2*xstride]; | 176 | 12.0M | const int p0 = pix[-1*xstride]; | 177 | | | 178 | 12.0M | const int q0 = pix[ 0*xstride]; | 179 | 12.0M | const int q1 = pix[ 1*xstride]; | 180 | 12.0M | const int q2 = pix[ 2*xstride]; | 181 | | | 182 | 12.0M | if( FFABS( p0 - q0 ) < alpha && | 183 | 11.3M | FFABS( p1 - p0 ) < beta && | 184 | 10.9M | FFABS( q1 - q0 ) < beta ) { | 185 | | | 186 | 10.6M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ | 187 | 9.78M | if( FFABS( p2 - p0 ) < beta) | 188 | 9.62M | { | 189 | 9.62M | const int p3 = pix[-4*xstride]; | 190 | | /* p0', p1', p2' */ | 191 | 9.62M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; | 192 | 9.62M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; | 193 | 9.62M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; | 194 | 9.62M | } else { | 195 | | /* p0' */ | 196 | 161k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 197 | 161k | } | 198 | 9.78M | if( FFABS( q2 - q0 ) < beta) | 199 | 9.62M | { | 200 | 9.62M | const int q3 = pix[3*xstride]; | 201 | | /* q0', q1', q2' */ | 202 | 9.62M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; | 203 | 9.62M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; | 204 | 9.62M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; | 205 | 9.62M | } else { | 206 | | /* q0' */ | 207 | 156k | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 208 | 156k | } | 209 | 9.78M | }else{ | 210 | | /* p0', q0' */ | 211 | 841k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 212 | 841k | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 213 | 841k | } | 214 | 10.6M | } | 215 | 12.0M | pix += ystride; | 216 | 12.0M | } | 217 | 829k | } |
h264dsp.c:h264_loop_filter_luma_intra_12_c Line | Count | Source | 166 | 229k | { | 167 | 229k | pixel *pix = (pixel*)p_pix; | 168 | 229k | int d; | 169 | 229k | xstride >>= sizeof(pixel)-1; | 170 | 229k | ystride >>= sizeof(pixel)-1; | 171 | 229k | alpha <<= BIT_DEPTH - 8; | 172 | 229k | beta <<= BIT_DEPTH - 8; | 173 | 3.63M | for( d = 0; d < 4 * inner_iters; d++ ) { | 174 | 3.40M | const int p2 = pix[-3*xstride]; | 175 | 3.40M | const int p1 = pix[-2*xstride]; | 176 | 3.40M | const int p0 = pix[-1*xstride]; | 177 | | | 178 | 3.40M | const int q0 = pix[ 0*xstride]; | 179 | 3.40M | const int q1 = pix[ 1*xstride]; | 180 | 3.40M | const int q2 = pix[ 2*xstride]; | 181 | | | 182 | 3.40M | if( FFABS( p0 - q0 ) < alpha && | 183 | 3.13M | FFABS( p1 - p0 ) < beta && | 184 | 2.93M | FFABS( q1 - q0 ) < beta ) { | 185 | | | 186 | 2.78M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ | 187 | 2.46M | if( FFABS( p2 - p0 ) < beta) | 188 | 2.37M | { | 189 | 2.37M | const int p3 = pix[-4*xstride]; | 190 | | /* p0', p1', p2' */ | 191 | 2.37M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; | 192 | 2.37M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; | 193 | 2.37M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; | 194 | 2.37M | } else { | 195 | | /* p0' */ | 196 | 96.2k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 197 | 96.2k | } | 198 | 2.46M | if( FFABS( q2 - q0 ) < beta) | 199 | 2.36M | { | 200 | 2.36M | const int q3 = pix[3*xstride]; | 201 | | /* q0', q1', q2' */ | 202 | 2.36M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; | 203 | 2.36M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; | 204 | 2.36M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; | 205 | 2.36M | } else { | 206 | | /* q0' */ | 207 | 101k | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 208 | 101k | } | 209 | 2.46M | }else{ | 210 | | /* p0', q0' */ | 211 | 313k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 212 | 313k | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 213 | 313k | } | 214 | 2.78M | } | 215 | 3.40M | pix += ystride; | 216 | 3.40M | } | 217 | 229k | } |
h264dsp.c:h264_loop_filter_luma_intra_14_c Line | Count | Source | 166 | 361k | { | 167 | 361k | pixel *pix = (pixel*)p_pix; | 168 | 361k | int d; | 169 | 361k | xstride >>= sizeof(pixel)-1; | 170 | 361k | ystride >>= sizeof(pixel)-1; | 171 | 361k | alpha <<= BIT_DEPTH - 8; | 172 | 361k | beta <<= BIT_DEPTH - 8; | 173 | 6.01M | for( d = 0; d < 4 * inner_iters; d++ ) { | 174 | 5.65M | const int p2 = pix[-3*xstride]; | 175 | 5.65M | const int p1 = pix[-2*xstride]; | 176 | 5.65M | const int p0 = pix[-1*xstride]; | 177 | | | 178 | 5.65M | const int q0 = pix[ 0*xstride]; | 179 | 5.65M | const int q1 = pix[ 1*xstride]; | 180 | 5.65M | const int q2 = pix[ 2*xstride]; | 181 | | | 182 | 5.65M | if( FFABS( p0 - q0 ) < alpha && | 183 | 5.43M | FFABS( p1 - p0 ) < beta && | 184 | 4.72M | FFABS( q1 - q0 ) < beta ) { | 185 | | | 186 | 4.33M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ | 187 | 4.05M | if( FFABS( p2 - p0 ) < beta) | 188 | 3.80M | { | 189 | 3.80M | const int p3 = pix[-4*xstride]; | 190 | | /* p0', p1', p2' */ | 191 | 3.80M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; | 192 | 3.80M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; | 193 | 3.80M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; | 194 | 3.80M | } else { | 195 | | /* p0' */ | 196 | 249k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 197 | 249k | } | 198 | 4.05M | if( FFABS( q2 - q0 ) < beta) | 199 | 3.94M | { | 200 | 3.94M | const int q3 = pix[3*xstride]; | 201 | | /* q0', q1', q2' */ | 202 | 3.94M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; | 203 | 3.94M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; | 204 | 3.94M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; | 205 | 3.94M | } else { | 206 | | /* q0' */ | 207 | 109k | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 208 | 109k | } | 209 | 4.05M | }else{ | 210 | | /* p0', q0' */ | 211 | 277k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 212 | 277k | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 213 | 277k | } | 214 | 4.33M | } | 215 | 5.65M | pix += ystride; | 216 | 5.65M | } | 217 | 361k | } |
h264dsp.c:h264_loop_filter_luma_intra_8_c Line | Count | Source | 166 | 2.78M | { | 167 | 2.78M | pixel *pix = (pixel*)p_pix; | 168 | 2.78M | int d; | 169 | 2.78M | xstride >>= sizeof(pixel)-1; | 170 | 2.78M | ystride >>= sizeof(pixel)-1; | 171 | 2.78M | alpha <<= BIT_DEPTH - 8; | 172 | 2.78M | beta <<= BIT_DEPTH - 8; | 173 | 47.2M | for( d = 0; d < 4 * inner_iters; d++ ) { | 174 | 44.4M | const int p2 = pix[-3*xstride]; | 175 | 44.4M | const int p1 = pix[-2*xstride]; | 176 | 44.4M | const int p0 = pix[-1*xstride]; | 177 | | | 178 | 44.4M | const int q0 = pix[ 0*xstride]; | 179 | 44.4M | const int q1 = pix[ 1*xstride]; | 180 | 44.4M | const int q2 = pix[ 2*xstride]; | 181 | | | 182 | 44.4M | if( FFABS( p0 - q0 ) < alpha && | 183 | 42.4M | FFABS( p1 - p0 ) < beta && | 184 | 40.6M | FFABS( q1 - q0 ) < beta ) { | 185 | | | 186 | 39.6M | if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){ | 187 | 37.2M | if( FFABS( p2 - p0 ) < beta) | 188 | 36.5M | { | 189 | 36.5M | const int p3 = pix[-4*xstride]; | 190 | | /* p0', p1', p2' */ | 191 | 36.5M | pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3; | 192 | 36.5M | pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2; | 193 | 36.5M | pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3; | 194 | 36.5M | } else { | 195 | | /* p0' */ | 196 | 724k | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 197 | 724k | } | 198 | 37.2M | if( FFABS( q2 - q0 ) < beta) | 199 | 36.4M | { | 200 | 36.4M | const int q3 = pix[3*xstride]; | 201 | | /* q0', q1', q2' */ | 202 | 36.4M | pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3; | 203 | 36.4M | pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2; | 204 | 36.4M | pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3; | 205 | 36.4M | } else { | 206 | | /* q0' */ | 207 | 795k | pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 208 | 795k | } | 209 | 37.2M | }else{ | 210 | | /* p0', q0' */ | 211 | 2.34M | pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; | 212 | 2.34M | pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2; | 213 | 2.34M | } | 214 | 39.6M | } | 215 | 44.4M | pix += ystride; | 216 | 44.4M | } | 217 | 2.78M | } |
|
218 | | static void FUNCC(h264_v_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
219 | 2.01M | { |
220 | 2.01M | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); |
221 | 2.01M | } h264dsp.c:h264_v_loop_filter_luma_intra_9_c Line | Count | Source | 219 | 312k | { | 220 | 312k | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); | 221 | 312k | } |
h264dsp.c:h264_v_loop_filter_luma_intra_10_c Line | Count | Source | 219 | 238k | { | 220 | 238k | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); | 221 | 238k | } |
h264dsp.c:h264_v_loop_filter_luma_intra_12_c Line | Count | Source | 219 | 69.8k | { | 220 | 69.8k | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); | 221 | 69.8k | } |
h264dsp.c:h264_v_loop_filter_luma_intra_14_c Line | Count | Source | 219 | 146k | { | 220 | 146k | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); | 221 | 146k | } |
h264dsp.c:h264_v_loop_filter_luma_intra_8_c Line | Count | Source | 219 | 1.24M | { | 220 | 1.24M | FUNCC(h264_loop_filter_luma_intra)(pix, stride, sizeof(pixel), 4, alpha, beta); | 221 | 1.24M | } |
|
222 | | static void FUNCC(h264_h_loop_filter_luma_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
223 | 2.65M | { |
224 | 2.65M | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); |
225 | 2.65M | } h264dsp.c:h264_h_loop_filter_luma_intra_9_c Line | Count | Source | 223 | 382k | { | 224 | 382k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 225 | 382k | } |
h264dsp.c:h264_h_loop_filter_luma_intra_10_c Line | Count | Source | 223 | 432k | { | 224 | 432k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 225 | 432k | } |
h264dsp.c:h264_h_loop_filter_luma_intra_12_c Line | Count | Source | 223 | 125k | { | 224 | 125k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 225 | 125k | } |
h264dsp.c:h264_h_loop_filter_luma_intra_14_c Line | Count | Source | 223 | 199k | { | 224 | 199k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 225 | 199k | } |
h264dsp.c:h264_h_loop_filter_luma_intra_8_c Line | Count | Source | 223 | 1.51M | { | 224 | 1.51M | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 225 | 1.51M | } |
|
226 | | static void FUNCC(h264_h_loop_filter_luma_mbaff_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
227 | 295k | { |
228 | 295k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); |
229 | 295k | } h264dsp.c:h264_h_loop_filter_luma_mbaff_intra_9_c Line | Count | Source | 227 | 62.4k | { | 228 | 62.4k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 229 | 62.4k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_intra_10_c Line | Count | Source | 227 | 158k | { | 228 | 158k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 229 | 158k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_intra_12_c Line | Count | Source | 227 | 34.1k | { | 228 | 34.1k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 229 | 34.1k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_intra_14_c Line | Count | Source | 227 | 16.5k | { | 228 | 16.5k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 229 | 16.5k | } |
h264dsp.c:h264_h_loop_filter_luma_mbaff_intra_8_c Line | Count | Source | 227 | 24.4k | { | 228 | 24.4k | FUNCC(h264_loop_filter_luma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 229 | 24.4k | } |
|
230 | | |
231 | | static av_always_inline av_flatten void FUNCC(h264_loop_filter_chroma)(uint8_t *p_pix, ptrdiff_t xstride, ptrdiff_t ystride, int inner_iters, int alpha, int beta, int8_t *tc0) |
232 | 67.0M | { |
233 | 67.0M | pixel *pix = (pixel*)p_pix; |
234 | 67.0M | int i, d; |
235 | 67.0M | alpha <<= BIT_DEPTH - 8; |
236 | 67.0M | beta <<= BIT_DEPTH - 8; |
237 | 67.0M | xstride >>= sizeof(pixel)-1; |
238 | 67.0M | ystride >>= sizeof(pixel)-1; |
239 | 335M | for( i = 0; i < 4; i++ ) { |
240 | 268M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; |
241 | 268M | if( tc <= 0 ) { |
242 | 30.3M | pix += inner_iters*ystride; |
243 | 30.3M | continue; |
244 | 30.3M | } |
245 | 789M | for( d = 0; d < inner_iters; d++ ) { |
246 | 551M | const int p0 = pix[-1*xstride]; |
247 | 551M | const int p1 = pix[-2*xstride]; |
248 | 551M | const int q0 = pix[0]; |
249 | 551M | const int q1 = pix[1*xstride]; |
250 | | |
251 | 551M | if( FFABS( p0 - q0 ) < alpha && |
252 | 523M | FFABS( p1 - p0 ) < beta && |
253 | 519M | FFABS( q1 - q0 ) < beta ) { |
254 | | |
255 | 516M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); |
256 | | |
257 | 516M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ |
258 | 516M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ |
259 | 516M | } |
260 | 551M | pix += ystride; |
261 | 551M | } |
262 | 237M | } |
263 | 67.0M | } h264dsp.c:h264_loop_filter_chroma_9_c Line | Count | Source | 232 | 10.5M | { | 233 | 10.5M | pixel *pix = (pixel*)p_pix; | 234 | 10.5M | int i, d; | 235 | 10.5M | alpha <<= BIT_DEPTH - 8; | 236 | 10.5M | beta <<= BIT_DEPTH - 8; | 237 | 10.5M | xstride >>= sizeof(pixel)-1; | 238 | 10.5M | ystride >>= sizeof(pixel)-1; | 239 | 52.5M | for( i = 0; i < 4; i++ ) { | 240 | 42.0M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; | 241 | 42.0M | if( tc <= 0 ) { | 242 | 4.80M | pix += inner_iters*ystride; | 243 | 4.80M | continue; | 244 | 4.80M | } | 245 | 120M | for( d = 0; d < inner_iters; d++ ) { | 246 | 83.6M | const int p0 = pix[-1*xstride]; | 247 | 83.6M | const int p1 = pix[-2*xstride]; | 248 | 83.6M | const int q0 = pix[0]; | 249 | 83.6M | const int q1 = pix[1*xstride]; | 250 | | | 251 | 83.6M | if( FFABS( p0 - q0 ) < alpha && | 252 | 77.0M | FFABS( p1 - p0 ) < beta && | 253 | 76.5M | FFABS( q1 - q0 ) < beta ) { | 254 | | | 255 | 76.3M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); | 256 | | | 257 | 76.3M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ | 258 | 76.3M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ | 259 | 76.3M | } | 260 | 83.6M | pix += ystride; | 261 | 83.6M | } | 262 | 37.2M | } | 263 | 10.5M | } |
h264dsp.c:h264_loop_filter_chroma_10_c Line | Count | Source | 232 | 18.7M | { | 233 | 18.7M | pixel *pix = (pixel*)p_pix; | 234 | 18.7M | int i, d; | 235 | 18.7M | alpha <<= BIT_DEPTH - 8; | 236 | 18.7M | beta <<= BIT_DEPTH - 8; | 237 | 18.7M | xstride >>= sizeof(pixel)-1; | 238 | 18.7M | ystride >>= sizeof(pixel)-1; | 239 | 93.6M | for( i = 0; i < 4; i++ ) { | 240 | 74.9M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; | 241 | 74.9M | if( tc <= 0 ) { | 242 | 7.51M | pix += inner_iters*ystride; | 243 | 7.51M | continue; | 244 | 7.51M | } | 245 | 224M | for( d = 0; d < inner_iters; d++ ) { | 246 | 156M | const int p0 = pix[-1*xstride]; | 247 | 156M | const int p1 = pix[-2*xstride]; | 248 | 156M | const int q0 = pix[0]; | 249 | 156M | const int q1 = pix[1*xstride]; | 250 | | | 251 | 156M | if( FFABS( p0 - q0 ) < alpha && | 252 | 146M | FFABS( p1 - p0 ) < beta && | 253 | 145M | FFABS( q1 - q0 ) < beta ) { | 254 | | | 255 | 144M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); | 256 | | | 257 | 144M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ | 258 | 144M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ | 259 | 144M | } | 260 | 156M | pix += ystride; | 261 | 156M | } | 262 | 67.4M | } | 263 | 18.7M | } |
h264dsp.c:h264_loop_filter_chroma_12_c Line | Count | Source | 232 | 12.8M | { | 233 | 12.8M | pixel *pix = (pixel*)p_pix; | 234 | 12.8M | int i, d; | 235 | 12.8M | alpha <<= BIT_DEPTH - 8; | 236 | 12.8M | beta <<= BIT_DEPTH - 8; | 237 | 12.8M | xstride >>= sizeof(pixel)-1; | 238 | 12.8M | ystride >>= sizeof(pixel)-1; | 239 | 64.1M | for( i = 0; i < 4; i++ ) { | 240 | 51.3M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; | 241 | 51.3M | if( tc <= 0 ) { | 242 | 7.86M | pix += inner_iters*ystride; | 243 | 7.86M | continue; | 244 | 7.86M | } | 245 | 153M | for( d = 0; d < inner_iters; d++ ) { | 246 | 109M | const int p0 = pix[-1*xstride]; | 247 | 109M | const int p1 = pix[-2*xstride]; | 248 | 109M | const int q0 = pix[0]; | 249 | 109M | const int q1 = pix[1*xstride]; | 250 | | | 251 | 109M | if( FFABS( p0 - q0 ) < alpha && | 252 | 104M | FFABS( p1 - p0 ) < beta && | 253 | 102M | FFABS( q1 - q0 ) < beta ) { | 254 | | | 255 | 101M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); | 256 | | | 257 | 101M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ | 258 | 101M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ | 259 | 101M | } | 260 | 109M | pix += ystride; | 261 | 109M | } | 262 | 43.4M | } | 263 | 12.8M | } |
h264dsp.c:h264_loop_filter_chroma_14_c Line | Count | Source | 232 | 6.38M | { | 233 | 6.38M | pixel *pix = (pixel*)p_pix; | 234 | 6.38M | int i, d; | 235 | 6.38M | alpha <<= BIT_DEPTH - 8; | 236 | 6.38M | beta <<= BIT_DEPTH - 8; | 237 | 6.38M | xstride >>= sizeof(pixel)-1; | 238 | 6.38M | ystride >>= sizeof(pixel)-1; | 239 | 31.9M | for( i = 0; i < 4; i++ ) { | 240 | 25.5M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; | 241 | 25.5M | if( tc <= 0 ) { | 242 | 2.16M | pix += inner_iters*ystride; | 243 | 2.16M | continue; | 244 | 2.16M | } | 245 | 78.7M | for( d = 0; d < inner_iters; d++ ) { | 246 | 55.3M | const int p0 = pix[-1*xstride]; | 247 | 55.3M | const int p1 = pix[-2*xstride]; | 248 | 55.3M | const int q0 = pix[0]; | 249 | 55.3M | const int q1 = pix[1*xstride]; | 250 | | | 251 | 55.3M | if( FFABS( p0 - q0 ) < alpha && | 252 | 54.6M | FFABS( p1 - p0 ) < beta && | 253 | 54.5M | FFABS( q1 - q0 ) < beta ) { | 254 | | | 255 | 54.5M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); | 256 | | | 257 | 54.5M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ | 258 | 54.5M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ | 259 | 54.5M | } | 260 | 55.3M | pix += ystride; | 261 | 55.3M | } | 262 | 23.3M | } | 263 | 6.38M | } |
h264dsp.c:h264_loop_filter_chroma_8_c Line | Count | Source | 232 | 18.5M | { | 233 | 18.5M | pixel *pix = (pixel*)p_pix; | 234 | 18.5M | int i, d; | 235 | 18.5M | alpha <<= BIT_DEPTH - 8; | 236 | 18.5M | beta <<= BIT_DEPTH - 8; | 237 | 18.5M | xstride >>= sizeof(pixel)-1; | 238 | 18.5M | ystride >>= sizeof(pixel)-1; | 239 | 92.9M | for( i = 0; i < 4; i++ ) { | 240 | 74.3M | const int tc = ((tc0[i] - 1U) << (BIT_DEPTH - 8)) + 1; | 241 | 74.3M | if( tc <= 0 ) { | 242 | 8.00M | pix += inner_iters*ystride; | 243 | 8.00M | continue; | 244 | 8.00M | } | 245 | 211M | for( d = 0; d < inner_iters; d++ ) { | 246 | 145M | const int p0 = pix[-1*xstride]; | 247 | 145M | const int p1 = pix[-2*xstride]; | 248 | 145M | const int q0 = pix[0]; | 249 | 145M | const int q1 = pix[1*xstride]; | 250 | | | 251 | 145M | if( FFABS( p0 - q0 ) < alpha && | 252 | 140M | FFABS( p1 - p0 ) < beta && | 253 | 139M | FFABS( q1 - q0 ) < beta ) { | 254 | | | 255 | 138M | int delta = av_clip( ((q0 - p0) * 4 + (p1 - q1) + 4) >> 3, -tc, tc ); | 256 | | | 257 | 138M | pix[-xstride] = av_clip_pixel( p0 + delta ); /* p0' */ | 258 | 138M | pix[0] = av_clip_pixel( q0 - delta ); /* q0' */ | 259 | 138M | } | 260 | 145M | pix += ystride; | 261 | 145M | } | 262 | 66.3M | } | 263 | 18.5M | } |
|
264 | | static void FUNCC(h264_v_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
265 | 36.1M | { |
266 | 36.1M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); |
267 | 36.1M | } h264dsp.c:h264_v_loop_filter_chroma_9_c Line | Count | Source | 265 | 5.58M | { | 266 | 5.58M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); | 267 | 5.58M | } |
h264dsp.c:h264_v_loop_filter_chroma_10_c Line | Count | Source | 265 | 10.3M | { | 266 | 10.3M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); | 267 | 10.3M | } |
h264dsp.c:h264_v_loop_filter_chroma_12_c Line | Count | Source | 265 | 6.78M | { | 266 | 6.78M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); | 267 | 6.78M | } |
h264dsp.c:h264_v_loop_filter_chroma_14_c Line | Count | Source | 265 | 3.52M | { | 266 | 3.52M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); | 267 | 3.52M | } |
h264dsp.c:h264_v_loop_filter_chroma_8_c Line | Count | Source | 265 | 9.85M | { | 266 | 9.85M | FUNCC(h264_loop_filter_chroma)(pix, stride, sizeof(pixel), 2, alpha, beta, tc0); | 267 | 9.85M | } |
|
268 | | static void FUNCC(h264_h_loop_filter_chroma)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
269 | 14.5M | { |
270 | 14.5M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); |
271 | 14.5M | } h264dsp.c:h264_h_loop_filter_chroma_9_c Line | Count | Source | 269 | 2.89M | { | 270 | 2.89M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 271 | 2.89M | } |
h264dsp.c:h264_h_loop_filter_chroma_10_c Line | Count | Source | 269 | 2.89M | { | 270 | 2.89M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 271 | 2.89M | } |
h264dsp.c:h264_h_loop_filter_chroma_12_c Line | Count | Source | 269 | 1.51M | { | 270 | 1.51M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 271 | 1.51M | } |
h264dsp.c:h264_h_loop_filter_chroma_14_c Line | Count | Source | 269 | 904k | { | 270 | 904k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 271 | 904k | } |
h264dsp.c:h264_h_loop_filter_chroma_8_c Line | Count | Source | 269 | 6.31M | { | 270 | 6.31M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 271 | 6.31M | } |
|
272 | | static void FUNCC(h264_h_loop_filter_chroma_mbaff)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
273 | 1.49M | { |
274 | 1.49M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); |
275 | 1.49M | } h264dsp.c:h264_h_loop_filter_chroma_mbaff_9_c Line | Count | Source | 273 | 198k | { | 274 | 198k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); | 275 | 198k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_10_c Line | Count | Source | 273 | 641k | { | 274 | 641k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); | 275 | 641k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_12_c Line | Count | Source | 273 | 113k | { | 274 | 113k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); | 275 | 113k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_14_c Line | Count | Source | 273 | 226k | { | 274 | 226k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); | 275 | 226k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_8_c Line | Count | Source | 273 | 314k | { | 274 | 314k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 1, alpha, beta, tc0); | 275 | 314k | } |
|
276 | | static void FUNCC(h264_h_loop_filter_chroma422)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
277 | 11.8M | { |
278 | 11.8M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); |
279 | 11.8M | } h264dsp.c:h264_h_loop_filter_chroma422_9_c Line | Count | Source | 277 | 1.46M | { | 278 | 1.46M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 279 | 1.46M | } |
h264dsp.c:h264_h_loop_filter_chroma422_10_c Line | Count | Source | 277 | 3.52M | { | 278 | 3.52M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 279 | 3.52M | } |
h264dsp.c:h264_h_loop_filter_chroma422_12_c Line | Count | Source | 277 | 3.51M | { | 278 | 3.51M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 279 | 3.51M | } |
h264dsp.c:h264_h_loop_filter_chroma422_14_c Line | Count | Source | 277 | 1.34M | { | 278 | 1.34M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 279 | 1.34M | } |
h264dsp.c:h264_h_loop_filter_chroma422_8_c Line | Count | Source | 277 | 2.04M | { | 278 | 2.04M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 4, alpha, beta, tc0); | 279 | 2.04M | } |
|
280 | | static void FUNCC(h264_h_loop_filter_chroma422_mbaff)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta, int8_t *tc0) |
281 | 3.02M | { |
282 | 3.02M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); |
283 | 3.02M | } h264dsp.c:h264_h_loop_filter_chroma422_mbaff_9_c Line | Count | Source | 281 | 364k | { | 282 | 364k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 283 | 364k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_10_c Line | Count | Source | 281 | 1.32M | { | 282 | 1.32M | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 283 | 1.32M | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_12_c Line | Count | Source | 281 | 898k | { | 282 | 898k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 283 | 898k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_14_c Line | Count | Source | 281 | 384k | { | 282 | 384k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 283 | 384k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_8_c Line | Count | Source | 281 | 56.7k | { | 282 | 56.7k | FUNCC(h264_loop_filter_chroma)(pix, sizeof(pixel), stride, 2, alpha, beta, tc0); | 283 | 56.7k | } |
|
284 | | |
285 | | static av_always_inline av_flatten void FUNCC(h264_loop_filter_chroma_intra)(uint8_t *p_pix, ptrdiff_t xstride, ptrdiff_t ystride, int inner_iters, int alpha, int beta) |
286 | 8.76M | { |
287 | 8.76M | pixel *pix = (pixel*)p_pix; |
288 | 8.76M | int d; |
289 | 8.76M | xstride >>= sizeof(pixel)-1; |
290 | 8.76M | ystride >>= sizeof(pixel)-1; |
291 | 8.76M | alpha <<= BIT_DEPTH - 8; |
292 | 8.76M | beta <<= BIT_DEPTH - 8; |
293 | 87.0M | for( d = 0; d < 4 * inner_iters; d++ ) { |
294 | 78.3M | const int p0 = pix[-1*xstride]; |
295 | 78.3M | const int p1 = pix[-2*xstride]; |
296 | 78.3M | const int q0 = pix[0]; |
297 | 78.3M | const int q1 = pix[1*xstride]; |
298 | | |
299 | 78.3M | if( FFABS( p0 - q0 ) < alpha && |
300 | 74.8M | FFABS( p1 - p0 ) < beta && |
301 | 74.3M | FFABS( q1 - q0 ) < beta ) { |
302 | | |
303 | 74.0M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ |
304 | 74.0M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ |
305 | 74.0M | } |
306 | 78.3M | pix += ystride; |
307 | 78.3M | } |
308 | 8.76M | } h264dsp.c:h264_loop_filter_chroma_intra_9_c Line | Count | Source | 286 | 1.23M | { | 287 | 1.23M | pixel *pix = (pixel*)p_pix; | 288 | 1.23M | int d; | 289 | 1.23M | xstride >>= sizeof(pixel)-1; | 290 | 1.23M | ystride >>= sizeof(pixel)-1; | 291 | 1.23M | alpha <<= BIT_DEPTH - 8; | 292 | 1.23M | beta <<= BIT_DEPTH - 8; | 293 | 13.0M | for( d = 0; d < 4 * inner_iters; d++ ) { | 294 | 11.7M | const int p0 = pix[-1*xstride]; | 295 | 11.7M | const int p1 = pix[-2*xstride]; | 296 | 11.7M | const int q0 = pix[0]; | 297 | 11.7M | const int q1 = pix[1*xstride]; | 298 | | | 299 | 11.7M | if( FFABS( p0 - q0 ) < alpha && | 300 | 10.0M | FFABS( p1 - p0 ) < beta && | 301 | 10.0M | FFABS( q1 - q0 ) < beta ) { | 302 | | | 303 | 9.97M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ | 304 | 9.97M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ | 305 | 9.97M | } | 306 | 11.7M | pix += ystride; | 307 | 11.7M | } | 308 | 1.23M | } |
h264dsp.c:h264_loop_filter_chroma_intra_10_c Line | Count | Source | 286 | 1.36M | { | 287 | 1.36M | pixel *pix = (pixel*)p_pix; | 288 | 1.36M | int d; | 289 | 1.36M | xstride >>= sizeof(pixel)-1; | 290 | 1.36M | ystride >>= sizeof(pixel)-1; | 291 | 1.36M | alpha <<= BIT_DEPTH - 8; | 292 | 1.36M | beta <<= BIT_DEPTH - 8; | 293 | 16.0M | for( d = 0; d < 4 * inner_iters; d++ ) { | 294 | 14.6M | const int p0 = pix[-1*xstride]; | 295 | 14.6M | const int p1 = pix[-2*xstride]; | 296 | 14.6M | const int q0 = pix[0]; | 297 | 14.6M | const int q1 = pix[1*xstride]; | 298 | | | 299 | 14.6M | if( FFABS( p0 - q0 ) < alpha && | 300 | 14.1M | FFABS( p1 - p0 ) < beta && | 301 | 14.0M | FFABS( q1 - q0 ) < beta ) { | 302 | | | 303 | 13.9M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ | 304 | 13.9M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ | 305 | 13.9M | } | 306 | 14.6M | pix += ystride; | 307 | 14.6M | } | 308 | 1.36M | } |
h264dsp.c:h264_loop_filter_chroma_intra_12_c Line | Count | Source | 286 | 425k | { | 287 | 425k | pixel *pix = (pixel*)p_pix; | 288 | 425k | int d; | 289 | 425k | xstride >>= sizeof(pixel)-1; | 290 | 425k | ystride >>= sizeof(pixel)-1; | 291 | 425k | alpha <<= BIT_DEPTH - 8; | 292 | 425k | beta <<= BIT_DEPTH - 8; | 293 | 4.86M | for( d = 0; d < 4 * inner_iters; d++ ) { | 294 | 4.44M | const int p0 = pix[-1*xstride]; | 295 | 4.44M | const int p1 = pix[-2*xstride]; | 296 | 4.44M | const int q0 = pix[0]; | 297 | 4.44M | const int q1 = pix[1*xstride]; | 298 | | | 299 | 4.44M | if( FFABS( p0 - q0 ) < alpha && | 300 | 4.19M | FFABS( p1 - p0 ) < beta && | 301 | 4.11M | FFABS( q1 - q0 ) < beta ) { | 302 | | | 303 | 4.10M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ | 304 | 4.10M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ | 305 | 4.10M | } | 306 | 4.44M | pix += ystride; | 307 | 4.44M | } | 308 | 425k | } |
h264dsp.c:h264_loop_filter_chroma_intra_14_c Line | Count | Source | 286 | 583k | { | 287 | 583k | pixel *pix = (pixel*)p_pix; | 288 | 583k | int d; | 289 | 583k | xstride >>= sizeof(pixel)-1; | 290 | 583k | ystride >>= sizeof(pixel)-1; | 291 | 583k | alpha <<= BIT_DEPTH - 8; | 292 | 583k | beta <<= BIT_DEPTH - 8; | 293 | 5.67M | for( d = 0; d < 4 * inner_iters; d++ ) { | 294 | 5.08M | const int p0 = pix[-1*xstride]; | 295 | 5.08M | const int p1 = pix[-2*xstride]; | 296 | 5.08M | const int q0 = pix[0]; | 297 | 5.08M | const int q1 = pix[1*xstride]; | 298 | | | 299 | 5.08M | if( FFABS( p0 - q0 ) < alpha && | 300 | 5.04M | FFABS( p1 - p0 ) < beta && | 301 | 5.03M | FFABS( q1 - q0 ) < beta ) { | 302 | | | 303 | 5.03M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ | 304 | 5.03M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ | 305 | 5.03M | } | 306 | 5.08M | pix += ystride; | 307 | 5.08M | } | 308 | 583k | } |
h264dsp.c:h264_loop_filter_chroma_intra_8_c Line | Count | Source | 286 | 5.15M | { | 287 | 5.15M | pixel *pix = (pixel*)p_pix; | 288 | 5.15M | int d; | 289 | 5.15M | xstride >>= sizeof(pixel)-1; | 290 | 5.15M | ystride >>= sizeof(pixel)-1; | 291 | 5.15M | alpha <<= BIT_DEPTH - 8; | 292 | 5.15M | beta <<= BIT_DEPTH - 8; | 293 | 47.5M | for( d = 0; d < 4 * inner_iters; d++ ) { | 294 | 42.3M | const int p0 = pix[-1*xstride]; | 295 | 42.3M | const int p1 = pix[-2*xstride]; | 296 | 42.3M | const int q0 = pix[0]; | 297 | 42.3M | const int q1 = pix[1*xstride]; | 298 | | | 299 | 42.3M | if( FFABS( p0 - q0 ) < alpha && | 300 | 41.3M | FFABS( p1 - p0 ) < beta && | 301 | 41.1M | FFABS( q1 - q0 ) < beta ) { | 302 | | | 303 | 41.0M | pix[-xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2; /* p0' */ | 304 | 41.0M | pix[0] = ( 2*q1 + q0 + p1 + 2 ) >> 2; /* q0' */ | 305 | 41.0M | } | 306 | 42.3M | pix += ystride; | 307 | 42.3M | } | 308 | 5.15M | } |
|
309 | | static void FUNCC(h264_v_loop_filter_chroma_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
310 | 3.66M | { |
311 | 3.66M | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); |
312 | 3.66M | } h264dsp.c:h264_v_loop_filter_chroma_intra_9_c Line | Count | Source | 310 | 522k | { | 311 | 522k | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); | 312 | 522k | } |
h264dsp.c:h264_v_loop_filter_chroma_intra_10_c Line | Count | Source | 310 | 433k | { | 311 | 433k | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); | 312 | 433k | } |
h264dsp.c:h264_v_loop_filter_chroma_intra_12_c Line | Count | Source | 310 | 130k | { | 311 | 130k | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); | 312 | 130k | } |
h264dsp.c:h264_v_loop_filter_chroma_intra_14_c Line | Count | Source | 310 | 249k | { | 311 | 249k | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); | 312 | 249k | } |
h264dsp.c:h264_v_loop_filter_chroma_intra_8_c Line | Count | Source | 310 | 2.33M | { | 311 | 2.33M | FUNCC(h264_loop_filter_chroma_intra)(pix, stride, sizeof(pixel), 2, alpha, beta); | 312 | 2.33M | } |
|
313 | | static void FUNCC(h264_h_loop_filter_chroma_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
314 | 3.46M | { |
315 | 3.46M | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); |
316 | 3.46M | } h264dsp.c:h264_h_loop_filter_chroma_intra_9_c Line | Count | Source | 314 | 345k | { | 315 | 345k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 316 | 345k | } |
h264dsp.c:h264_h_loop_filter_chroma_intra_10_c Line | Count | Source | 314 | 152k | { | 315 | 152k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 316 | 152k | } |
h264dsp.c:h264_h_loop_filter_chroma_intra_12_c Line | Count | Source | 314 | 77.6k | { | 315 | 77.6k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 316 | 77.6k | } |
h264dsp.c:h264_h_loop_filter_chroma_intra_14_c Line | Count | Source | 314 | 261k | { | 315 | 261k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 316 | 261k | } |
h264dsp.c:h264_h_loop_filter_chroma_intra_8_c Line | Count | Source | 314 | 2.62M | { | 315 | 2.62M | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 316 | 2.62M | } |
|
317 | | static void FUNCC(h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
318 | 185k | { |
319 | 185k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); |
320 | 185k | } h264dsp.c:h264_h_loop_filter_chroma_mbaff_intra_9_c Line | Count | Source | 318 | 49.5k | { | 319 | 49.5k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); | 320 | 49.5k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_intra_10_c Line | Count | Source | 318 | 60.9k | { | 319 | 60.9k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); | 320 | 60.9k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_intra_12_c Line | Count | Source | 318 | 39.3k | { | 319 | 39.3k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); | 320 | 39.3k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_intra_14_c Line | Count | Source | 318 | 2.82k | { | 319 | 2.82k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); | 320 | 2.82k | } |
h264dsp.c:h264_h_loop_filter_chroma_mbaff_intra_8_c Line | Count | Source | 318 | 32.5k | { | 319 | 32.5k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 1, alpha, beta); | 320 | 32.5k | } |
|
321 | | static void FUNCC(h264_h_loop_filter_chroma422_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
322 | 1.11M | { |
323 | 1.11M | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); |
324 | 1.11M | } h264dsp.c:h264_h_loop_filter_chroma422_intra_9_c Line | Count | Source | 322 | 259k | { | 323 | 259k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 324 | 259k | } |
h264dsp.c:h264_h_loop_filter_chroma422_intra_10_c Line | Count | Source | 322 | 501k | { | 323 | 501k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 324 | 501k | } |
h264dsp.c:h264_h_loop_filter_chroma422_intra_12_c Line | Count | Source | 322 | 149k | { | 323 | 149k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 324 | 149k | } |
h264dsp.c:h264_h_loop_filter_chroma422_intra_14_c Line | Count | Source | 322 | 53.5k | { | 323 | 53.5k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 324 | 53.5k | } |
h264dsp.c:h264_h_loop_filter_chroma422_intra_8_c Line | Count | Source | 322 | 156k | { | 323 | 156k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 4, alpha, beta); | 324 | 156k | } |
|
325 | | static void FUNCC(h264_h_loop_filter_chroma422_mbaff_intra)(uint8_t *pix, ptrdiff_t stride, int alpha, int beta) |
326 | 330k | { |
327 | 330k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); |
328 | 330k | } h264dsp.c:h264_h_loop_filter_chroma422_mbaff_intra_9_c Line | Count | Source | 326 | 61.5k | { | 327 | 61.5k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 328 | 61.5k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_intra_10_c Line | Count | Source | 326 | 211k | { | 327 | 211k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 328 | 211k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_intra_12_c Line | Count | Source | 326 | 28.6k | { | 327 | 28.6k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 328 | 28.6k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_intra_14_c Line | Count | Source | 326 | 16.7k | { | 327 | 16.7k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 328 | 16.7k | } |
h264dsp.c:h264_h_loop_filter_chroma422_mbaff_intra_8_c Line | Count | Source | 326 | 11.5k | { | 327 | 11.5k | FUNCC(h264_loop_filter_chroma_intra)(pix, sizeof(pixel), stride, 2, alpha, beta); | 328 | 11.5k | } |
|