* qatar/master: aacenc: Fix LONG_START windowing. aacenc: Fix a bug where deinterleaved samples were stored in the wrong place. avplay: use the correct array size for stride. lavc: extend doxy for avcodec_alloc_context3(). APIchanges: mention avcodec_alloc_context()/2/3 avcodec_align_dimensions2: set only 4 linesizes, not AV_NUM_DATA_POINTERS. aacsbr: ARM NEON optimised sbrdsp functions aacsbr: align some arrays aacsbr: move some simdable loops to function pointers cosmetics: Remove extra newlines at EOF Conflicts: libavcodec/utils.c libavfilter/formats.c libavutil/mem.c
Unified · Split
| @@ -223,6 +223,8 @@ API changes, most recent first: · 222 unmodified lines | ||
| 223 | 223 | |
| 224 | 224 | 2011-07-10 - 0b950fe - lavc 53.8.0 |
| 225 | 225 | Add avcodec_open2(), deprecate avcodec_open(). |
| 226 | + Add avcodec_alloc_context3. Deprecate avcodec_alloc_context() and | |
| 227 | + avcodec_alloc_context2(). | |
| 226 | 228 | |
| 227 | 229 | 2011-07-01 - b442ca6 - lavf 53.5.0 - avformat.h |
| 228 | 230 | Add function av_get_output_timestamp(). |
| @@ -935,4 +935,3 @@ AVCodec ff_fourxm_decoder = { · 934 unmodified lines | ||
| 935 | 935 | .capabilities = CODEC_CAP_DR1, |
| 936 | 936 | .long_name = NULL_IF_CONFIG_SMALL("4X Movie"), |
| 937 | 937 | }; |
| 938 | − | |
| @@ -56,7 +56,8 @@ OBJS-$(CONFIG_VDPAU) += vdpau.o · 55 unmodified lines | ||
| 56 | 56 | OBJS-$(CONFIG_A64MULTI_ENCODER) += a64multienc.o elbg.o |
| 57 | 57 | OBJS-$(CONFIG_A64MULTI5_ENCODER) += a64multienc.o elbg.o |
| 58 | 58 | OBJS-$(CONFIG_AAC_DECODER) += aacdec.o aactab.o aacsbr.o aacps.o \ |
| 59 | − aacadtsdec.o mpeg4audio.o kbdwin.o | |
| 59 | + aacadtsdec.o mpeg4audio.o kbdwin.o \ | |
| 60 | + sbrdsp.o | |
| 60 | 61 | OBJS-$(CONFIG_AAC_ENCODER) += aacenc.o aaccoder.o \ |
| 61 | 62 | aacpsy.o aactab.o \ |
| 62 | 63 | psymodel.o iirfilter.o \ |
| @@ -200,8 +200,8 @@ WINDOW_FUNC(long_start) · 199 unmodified lines | ||
| 200 | 200 | float *out = sce->ret; |
| 201 | 201 | |
| 202 | 202 | dsp->vector_fmul(out, audio, lwindow, 1024); |
| 203 | − memcpy(out + 1024, audio, sizeof(out[0]) * 448); | |
| 204 | − dsp->vector_fmul_reverse(out + 1024 + 448, audio, swindow, 128); | |
| 203 | + memcpy(out + 1024, audio + 1024, sizeof(out[0]) * 448); | |
| 204 | + dsp->vector_fmul_reverse(out + 1024 + 448, audio + 1024 + 448, swindow, 128); | |
| 205 | 205 | memset(out + 1024 + 576, 0, sizeof(out[0]) * 448); |
| 206 | 206 | } |
| 207 | 207 | |
| @@ -487,10 +487,10 @@ static void deinterleave_input_samples(AACEncContext *s, · 279 unmodified lines | ||
| 487 | 487 | const float *sptr = samples + channel_map[ch]; |
| 488 | 488 | |
| 489 | 489 | /* copy last 1024 samples of previous frame to the start of the current frame */ |
| 490 | − memcpy(&s->planar_samples[ch][0], &s->planar_samples[ch][1024], 1024 * sizeof(s->planar_samples[0][0])); | |
| 490 | + memcpy(&s->planar_samples[ch][1024], &s->planar_samples[ch][2048], 1024 * sizeof(s->planar_samples[0][0])); | |
| 491 | 491 | |
| 492 | 492 | /* deinterleave */ |
| 493 | − for (i = 1024; i < 1024 * 2; i++) { | |
| 493 | + for (i = 2048; i < 3072; i++) { | |
| 494 | 494 | s->planar_samples[ch][i] = *sptr; |
| 495 | 495 | sptr += sinc; |
| 496 | 496 | } |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | #include "aacsbrdata.h" |
| 33 | 33 | #include "fft.h" |
| 34 | 34 | #include "aacps.h" |
| 35 | +#include "sbrdsp.h" | |
| 35 | 36 | #include "libavutil/libm.h" |
| 36 | 37 | #include "libavutil/avassert.h" |
| 37 | 38 | |
| @@ -144,6 +145,7 @@ av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr) · 106 unmodified lines | ||
| 144 | 145 | ff_mdct_init(&sbr->mdct, 7, 1, 1.0 / (64 * mdct_scale)); |
| 145 | 146 | ff_mdct_init(&sbr->mdct_ana, 7, 1, -2.0 * mdct_scale); |
| 146 | 147 | ff_ps_ctx_init(&sbr->ps); |
| 148 | + ff_sbrdsp_init(&sbr->dsp); | |
| 147 | 149 | } |
| 148 | 150 | |
| 149 | 151 | av_cold void ff_aac_sbr_ctx_close(SpectralBandReplication *sbr) |
| @@ -1143,33 +1145,21 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac) · 993 unmodified lines | ||
| 1143 | 1145 | * @param x pointer to the beginning of the first sample window |
| 1144 | 1146 | * @param W array of complex-valued samples split into subbands |
| 1145 | 1147 | */ |
| 1146 | −static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, const float *in, float *x, | |
| 1148 | +static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, | |
| 1149 | + SBRDSPContext *sbrdsp, const float *in, float *x, | |
| 1147 | 1150 | float z[320], float W[2][32][32][2]) |
| 1148 | 1151 | { |
| 1149 | − int i, k; | |
| 1152 | + int i; | |
| 1150 | 1153 | memcpy(W[0], W[1], sizeof(W[0])); |
| 1151 | 1154 | memcpy(x , x+1024, (320-32)*sizeof(x[0])); |
| 1152 | 1155 | memcpy(x+288, in, 1024*sizeof(x[0])); |
| 1153 | 1156 | for (i = 0; i < 32; i++) { // numTimeSlots*RATE = 16*2 as 960 sample frames |
| 1154 | 1157 | // are not supported |
| 1155 | 1158 | dsp->vector_fmul_reverse(z, sbr_qmf_window_ds, x, 320); |
| 1156 | − for (k = 0; k < 64; k++) { | |
| 1157 | − float f = z[k] + z[k + 64] + z[k + 128] + z[k + 192] + z[k + 256]; | |
| 1158 | − z[k] = f; | |
| 1159 | − } | |
| 1160 | − //Shuffle to IMDCT | |
| 1161 | − z[64] = z[0]; | |
| 1162 | − for (k = 1; k < 32; k++) { | |
| 1163 | − z[64+2*k-1] = z[ k]; | |
| 1164 | − z[64+2*k ] = -z[64-k]; | |
| 1165 | − } | |
| 1166 | − z[64+63] = z[32]; | |
| 1167 | − | |
| 1159 | + sbrdsp->sum64x5(z); | |
| 1160 | + sbrdsp->qmf_pre_shuffle(z); | |
| 1168 | 1161 | mdct->imdct_half(mdct, z, z+64); |
| 1169 | − for (k = 0; k < 32; k++) { | |
| 1170 | − W[1][i][k][0] = -z[63-k]; | |
| 1171 | − W[1][i][k][1] = z[k]; | |
| 1172 | − } | |
| 1162 | + sbrdsp->qmf_post_shuffle(W[1][i], z); | |
| 1173 | 1163 | x += 32; |
| 1174 | 1164 | } |
| 1175 | 1165 | } |
| @@ -1179,6 +1169,7 @@ static void sbr_qmf_analysis(DSPContext *dsp, FFTContext *mdct, const float *in, · 3 unmodified lines | ||
| 1179 | 1169 | * (14496-3 sp04 p206) |
| 1180 | 1170 | */ |
| 1181 | 1171 | static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct, |
| 1172 | + SBRDSPContext *sbrdsp, | |
| 1182 | 1173 | float *out, float X[2][38][64], |
| 1183 | 1174 | float mdct_buf[2][64], |
| 1184 | 1175 | float *v0, int *v_off, const unsigned int div) |
| @@ -1202,20 +1193,12 @@ static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct, · 17 unmodified lines | ||
| 1202 | 1193 | X[0][i][32+n] = X[1][i][31-n]; |
| 1203 | 1194 | } |
| 1204 | 1195 | mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); |
| 1205 | − for (n = 0; n < 32; n++) { | |
| 1206 | − v[ n] = mdct_buf[0][63 - 2*n]; | |
| 1207 | − v[63 - n] = -mdct_buf[0][62 - 2*n]; | |
| 1208 | − } | |
| 1196 | + sbrdsp->qmf_deint_neg(v, mdct_buf[0]); | |
| 1209 | 1197 | } else { |
| 1210 | − for (n = 1; n < 64; n+=2) { | |
| 1211 | − X[1][i][n] = -X[1][i][n]; | |
| 1212 | − } | |
| 1198 | + sbrdsp->neg_odd_64(X[1][i]); | |
| 1213 | 1199 | mdct->imdct_half(mdct, mdct_buf[0], X[0][i]); |
| 1214 | 1200 | mdct->imdct_half(mdct, mdct_buf[1], X[1][i]); |
| 1215 | − for (n = 0; n < 64; n++) { | |
| 1216 | − v[ n] = -mdct_buf[0][63 - n] + mdct_buf[1][ n ]; | |
| 1217 | − v[127 - n] = mdct_buf[0][63 - n] + mdct_buf[1][ n ]; | |
| 1218 | − } | |
| 1201 | + sbrdsp->qmf_deint_bfly(v, mdct_buf[1], mdct_buf[0]); | |
| 1219 | 1202 | } |
| 1220 | 1203 | dsp->vector_fmul_add(out, v , sbr_qmf_window , zero64, 64 >> div); |
| 1221 | 1204 | dsp->vector_fmul_add(out, v + ( 192 >> div), sbr_qmf_window + ( 64 >> div), out , 64 >> div); |
| @@ -1231,45 +1214,20 @@ static void sbr_qmf_synthesis(DSPContext *dsp, FFTContext *mdct, · 9 unmodified lines | ||
| 1231 | 1214 | } |
| 1232 | 1215 | } |
| 1233 | 1216 | |
| 1234 | −static void autocorrelate(const float x[40][2], float phi[3][2][2], int lag) | |
| 1235 | −{ | |
| 1236 | − int i; | |
| 1237 | − float real_sum = 0.0f; | |
| 1238 | − float imag_sum = 0.0f; | |
| 1239 | − if (lag) { | |
| 1240 | − for (i = 1; i < 38; i++) { | |
| 1241 | − real_sum += x[i][0] * x[i+lag][0] + x[i][1] * x[i+lag][1]; | |
| 1242 | − imag_sum += x[i][0] * x[i+lag][1] - x[i][1] * x[i+lag][0]; | |
| 1243 | − } | |
| 1244 | − phi[2-lag][1][0] = real_sum + x[ 0][0] * x[lag][0] + x[ 0][1] * x[lag][1]; | |
| 1245 | − phi[2-lag][1][1] = imag_sum + x[ 0][0] * x[lag][1] - x[ 0][1] * x[lag][0]; | |
| 1246 | − if (lag == 1) { | |
| 1247 | − phi[0][0][0] = real_sum + x[38][0] * x[39][0] + x[38][1] * x[39][1]; | |
| 1248 | − phi[0][0][1] = imag_sum + x[38][0] * x[39][1] - x[38][1] * x[39][0]; | |
| 1249 | − } | |
| 1250 | − } else { | |
| 1251 | − for (i = 1; i < 38; i++) { | |
| 1252 | − real_sum += x[i][0] * x[i][0] + x[i][1] * x[i][1]; | |
| 1253 | − } | |
| 1254 | − phi[2][1][0] = real_sum + x[ 0][0] * x[ 0][0] + x[ 0][1] * x[ 0][1]; | |
| 1255 | − phi[1][0][0] = real_sum + x[38][0] * x[38][0] + x[38][1] * x[38][1]; | |
| 1256 | − } | |
| 1257 | −} | |
| 1258 | − | |
| 1259 | 1217 | /** High Frequency Generation (14496-3 sp04 p214+) and Inverse Filtering |
| 1260 | 1218 | * (14496-3 sp04 p214) |
| 1261 | 1219 | * Warning: This routine does not seem numerically stable. |
| 1262 | 1220 | */ |
| 1263 | −static void sbr_hf_inverse_filter(float (*alpha0)[2], float (*alpha1)[2], | |
| 1221 | +static void sbr_hf_inverse_filter(SBRDSPContext *dsp, | |
| 1222 | + float (*alpha0)[2], float (*alpha1)[2], | |
| 1264 | 1223 | const float X_low[32][40][2], int k0) |
| 1265 | 1224 | { |
| 1266 | 1225 | int k; |
| 1267 | 1226 | for (k = 0; k < k0; k++) { |
| 1268 | − float phi[3][2][2], dk; | |
| 1227 | + LOCAL_ALIGNED_16(float, phi, [3], [2][2]); | |
| 1228 | + float dk; | |
| 1269 | 1229 | |
| 1270 | − autocorrelate(X_low[k], phi, 0); | |
| 1271 | − autocorrelate(X_low[k], phi, 1); | |
| 1272 | − autocorrelate(X_low[k], phi, 2); | |
| 1230 | + dsp->autocorrelate(X_low[k], phi); | |
| 1273 | 1231 | |
| 1274 | 1232 | dk = phi[2][1][0] * phi[1][0][0] - |
| 1275 | 1233 | (phi[1][1][0] * phi[1][1][0] + phi[1][1][1] * phi[1][1][1]) / 1.000001f; |
| @@ -1365,12 +1323,11 @@ static int sbr_hf_gen(AACContext *ac, SpectralBandReplication *sbr, · 89 unmodified lines | ||
| 1365 | 1323 | const float bw_array[5], const uint8_t *t_env, |
| 1366 | 1324 | int bs_num_env) |
| 1367 | 1325 | { |
| 1368 | − int i, j, x; | |
| 1326 | + int j, x; | |
| 1369 | 1327 | int g = 0; |
| 1370 | 1328 | int k = sbr->kx[1]; |
| 1371 | 1329 | for (j = 0; j < sbr->num_patches; j++) { |
| 1372 | 1330 | for (x = 0; x < sbr->patch_num_subbands[j]; x++, k++) { |
| 1373 | − float alpha[4]; | |
| 1374 | 1331 | const int p = sbr->patch_start_subband[j] + x; |
| 1375 | 1332 | while (g <= sbr->n_q && k >= sbr->f_tablenoise[g]) |
| 1376 | 1333 | g++; |
| @@ -1382,26 +1339,10 @@ static int sbr_hf_gen(AACContext *ac, SpectralBandReplication *sbr, · 5 unmodified lines | ||
| 1382 | 1339 | return -1; |
| 1383 | 1340 | } |
| 1384 | 1341 | |
| 1385 | − alpha[0] = alpha1[p][0] * bw_array[g] * bw_array[g]; | |
| 1386 | − alpha[1] = alpha1[p][1] * bw_array[g] * bw_array[g]; | |
| 1387 | − alpha[2] = alpha0[p][0] * bw_array[g]; | |
| 1388 | − alpha[3] = alpha0[p][1] * bw_array[g]; | |
| 1389 | − | |
| 1390 | − for (i = 2 * t_env[0]; i < 2 * t_env[bs_num_env]; i++) { | |
| 1391 | − const int idx = i + ENVELOPE_ADJUSTMENT_OFFSET; | |
| 1392 | − X_high[k][idx][0] = | |
| 1393 | − X_low[p][idx - 2][0] * alpha[0] - | |
| 1394 | − X_low[p][idx - 2][1] * alpha[1] + | |
| 1395 | − X_low[p][idx - 1][0] * alpha[2] - | |
| 1396 | − X_low[p][idx - 1][1] * alpha[3] + | |
| 1397 | − X_low[p][idx][0]; | |
| 1398 | − X_high[k][idx][1] = | |
| 1399 | − X_low[p][idx - 2][1] * alpha[0] + | |
| 1400 | − X_low[p][idx - 2][0] * alpha[1] + | |
| 1401 | − X_low[p][idx - 1][1] * alpha[2] + | |
| 1402 | − X_low[p][idx - 1][0] * alpha[3] + | |
| 1403 | − X_low[p][idx][1]; | |
| 1404 | − } | |
| 1342 | + sbr->dsp.hf_gen(X_high[k] + ENVELOPE_ADJUSTMENT_OFFSET, | |
| 1343 | + X_low[p] + ENVELOPE_ADJUSTMENT_OFFSET, | |
| 1344 | + alpha0[p], alpha1[p], bw_array[g], | |
| 1345 | + 2 * t_env[0], 2 * t_env[bs_num_env]); | |
| 1405 | 1346 | } |
| 1406 | 1347 | } |
| 1407 | 1348 | if (k < sbr->m[1] + sbr->kx[1]) |
| @@ -1502,7 +1443,8 @@ static void sbr_mapping(AACContext *ac, SpectralBandReplication *sbr, · 94 unmodified lines | ||
| 1502 | 1443 | static void sbr_env_estimate(float (*e_curr)[48], float X_high[64][40][2], |
| 1503 | 1444 | SpectralBandReplication *sbr, SBRData *ch_data) |
| 1504 | 1445 | { |
| 1505 | − int e, i, m; | |
| 1446 | + int e, m; | |
| 1447 | + int kx1 = sbr->kx[1]; | |
| 1506 | 1448 | |
| 1507 | 1449 | if (sbr->bs_interpol_freq) { |
| 1508 | 1450 | for (e = 0; e < ch_data->bs_num_env; e++) { |
| @@ -1511,12 +1453,7 @@ static void sbr_env_estimate(float (*e_curr)[48], float X_high[64][40][2], · 2 unmodified lines | ||
| 1511 | 1453 | int iub = ch_data->t_env[e + 1] * 2 + ENVELOPE_ADJUSTMENT_OFFSET; |
| 1512 | 1454 | |
| 1513 | 1455 | for (m = 0; m < sbr->m[1]; m++) { |
| 1514 | − float sum = 0.0f; | |
| 1515 | − | |
| 1516 | − for (i = ilb; i < iub; i++) { | |
| 1517 | − sum += X_high[m + sbr->kx[1]][i][0] * X_high[m + sbr->kx[1]][i][0] + | |
| 1518 | − X_high[m + sbr->kx[1]][i][1] * X_high[m + sbr->kx[1]][i][1]; | |
| 1519 | − } | |
| 1456 | + float sum = sbr->dsp.sum_square(X_high[m+kx1] + ilb, iub - ilb); | |
| 1520 | 1457 | e_curr[e][m] = sum * recip_env_size; |
| 1521 | 1458 | } |
| 1522 | 1459 | } |
| @@ -1534,14 +1471,11 @@ static void sbr_env_estimate(float (*e_curr)[48], float X_high[64][40][2], · 11 unmodified lines | ||
| 1534 | 1471 | const int den = env_size * (table[p + 1] - table[p]); |
| 1535 | 1472 | |
| 1536 | 1473 | for (k = table[p]; k < table[p + 1]; k++) { |
| 1537 | − for (i = ilb; i < iub; i++) { | |
| 1538 | − sum += X_high[k][i][0] * X_high[k][i][0] + | |
| 1539 | − X_high[k][i][1] * X_high[k][i][1]; | |
| 1540 | − } | |
| 1474 | + sum += sbr->dsp.sum_square(X_high[k] + ilb, iub - ilb); | |
| 1541 | 1475 | } |
| 1542 | 1476 | sum /= den; |
| 1543 | 1477 | for (k = table[p]; k < table[p + 1]; k++) { |
| 1544 | − e_curr[e][k - sbr->kx[1]] = sum; | |
| 1478 | + e_curr[e][k - kx1] = sum; | |
| 1545 | 1479 | } |
| 1546 | 1480 | } |
| 1547 | 1481 | } |
| @@ -1652,55 +1586,35 @@ static void sbr_hf_assemble(float Y[2][38][64][2], const float X_high[64][40][2] · 104 unmodified lines | ||
| 1652 | 1586 | for (e = 0; e < ch_data->bs_num_env; e++) { |
| 1653 | 1587 | for (i = 2 * ch_data->t_env[e]; i < 2 * ch_data->t_env[e + 1]; i++) { |
| 1654 | 1588 | int phi_sign = (1 - 2*(kx & 1)); |
| 1589 | + LOCAL_ALIGNED_16(float, g_filt_tab, [48]); | |
| 1590 | + LOCAL_ALIGNED_16(float, q_filt_tab, [48]); | |
| 1591 | + float *g_filt, *q_filt; | |
| 1655 | 1592 | |
| 1656 | 1593 | if (h_SL && e != e_a[0] && e != e_a[1]) { |
| 1594 | + g_filt = g_filt_tab; | |
| 1595 | + q_filt = q_filt_tab; | |
| 1657 | 1596 | for (m = 0; m < m_max; m++) { |
| 1658 | 1597 | const int idx1 = i + h_SL; |
| 1659 | − float g_filt = 0.0f; | |
| 1660 | − for (j = 0; j <= h_SL; j++) | |
| 1661 | − g_filt += g_temp[idx1 - j][m] * h_smooth[j]; | |
| 1662 | − Y[1][i][m + kx][0] = | |
| 1663 | − X_high[m + kx][i + ENVELOPE_ADJUSTMENT_OFFSET][0] * g_filt; | |
| 1664 | − Y[1][i][m + kx][1] = | |
| 1665 | − X_high[m + kx][i + ENVELOPE_ADJUSTMENT_OFFSET][1] * g_filt; | |
| 1598 | + g_filt[m] = 0.0f; | |
| 1599 | + q_filt[m] = 0.0f; | |
| 1600 | + for (j = 0; j <= h_SL; j++) { | |
| 1601 | + g_filt[m] += g_temp[idx1 - j][m] * h_smooth[j]; | |
| 1602 | + q_filt[m] += q_temp[idx1 - j][m] * h_smooth[j]; | |
| 1603 | + } | |
| 1666 | 1604 | } |
| 1667 | 1605 | } else { |
| 1668 | − for (m = 0; m < m_max; m++) { | |
| 1669 | − const float g_filt = g_temp[i + h_SL][m]; | |
| 1670 | − Y[1][i][m + kx][0] = | |
| 1671 | − X_high[m + kx][i + ENVELOPE_ADJUSTMENT_OFFSET][0] * g_filt; | |
| 1672 | − Y[1][i][m + kx][1] = | |
| 1673 | − X_high[m + kx][i + ENVELOPE_ADJUSTMENT_OFFSET][1] * g_filt; | |
| 1674 | − } | |
| 1606 | + g_filt = g_temp[i + h_SL]; | |
| 1607 | + q_filt = q_temp[i]; | |
| 1675 | 1608 | } |
| 1676 | 1609 | |
| 1610 | + sbr->dsp.hf_g_filt(Y[1][i] + kx, X_high + kx, g_filt, m_max, | |
| 1611 | + i + ENVELOPE_ADJUSTMENT_OFFSET); | |
| 1612 | + | |
| 1677 | 1613 | if (e != e_a[0] && e != e_a[1]) { |
| 1678 | − for (m = 0; m < m_max; m++) { | |
| 1679 | − indexnoise = (indexnoise + 1) & 0x1ff; | |
| 1680 | − if (sbr->s_m[e][m]) { | |
| 1681 | − Y[1][i][m + kx][0] += | |
| 1682 | − sbr->s_m[e][m] * phi[0][indexsine]; | |
| 1683 | − Y[1][i][m + kx][1] += | |
| 1684 | − sbr->s_m[e][m] * (phi[1][indexsine] * phi_sign); | |
| 1685 | − } else { | |
| 1686 | − float q_filt; | |
| 1687 | − if (h_SL) { | |
| 1688 | − const int idx1 = i + h_SL; | |
| 1689 | − q_filt = 0.0f; | |
| 1690 | − for (j = 0; j <= h_SL; j++) | |
| 1691 | − q_filt += q_temp[idx1 - j][m] * h_smooth[j]; | |
| 1692 | − } else { | |
| 1693 | − q_filt = q_temp[i][m]; | |
| 1694 | − } | |
| 1695 | − Y[1][i][m + kx][0] += | |
| 1696 | − q_filt * sbr_noise_table[indexnoise][0]; | |
| 1697 | − Y[1][i][m + kx][1] += | |
| 1698 | − q_filt * sbr_noise_table[indexnoise][1]; | |
| 1699 | − } | |
| 1700 | − phi_sign = -phi_sign; | |
| 1701 | − } | |
| 1614 | + sbr->dsp.hf_apply_noise[indexsine](Y[1][i] + kx, sbr->s_m[e], | |
| 1615 | + q_filt, indexnoise, | |
| 1616 | + kx, m_max); | |
| 1702 | 1617 | } else { |
| 1703 | − indexnoise = (indexnoise + m_max) & 0x1ff; | |
| 1704 | 1618 | for (m = 0; m < m_max; m++) { |
| 1705 | 1619 | Y[1][i][m + kx][0] += |
| 1706 | 1620 | sbr->s_m[e][m] * phi[0][indexsine]; |
| @@ -1709,6 +1623,7 @@ static void sbr_hf_assemble(float Y[2][38][64][2], const float X_high[64][40][2] · 2 unmodified lines | ||
| 1709 | 1623 | phi_sign = -phi_sign; |
| 1710 | 1624 | } |
| 1711 | 1625 | } |
| 1626 | + indexnoise = (indexnoise + m_max) & 0x1ff; | |
| 1712 | 1627 | indexsine = (indexsine + 1) & 3; |
| 1713 | 1628 | } |
| 1714 | 1629 | } |
| @@ -1728,12 +1643,12 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac, · 13 unmodified lines | ||
| 1728 | 1643 | } |
| 1729 | 1644 | for (ch = 0; ch < nch; ch++) { |
| 1730 | 1645 | /* decode channel */ |
| 1731 | − sbr_qmf_analysis(&ac->dsp, &sbr->mdct_ana, ch ? R : L, sbr->data[ch].analysis_filterbank_samples, | |
| 1646 | + sbr_qmf_analysis(&ac->dsp, &sbr->mdct_ana, &sbr->dsp, ch ? R : L, sbr->data[ch].analysis_filterbank_samples, | |
| 1732 | 1647 | (float*)sbr->qmf_filter_scratch, |
| 1733 | 1648 | sbr->data[ch].W); |
| 1734 | 1649 | sbr_lf_gen(ac, sbr, sbr->X_low, sbr->data[ch].W); |
| 1735 | 1650 | if (sbr->start) { |
| 1736 | − sbr_hf_inverse_filter(sbr->alpha0, sbr->alpha1, sbr->X_low, sbr->k[0]); | |
| 1651 | + sbr_hf_inverse_filter(&sbr->dsp, sbr->alpha0, sbr->alpha1, sbr->X_low, sbr->k[0]); | |
| 1737 | 1652 | sbr_chirp(sbr, &sbr->data[ch]); |
| 1738 | 1653 | sbr_hf_gen(ac, sbr, sbr->X_high, sbr->X_low, sbr->alpha0, sbr->alpha1, |
| 1739 | 1654 | sbr->data[ch].bw_array, sbr->data[ch].t_env, |
| @@ -1760,12 +1675,12 @@ void ff_sbr_apply(AACContext *ac, SpectralBandReplication *sbr, int id_aac, · 20 unmodified lines | ||
| 1760 | 1675 | nch = 2; |
| 1761 | 1676 | } |
| 1762 | 1677 | |
| 1763 | − sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, L, sbr->X[0], sbr->qmf_filter_scratch, | |
| 1678 | + sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, &sbr->dsp, L, sbr->X[0], sbr->qmf_filter_scratch, | |
| 1764 | 1679 | sbr->data[0].synthesis_filterbank_samples, |
| 1765 | 1680 | &sbr->data[0].synthesis_filterbank_samples_offset, |
| 1766 | 1681 | downsampled); |
| 1767 | 1682 | if (nch == 2) |
| 1768 | − sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, R, sbr->X[1], sbr->qmf_filter_scratch, | |
| 1683 | + sbr_qmf_synthesis(&ac->dsp, &sbr->mdct, &sbr->dsp, R, sbr->X[1], sbr->qmf_filter_scratch, | |
| 1769 | 1684 | sbr->data[1].synthesis_filterbank_samples, |
| 1770 | 1685 | &sbr->data[1].synthesis_filterbank_samples_offset, |
| 1771 | 1686 | downsampled); |
| @@ -352,7 +352,8 @@ static DECLARE_ALIGNED(16, float, sbr_qmf_window_us)[640] = { · 351 unmodified lines | ||
| 352 | 352 | 0.8537385600, |
| 353 | 353 | }; |
| 354 | 354 | |
| 355 | −static const float sbr_noise_table[512][2] = { | |
| 355 | +/* First two entries repeated at end to simplify SIMD implementations. */ | |
| 356 | +const DECLARE_ALIGNED(16, float, ff_sbr_noise_table)[][2] = { | |
| 356 | 357 | {-0.99948153278296, -0.59483417516607}, { 0.97113454393991, -0.67528515225647}, |
| 357 | 358 | { 0.14130051758487, -0.95090983575689}, {-0.47005496701697, -0.37340549728647}, |
| 358 | 359 | { 0.80705063769351, 0.29653668284408}, {-0.38981478896926, 0.89572605717087}, |
| @@ -609,6 +610,7 @@ static const float sbr_noise_table[512][2] = { · 250 unmodified lines | ||
| 609 | 610 | {-0.93412041758744, 0.41374052024363}, { 0.96063943315511, 0.93116709541280}, |
| 610 | 611 | { 0.97534253457837, 0.86150930812689}, { 0.99642466504163, 0.70190043427512}, |
| 611 | 612 | {-0.94705089665984, -0.29580042814306}, { 0.91599807087376, -0.98147830385781}, |
| 613 | +{-0.99948153278296, -0.59483417516607}, { 0.97113454393991, -0.67528515225647}, | |
| 612 | 614 | }; |
| 613 | 615 | |
| 614 | 616 | #endif /* AVCODEC_AACSBRDATA_H */ |
| @@ -142,4 +142,3 @@ void ff_tilt_compensation(float *mem, float tilt, float *samples, int size) · 141 unmodified lines | ||
| 142 | 142 | samples[0] -= tilt * *mem; |
| 143 | 143 | *mem = new_tilt_mem; |
| 144 | 144 | } |
| 145 | − | |
| @@ -465,4 +465,3 @@ void avcodec_register_all(void) · 464 unmodified lines | ||
| 465 | 465 | REGISTER_BSF (REMOVE_EXTRADATA, remove_extradata); |
| 466 | 466 | REGISTER_BSF (TEXT2MOVSUB, text2movsub); |
| 467 | 467 | } |
| 468 | − | |
| @@ -1755,4 +1755,3 @@ AVCodec ff_als_decoder = { · 1754 unmodified lines | ||
| 1755 | 1755 | .capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1, |
| 1756 | 1756 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"), |
| 1757 | 1757 | }; |
| 1758 | − | |
| @@ -1669,4 +1669,3 @@ static const float highpass_poles[2] = { -1.933105469, 0.935913085 }; · 1668 unmodified lines | ||
| 1669 | 1669 | static const float highpass_gain = 0.939819335; |
| 1670 | 1670 | |
| 1671 | 1671 | #endif /* AVCODEC_AMRNBDATA_H */ |
| 1672 | − | |
| @@ -1,6 +1,8 @@ | ||
| 1 | 1 | OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_init_arm.o \ |
| 2 | 2 | arm/ac3dsp_arm.o |
| 3 | 3 | |
| 4 | +OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_init_arm.o | |
| 5 | + | |
| 4 | 6 | OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_init_arm.o \ |
| 5 | 7 | |
| 6 | 8 | ARMV6-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_armv6.o |
| @@ -61,6 +63,8 @@ NEON-OBJS-$(CONFIG_H264PRED) += arm/h264pred_neon.o \ · 54 unmodified lines | ||
| 61 | 63 | |
| 62 | 64 | NEON-OBJS-$(CONFIG_AC3DSP) += arm/ac3dsp_neon.o |
| 63 | 65 | |
| 66 | +NEON-OBJS-$(CONFIG_AAC_DECODER) += arm/sbrdsp_neon.o | |
| 67 | + | |
| 64 | 68 | NEON-OBJS-$(CONFIG_DCA_DECODER) += arm/dcadsp_neon.o \ |
| 65 | 69 | arm/synth_filter_neon.o \ |
| 66 | 70 | |
| @@ -0,0 +1,70 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (c) 2012 Mans Rullgard | |
| 3 | + * | |
| 4 | + * This file is part of Libav. | |
| 5 | + * | |
| 6 | + * Libav is free software; you can redistribute it and/or | |
| 7 | + * modify it under the terms of the GNU Lesser General Public | |
| 8 | + * License as published by the Free Software Foundation; either | |
| 9 | + * version 2.1 of the License, or (at your option) any later version. | |
| 10 | + * | |
| 11 | + * Libav is distributed in the hope that it will be useful, | |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | + * Lesser General Public License for more details. | |
| 15 | + * | |
| 16 | + * You should have received a copy of the GNU Lesser General Public | |
| 17 | + * License along with Libav; if not, write to the Free Software | |
| 18 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 19 | + */ | |
| 20 | + | |
| 21 | +#include "config.h" | |
| 22 | +#include "libavutil/attributes.h" | |
| 23 | +#include "libavcodec/sbrdsp.h" | |
| 24 | + | |
| 25 | +void ff_sbr_sum64x5_neon(float *z); | |
| 26 | +float ff_sbr_sum_square_neon(float (*x)[2], int n); | |
| 27 | +void ff_sbr_neg_odd_64_neon(float *x); | |
| 28 | +void ff_sbr_qmf_pre_shuffle_neon(float *z); | |
| 29 | +void ff_sbr_qmf_post_shuffle_neon(float W[32][2], const float *z); | |
| 30 | +void ff_sbr_qmf_deint_neg_neon(float *v, const float *src); | |
| 31 | +void ff_sbr_qmf_deint_bfly_neon(float *v, const float *src0, const float *src1); | |
| 32 | +void ff_sbr_hf_g_filt_neon(float (*Y)[2], const float (*X_high)[40][2], | |
| 33 | + const float *g_filt, int m_max, int ixh); | |
| 34 | +void ff_sbr_hf_gen_neon(float (*X_high)[2], const float (*X_low)[2], | |
| 35 | + const float alpha0[2], const float alpha1[2], | |
| 36 | + float bw, int start, int end); | |
| 37 | +void ff_sbr_autocorrelate_neon(const float x[40][2], float phi[3][2][2]); | |
| 38 | + | |
| 39 | +void ff_sbr_hf_apply_noise_0_neon(float Y[64][2], const float *s_m, | |
| 40 | + const float *q_filt, int noise, | |
| 41 | + int kx, int m_max); | |
| 42 | +void ff_sbr_hf_apply_noise_1_neon(float Y[64][2], const float *s_m, | |
| 43 | + const float *q_filt, int noise, | |
| 44 | + int kx, int m_max); | |
| 45 | +void ff_sbr_hf_apply_noise_2_neon(float Y[64][2], const float *s_m, | |
| 46 | + const float *q_filt, int noise, | |
| 47 | + int kx, int m_max); | |
| 48 | +void ff_sbr_hf_apply_noise_3_neon(float Y[64][2], const float *s_m, | |
| 49 | + const float *q_filt, int noise, | |
| 50 | + int kx, int m_max); | |
| 51 | + | |
| 52 | +av_cold void ff_sbrdsp_init_arm(SBRDSPContext *s) | |
| 53 | +{ | |
| 54 | + if (HAVE_NEON) { | |
| 55 | + s->sum64x5 = ff_sbr_sum64x5_neon; | |
| 56 | + s->sum_square = ff_sbr_sum_square_neon; | |
| 57 | + s->neg_odd_64 = ff_sbr_neg_odd_64_neon; | |
| 58 | + s->qmf_pre_shuffle = ff_sbr_qmf_pre_shuffle_neon; | |
| 59 | + s->qmf_post_shuffle = ff_sbr_qmf_post_shuffle_neon; | |
| 60 | + s->qmf_deint_neg = ff_sbr_qmf_deint_neg_neon; | |
| 61 | + s->qmf_deint_bfly = ff_sbr_qmf_deint_bfly_neon; | |
| 62 | + s->hf_g_filt = ff_sbr_hf_g_filt_neon; | |
| 63 | + s->hf_gen = ff_sbr_hf_gen_neon; | |
| 64 | + s->autocorrelate = ff_sbr_autocorrelate_neon; | |
| 65 | + s->hf_apply_noise[0] = ff_sbr_hf_apply_noise_0_neon; | |
| 66 | + s->hf_apply_noise[1] = ff_sbr_hf_apply_noise_1_neon; | |
| 67 | + s->hf_apply_noise[2] = ff_sbr_hf_apply_noise_2_neon; | |
| 68 | + s->hf_apply_noise[3] = ff_sbr_hf_apply_noise_3_neon; | |
| 69 | + } | |
| 70 | +} | |
| @@ -0,0 +1,411 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (c) 2012 Mans Rullgard | |
| 3 | + * | |
| 4 | + * This file is part of Libav. | |
| 5 | + * | |
| 6 | + * Libav is free software; you can redistribute it and/or | |
| 7 | + * modify it under the terms of the GNU Lesser General Public | |
| 8 | + * License as published by the Free Software Foundation; either | |
| 9 | + * version 2.1 of the License, or (at your option) any later version. | |
| 10 | + * | |
| 11 | + * Libav is distributed in the hope that it will be useful, | |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | + * Lesser General Public License for more details. | |
| 15 | + * | |
| 16 | + * You should have received a copy of the GNU Lesser General Public | |
| 17 | + * License along with Libav; if not, write to the Free Software | |
| 18 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 19 | + */ | |
| 20 | + | |
| 21 | +#include "asm.S" | |
| 22 | + | |
| 23 | +function ff_sbr_sum64x5_neon, export=1 | |
| 24 | + push {lr} | |
| 25 | + add r1, r0, # 64*4 | |
| 26 | + add r2, r0, #128*4 | |
| 27 | + add r3, r0, #192*4 | |
| 28 | + add lr, r0, #256*4 | |
| 29 | + mov r12, #64 | |
| 30 | +1: | |
| 31 | + vld1.32 {q0}, [r0,:128] | |
| 32 | + vld1.32 {q1}, [r1,:128]! | |
| 33 | + vadd.f32 q0, q0, q1 | |
| 34 | + vld1.32 {q2}, [r2,:128]! | |
| 35 | + vadd.f32 q0, q0, q2 | |
| 36 | + vld1.32 {q3}, [r3,:128]! | |
| 37 | + vadd.f32 q0, q0, q3 | |
| 38 | + vld1.32 {q8}, [lr,:128]! | |
| 39 | + vadd.f32 q0, q0, q8 | |
| 40 | + vst1.32 {q0}, [r0,:128]! | |
| 41 | + subs r12, #4 | |
| 42 | + bgt 1b | |
| 43 | + pop {pc} | |
| 44 | +endfunc | |
| 45 | + | |
| 46 | +function ff_sbr_sum_square_neon, export=1 | |
| 47 | + vmov.f32 q0, #0.0 | |
| 48 | +1: | |
| 49 | + vld1.32 {q1}, [r0,:128]! | |
| 50 | + vmla.f32 q0, q1, q1 | |
| 51 | + subs r1, r1, #2 | |
| 52 | + bgt 1b | |
| 53 | + vadd.f32 d0, d0, d1 | |
| 54 | + vpadd.f32 d0, d0, d0 | |
| 55 | +NOVFP vmov.32 r0, d0[0] | |
| 56 | + bx lr | |
| 57 | +endfunc | |
| 58 | + | |
| 59 | +function ff_sbr_neg_odd_64_neon, export=1 | |
| 60 | + mov r1, r0 | |
| 61 | + vmov.i32 q8, #1<<31 | |
| 62 | + vld2.32 {q0,q1}, [r0,:128]! | |
| 63 | + veor q1, q1, q8 | |
| 64 | + vld2.32 {q2,q3}, [r0,:128]! | |
| 65 | + .rept 3 | |
| 66 | + vst2.32 {q0,q1}, [r1,:128]! | |
| 67 | + veor q3, q3, q8 | |
| 68 | + vld2.32 {q0,q1}, [r0,:128]! | |
| 69 | + vst2.32 {q2,q3}, [r1,:128]! | |
| 70 | + veor q1, q1, q8 | |
| 71 | + vld2.32 {q2,q3}, [r0,:128]! | |
| 72 | + .endr | |
| 73 | + veor q3, q3, q8 | |
| 74 | + vst2.32 {q0,q1}, [r1,:128]! | |
| 75 | + vst2.32 {q2,q3}, [r1,:128]! | |
| 76 | + bx lr | |
| 77 | +endfunc | |
| 78 | + | |
| 79 | +function ff_sbr_qmf_pre_shuffle_neon, export=1 | |
| 80 | + add r1, r0, #60*4 | |
| 81 | + add r2, r0, #64*4 | |
| 82 | + vld1.32 {d0}, [r0,:64]! | |
| 83 | + vst1.32 {d0}, [r2,:64]! | |
| 84 | + mov r3, #-16 | |
| 85 | + mov r12, #24 | |
| 86 | + vmov.i32 q8, #1<<31 | |
| 87 | + vld1.32 {q0}, [r1,:128], r3 | |
| 88 | + vld1.32 {d2}, [r0,:64]! | |
| 89 | +1: | |
| 90 | + vld1.32 {d3,d4}, [r0,:128]! | |
| 91 | + vrev64.32 q0, q0 | |
| 92 | + vld1.32 {q9}, [r1,:128], r3 | |
| 93 | + veor q0, q0, q8 | |
| 94 | + vld1.32 {d5,d6}, [r0,:128]! | |
| 95 | + vswp d0, d1 | |
| 96 | + vrev64.32 q9, q9 | |
| 97 | + vst2.32 {q0,q1}, [r2,:64]! | |
| 98 | + vmov q10, q2 | |
| 99 | + veor q9, q9, q8 | |
| 100 | + vmov d2, d6 | |
| 101 | + vswp d18, d19 | |
| 102 | + vld1.32 {q0}, [r1,:128], r3 | |
| 103 | + vst2.32 {q9,q10}, [r2,:64]! | |
| 104 | + subs r12, r12, #8 | |
| 105 | + bgt 1b | |
| 106 | + vld1.32 {d3,d4}, [r0,:128]! | |
| 107 | + vrev64.32 q0, q0 | |
| 108 | + vld1.32 {q9}, [r1,:128], r3 | |
| 109 | + veor q0, q0, q8 | |
| 110 | + vld1.32 {d5}, [r0,:64]! | |
| 111 | + vswp d0, d1 | |
| 112 | + vrev64.32 q9, q9 | |
| 113 | + vst2.32 {q0,q1}, [r2,:64]! | |
| 114 | + vswp d4, d5 | |
| 115 | + veor q1, q9, q8 | |
| 116 | + vst2.32 {d3,d5}, [r2,:64]! | |
| 117 | + vst2.32 {d2[0],d4[0]}, [r2,:64]! | |
| 118 | + bx lr | |
| 119 | +endfunc | |
| 120 | + | |
| 121 | +function ff_sbr_qmf_post_shuffle_neon, export=1 | |
| 122 | + add r2, r1, #60*4 | |
| 123 | + mov r3, #-16 | |
| 124 | + mov r12, #32 | |
| 125 | + vmov.i32 q8, #1<<31 | |
| 126 | + vld1.32 {q0}, [r2,:128], r3 | |
| 127 | + vld1.32 {q1}, [r1,:128]! | |
| 128 | +1: | |
| 129 | + pld [r2, #-32] | |
| 130 | + vrev64.32 q0, q0 | |
| 131 | + vswp d2, d3 | |
| 132 | + veor q0, q0, q8 | |
| 133 | + vld1.32 {q2}, [r2,:128], r3 | |
| 134 | + vld1.32 {q3}, [r1,:128]! | |
| 135 | + vst2.32 {d1,d3}, [r0,:128]! | |
| 136 | + vst2.32 {d0,d2}, [r0,:128]! | |
| 137 | + pld [r2, #-32] | |
| 138 | + vrev64.32 q2, q2 | |
| 139 | + vswp d6, d7 | |
| 140 | + veor q2, q2, q8 | |
| 141 | + vld1.32 {q0}, [r2,:128], r3 | |
| 142 | + vld1.32 {q1}, [r1,:128]! | |
| 143 | + vst2.32 {d5,d7}, [r0,:128]! | |
| 144 | + vst2.32 {d4,d6}, [r0,:128]! | |
| 145 | + subs r12, r12, #8 | |
| 146 | + bgt 1b | |
| 147 | + bx lr | |
| 148 | +endfunc | |
| 149 | + | |
| 150 | +function ff_sbr_qmf_deint_neg_neon, export=1 | |
| 151 | + add r1, r1, #60*4 | |
| 152 | + add r2, r0, #62*4 | |
| 153 | + mov r3, #-16 | |
| 154 | + mov r12, #32 | |
| 155 | + vmov.i32 d2, #1<<31 | |
| 156 | +1: | |
| 157 | + vld2.32 {d0,d1}, [r1,:128], r3 | |
| 158 | + veor d0, d0, d2 | |
| 159 | + vrev64.32 d1, d1 | |
| 160 | + vst1.32 {d0}, [r2,:64] | |
| 161 | + vst1.32 {d1}, [r0,:64]! | |
| 162 | + sub r2, r2, #8 | |
| 163 | + subs r12, r12, #2 | |
| 164 | + bgt 1b | |
| 165 | + bx lr | |
| 166 | +endfunc | |
| 167 | + | |
| 168 | +function ff_sbr_qmf_deint_bfly_neon, export=1 | |
| 169 | + push {lr} | |
| 170 | + add r2, r2, #60*4 | |
| 171 | + add r3, r0, #124*4 | |
| 172 | + mov r12, #64 | |
| 173 | + mov lr, #-16 | |
| 174 | +1: | |
| 175 | + vld1.32 {q0}, [r1,:128]! | |
| 176 | + vld1.32 {q1}, [r2,:128], lr | |
| 177 | + vrev64.32 q2, q0 | |
| 178 | + vrev64.32 q3, q1 | |
| 179 | + vadd.f32 d3, d4, d3 | |
| 180 | + vadd.f32 d2, d5, d2 | |
| 181 | + vsub.f32 d0, d0, d7 | |
| 182 | + vsub.f32 d1, d1, d6 | |
| 183 | + vst1.32 {q1}, [r3,:128], lr | |
| 184 | + vst1.32 {q0}, [r0,:128]! | |
| 185 | + subs r12, r12, #4 | |
| 186 | + bgt 1b | |
| 187 | + pop {pc} | |
| 188 | +endfunc | |
| 189 | + | |
| 190 | +function ff_sbr_hf_g_filt_neon, export=1 | |
| 191 | + ldr r12, [sp] | |
| 192 | + add r1, r1, r12, lsl #3 | |
| 193 | + mov r12, #40*2*4 | |
| 194 | + sub r3, r3, #1 | |
| 195 | + vld2.32 {d2[],d3[]},[r2,:64]! | |
| 196 | + vld1.32 {d0}, [r1,:64], r12 | |
| 197 | +1: | |
| 198 | + vld1.32 {d1}, [r1,:64], r12 | |
| 199 | + vmul.f32 q3, q0, q1 | |
| 200 | + vld2.32 {d2[],d3[]},[r2,:64]! | |
| 201 | + vld1.32 {d0}, [r1,:64], r12 | |
| 202 | + vst1.32 {q3}, [r0,:64]! | |
| 203 | + subs r3, r3, #2 | |
| 204 | + bgt 1b | |
| 205 | + it lt | |
| 206 | + bxlt lr | |
| 207 | + vmul.f32 d0, d0, d2 | |
| 208 | + vst1.32 {d0}, [r0,:64]! | |
| 209 | + bx lr | |
| 210 | +endfunc | |
| 211 | + | |
| 212 | +function ff_sbr_hf_gen_neon, export=1 | |
| 213 | +NOVFP vld1.32 {d1[]}, [sp,:32] | |
| 214 | +VFP vdup.32 d1, d0[0] | |
| 215 | + vmul.f32 d0, d1, d1 | |
| 216 | + vld1.32 {d3}, [r2,:64] | |
| 217 | + vld1.32 {d2}, [r3,:64] | |
| 218 | + vmul.f32 q0, q0, q1 | |
| 219 | + ldrd r2, r3, [sp, #4*!HAVE_VFP_ARGS] | |
| 220 | + vtrn.32 d0, d1 | |
| 221 | + vneg.f32 d18, d1 | |
| 222 | + vtrn.32 d18, d1 | |
| 223 | + add r0, r0, r2, lsl #3 | |
| 224 | + add r1, r1, r2, lsl #3 | |
| 225 | + sub r1, r1, #2*8 | |
| 226 | + sub r3, r3, r2 | |
| 227 | + vld1.32 {q1}, [r1,:128]! | |
| 228 | +1: | |
| 229 | + vld1.32 {q3}, [r1,:128]! | |
| 230 | + vrev64.32 q2, q1 | |
| 231 | + vmov q8, q3 | |
| 232 | + vrev64.32 d20, d3 | |
| 233 | + vrev64.32 d21, d6 | |
| 234 | + vmla.f32 q3, q1, d0[0] | |
| 235 | + vmla.f32 d6, d4, d18 | |
| 236 | + vmla.f32 d7, d20, d18 | |
| 237 | + vmla.f32 d6, d3, d0[1] | |
| 238 | + vmla.f32 d7, d16, d0[1] | |
| 239 | + vmla.f32 d6, d5, d1 | |
| 240 | + vmla.f32 d7, d21, d1 | |
| 241 | + vmov q1, q8 | |
| 242 | + vst1.32 {q3}, [r0,:128]! | |
| 243 | + subs r3, r3, #2 | |
| 244 | + bgt 1b | |
| 245 | + bx lr | |
| 246 | +endfunc | |
| 247 | + | |
| 248 | +function ff_sbr_autocorrelate_neon, export=1 | |
| 249 | + vld1.32 {q0}, [r0,:128]! | |
| 250 | + vmov.f32 q1, #0.0 | |
| 251 | + vmov.f32 q3, #0.0 | |
| 252 | + vmov.f32 d20, #0.0 | |
| 253 | + vmul.f32 d21, d1, d1 | |
| 254 | + vmov q8, q0 | |
| 255 | + vmov q11, q0 | |
| 256 | + mov r12, #36 | |
| 257 | +1: | |
| 258 | + vld1.32 {q2}, [r0,:128]! | |
| 259 | + vrev64.32 q12, q2 | |
| 260 | + vmla.f32 q10, q2, q2 | |
| 261 | + vmla.f32 d2, d1, d4 | |
| 262 | + vmla.f32 d3, d1, d24 | |
| 263 | + vmla.f32 d6, d0, d4 | |
| 264 | + vmla.f32 d7, d0, d24 | |
| 265 | + vmla.f32 d2, d4, d5 | |
| 266 | + vmla.f32 d3, d4, d25 | |
| 267 | + vmla.f32 d6, d1, d5 | |
| 268 | + vmla.f32 d7, d1, d25 | |
| 269 | + vmov q0, q2 | |
| 270 | + subs r12, r12, #2 | |
| 271 | + bgt 1b | |
| 272 | + vld1.32 {q2}, [r0,:128]! | |
| 273 | + vrev64.32 q12, q2 | |
| 274 | + vmla.f32 d2, d1, d4 | |
| 275 | + vmla.f32 d3, d1, d24 | |
| 276 | + vmla.f32 d6, d0, d4 | |
| 277 | + vmla.f32 d7, d0, d24 | |
| 278 | + vadd.f32 d20, d20, d21 | |
| 279 | + vrev64.32 d18, d17 | |
| 280 | + vmla.f32 d6, d1, d5 | |
| 281 | + vmla.f32 d7, d1, d25 | |
| 282 | + vmov q0, q1 | |
| 283 | + vmla.f32 d0, d16, d17 | |
| 284 | + vmla.f32 d1, d16, d18 | |
| 285 | + vmla.f32 d2, d4, d5 | |
| 286 | + vmla.f32 d3, d4, d25 | |
| 287 | + vneg.f32 s15, s15 | |
| 288 | + vmov d21, d20 | |
| 289 | + vpadd.f32 d0, d0, d2 | |
| 290 | + vpadd.f32 d7, d6, d7 | |
| 291 | + vtrn.32 d1, d3 | |
| 292 | + vsub.f32 d6, d1, d3 | |
| 293 | + vmla.f32 d20, d22, d22 | |
| 294 | + vmla.f32 d21, d4, d4 | |
| 295 | + vtrn.32 d0, d6 | |
| 296 | + vpadd.f32 d20, d20, d21 | |
| 297 | + vst1.32 {q3}, [r1,:128]! | |
| 298 | + vst1.32 {d20[1]}, [r1,:32] | |
| 299 | + add r1, r1, #2*4 | |
| 300 | + vst1.32 {d0}, [r1,:64] | |
| 301 | + add r1, r1, #4*4 | |
| 302 | + vst1.32 {d20[0]}, [r1,:32] | |
| 303 | + bx lr | |
| 304 | +endfunc | |
| 305 | + | |
| 306 | +function ff_sbr_hf_apply_noise_0_neon, export=1 | |
| 307 | + vmov.i32 d3, #0 | |
| 308 | +.Lhf_apply_noise_0: | |
| 309 | + push {r4,lr} | |
| 310 | + ldr r12, [sp, #12] | |
| 311 | + movrel r4, X(ff_sbr_noise_table) | |
| 312 | + add r3, r3, #1 | |
| 313 | + bfc r3, #9, #23 | |
| 314 | + sub r12, r12, #1 | |
| 315 | +1: | |
| 316 | + add lr, r4, r3, lsl #3 | |
| 317 | + vld2.32 {q0}, [r0,:64] | |
| 318 | + vld2.32 {q3}, [lr,:64] | |
| 319 | + vld1.32 {d2}, [r1,:64]! | |
| 320 | + vld1.32 {d18}, [r2,:64]! | |
| 321 | + vceq.f32 d16, d2, #0 | |
| 322 | + veor d2, d2, d3 | |
| 323 | + vmov q2, q0 | |
| 324 | + vmla.f32 d0, d6, d18 | |
| 325 | + vmla.f32 d1, d7, d18 | |
| 326 | + vadd.f32 d4, d4, d2 | |
| 327 | + add r3, r3, #2 | |
| 328 | + bfc r3, #9, #23 | |
| 329 | + vbif d0, d4, d16 | |
| 330 | + vbif d1, d5, d16 | |
| 331 | + vst2.32 {q0}, [r0,:64]! | |
| 332 | + subs r12, r12, #2 | |
| 333 | + bgt 1b | |
| 334 | + blt 2f | |
| 335 | + add lr, r4, r3, lsl #3 | |
| 336 | + vld1.32 {d0}, [r0,:64] | |
| 337 | + vld1.32 {d6}, [lr,:64] | |
| 338 | + vld1.32 {d2[]}, [r1,:32]! | |
| 339 | + vld1.32 {d3[]}, [r2,:32]! | |
| 340 | + vceq.f32 d4, d2, #0 | |
| 341 | + veor d2, d2, d3 | |
| 342 | + vmov d1, d0 | |
| 343 | + vmla.f32 d0, d6, d3 | |
| 344 | + vadd.f32 s2, s2, s4 | |
| 345 | + vbif d0, d1, d4 | |
| 346 | + vst1.32 {d0}, [r0,:64]! | |
| 347 | +2: | |
| 348 | + pop {r4,pc} | |
| 349 | +endfunc | |
| 350 | + | |
| 351 | +function ff_sbr_hf_apply_noise_1_neon, export=1 | |
| 352 | + ldr r12, [sp] | |
| 353 | + push {r4,lr} | |
| 354 | + lsl r12, r12, #31 | |
| 355 | + eor lr, r12, #1<<31 | |
| 356 | + vmov d3, r12, lr | |
| 357 | +.Lhf_apply_noise_1: | |
| 358 | + ldr r12, [sp, #12] | |
| 359 | + movrel r4, X(ff_sbr_noise_table) | |
| 360 | + add r3, r3, #1 | |
| 361 | + bfc r3, #9, #23 | |
| 362 | + sub r12, r12, #1 | |
| 363 | +1: | |
| 364 | + add lr, r4, r3, lsl #3 | |
| 365 | + vld2.32 {q0}, [r0,:64] | |
| 366 | + vld2.32 {q3}, [lr,:64] | |
| 367 | + vld1.32 {d2}, [r1,:64]! | |
| 368 | + vld1.32 {d18}, [r2,:64]! | |
| 369 | + vceq.f32 d16, d2, #0 | |
| 370 | + veor d2, d2, d3 | |
| 371 | + vmov q2, q0 | |
| 372 | + vmla.f32 d0, d6, d18 | |
| 373 | + vmla.f32 d1, d7, d18 | |
| 374 | + vadd.f32 d5, d5, d2 | |
| 375 | + add r3, r3, #2 | |
| 376 | + bfc r3, #9, #23 | |
| 377 | + vbif d0, d4, d16 | |
| 378 | + vbif d1, d5, d16 | |
| 379 | + vst2.32 {q0}, [r0,:64]! | |
| 380 | + subs r12, r12, #2 | |
| 381 | + bgt 1b | |
| 382 | + blt 2f | |
| 383 | + add lr, r4, r3, lsl #3 | |
| 384 | + vld1.32 {d0}, [r0,:64] | |
| 385 | + vld1.32 {d6}, [lr,:64] | |
| 386 | + vld1.32 {d2[]}, [r1,:32]! | |
| 387 | + vld1.32 {d18[]}, [r2,:32]! | |
| 388 | + vceq.f32 d4, d2, #0 | |
| 389 | + veor d2, d2, d3 | |
| 390 | + vmov d1, d0 | |
| 391 | + vmla.f32 d0, d6, d18 | |
| 392 | + vadd.f32 s3, s3, s5 | |
| 393 | + vbif d0, d1, d4 | |
| 394 | + vst1.32 {d0}, [r0,:64]! | |
| 395 | +2: | |
| 396 | + pop {r4,pc} | |
| 397 | +endfunc | |
| 398 | + | |
| 399 | +function ff_sbr_hf_apply_noise_2_neon, export=1 | |
| 400 | + vmov.i32 d3, #1<<31 | |
| 401 | + b .Lhf_apply_noise_0 | |
| 402 | +endfunc | |
| 403 | + | |
| 404 | +function ff_sbr_hf_apply_noise_3_neon, export=1 | |
| 405 | + ldr r12, [sp] | |
| 406 | + push {r4,lr} | |
| 407 | + lsl r12, r12, #31 | |
| 408 | + eor lr, r12, #1<<31 | |
| 409 | + vmov d3, lr, r12 | |
| 410 | + b .Lhf_apply_noise_1 | |
| 411 | +endfunc | |
| @@ -117,4 +117,3 @@ void atrac_iqmf (float *inlo, float *inhi, unsigned int nIn, float *pOut, float · 116 unmodified lines | ||
| 117 | 117 | /* Update the delay buffer. */ |
| 118 | 118 | memcpy(delayBuf, temp + nIn*2, 46*sizeof(float)); |
| 119 | 119 | } |
| 120 | − | |
| @@ -134,4 +134,3 @@ AVCodec ff_aura2_decoder = { · 133 unmodified lines | ||
| 134 | 134 | .capabilities = CODEC_CAP_DR1, |
| 135 | 135 | .long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"), |
| 136 | 136 | }; |
| 137 | − | |
| @@ -3566,6 +3566,9 @@ AVCodecContext *avcodec_alloc_context2(enum AVMediaType); · 3565 unmodified lines | ||
| 3566 | 3566 | * @param codec if non-NULL, allocate private data and initialize defaults |
| 3567 | 3567 | * for the given codec. It is illegal to then call avcodec_open2() |
| 3568 | 3568 | * with a different codec. |
| 3569 | + * If NULL, then the codec-specific defaults won't be initialized, | |
| 3570 | + * which may result in suboptimal default settings (this is | |
| 3571 | + * important mainly for encoders, e.g. libx264). | |
| 3569 | 3572 | * |
| 3570 | 3573 | * @return An AVCodecContext filled with default values or NULL on failure. |
| 3571 | 3574 | * @see avcodec_get_context_defaults |
| @@ -322,4 +322,3 @@ void free_vlc(VLC *vlc) · 321 unmodified lines | ||
| 322 | 322 | { |
| 323 | 323 | av_freep(&vlc->table); |
| 324 | 324 | } |
| 325 | − | |
| @@ -266,4 +266,3 @@ AVCodec ff_cscd_decoder = { · 265 unmodified lines | ||
| 266 | 266 | .capabilities = CODEC_CAP_DR1, |
| 267 | 267 | .long_name = NULL_IF_CONFIG_SMALL("CamStudio"), |
| 268 | 268 | }; |
| 269 | − | |
| @@ -294,4 +294,3 @@ const DVprofile* avpriv_dv_codec_profile(AVCodecContext* codec) · 293 unmodified lines | ||
| 294 | 294 | |
| 295 | 295 | return NULL; |
| 296 | 296 | } |
| 297 | − | |
| @@ -331,4 +331,3 @@ AVCodec ff_dxa_decoder = { · 330 unmodified lines | ||
| 331 | 331 | .capabilities = CODEC_CAP_DR1, |
| 332 | 332 | .long_name = NULL_IF_CONFIG_SMALL("Feeble Files/ScummVM DXA"), |
| 333 | 333 | }; |
| 334 | − | |
| @@ -151,4 +151,3 @@ end: · 150 unmodified lines | ||
| 151 | 151 | ff_draw_horiz_band(s, 0, s->avctx->height); |
| 152 | 152 | return result; |
| 153 | 153 | } |
| 154 | − | |
| @@ -448,4 +448,3 @@ AVHWAccel ff_h264_dxva2_hwaccel = { · 447 unmodified lines | ||
| 448 | 448 | .end_frame = end_frame, |
| 449 | 449 | .priv_data_size = sizeof(struct dxva2_picture_context), |
| 450 | 450 | }; |
| 451 | − | |
| @@ -270,4 +270,3 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = { · 269 unmodified lines | ||
| 270 | 270 | .end_frame = end_frame, |
| 271 | 271 | .priv_data_size = sizeof(struct dxva2_picture_context), |
| 272 | 272 | }; |
| 273 | − | |
| @@ -286,4 +286,3 @@ AVHWAccel ff_vc1_dxva2_hwaccel = { · 285 unmodified lines | ||
| 286 | 286 | .end_frame = end_frame, |
| 287 | 287 | .priv_data_size = sizeof(struct dxva2_picture_context), |
| 288 | 288 | }; |
| 289 | − | |
| @@ -376,4 +376,3 @@ AVCodec ff_escape124_decoder = { · 375 unmodified lines | ||
| 376 | 376 | .capabilities = CODEC_CAP_DR1, |
| 377 | 377 | .long_name = NULL_IF_CONFIG_SMALL("Escape 124"), |
| 378 | 378 | }; |
| 379 | − | |
| @@ -350,4 +350,3 @@ static void ff_fft_calc_c(FFTContext *s, FFTComplex *z) · 349 unmodified lines | ||
| 350 | 350 | { |
| 351 | 351 | fft_dispatch[s->nbits-2](z); |
| 352 | 352 | } |
| 353 | − | |
| @@ -286,4 +286,3 @@ AVCodec ff_flashsv_encoder = { · 285 unmodified lines | ||
| 286 | 286 | .pix_fmts = (const enum PixelFormat[]){PIX_FMT_BGR24, PIX_FMT_NONE}, |
| 287 | 287 | .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video"), |
| 288 | 288 | }; |
| 289 | − | |
| @@ -51,4 +51,3 @@ void ff_h261_loop_filter(MpegEncContext *s){ · 50 unmodified lines | ||
| 51 | 51 | s->dsp.h261_loop_filter(dest_cb, uvlinesize); |
| 52 | 52 | s->dsp.h261_loop_filter(dest_cr, uvlinesize); |
| 53 | 53 | } |
| 54 | − | |
| @@ -332,4 +332,3 @@ AVCodec ff_h261_encoder = { · 331 unmodified lines | ||
| 332 | 332 | .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, |
| 333 | 333 | .long_name= NULL_IF_CONFIG_SMALL("H.261"), |
| 334 | 334 | }; |
| 335 | − | |
| @@ -1169,4 +1169,3 @@ decode_intra_mb: · 1168 unmodified lines | ||
| 1169 | 1169 | |
| 1170 | 1170 | return 0; |
| 1171 | 1171 | } |
| 1172 | − | |
| @@ -188,4 +188,3 @@ AVBitStreamFilter ff_h264_mp4toannexb_bsf = { · 187 unmodified lines | ||
| 188 | 188 | sizeof(H264BSFContext), |
| 189 | 189 | h264_mp4toannexb_filter, |
| 190 | 190 | }; |
| 191 | − | |
| @@ -265,4 +265,3 @@ AVCodec ff_idcin_decoder = { · 264 unmodified lines | ||
| 265 | 265 | .capabilities = CODEC_CAP_DR1, |
| 266 | 266 | .long_name = NULL_IF_CONFIG_SMALL("id Quake II CIN video"), |
| 267 | 267 | }; |
| 268 | − | |
| @@ -904,4 +904,3 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, · 903 unmodified lines | ||
| 904 | 904 | emms_c(); |
| 905 | 905 | return 0; |
| 906 | 906 | } |
| 907 | − | |
| @@ -136,4 +136,3 @@ AVCodec ff_h263i_decoder = { · 135 unmodified lines | ||
| 136 | 136 | .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"), |
| 137 | 137 | .pix_fmts= ff_pixfmt_list_420, |
| 138 | 138 | }; |
| 139 | − | |
| @@ -45,4 +45,3 @@ av_cold void ff_kbd_window_init(float *window, float alpha, int n) · 44 unmodified lines | ||
| 45 | 45 | for (i = 0; i < n; i++) |
| 46 | 46 | window[i] = sqrt(local_window[i] / sum); |
| 47 | 47 | } |
| 48 | − | |
| @@ -126,4 +126,3 @@ AVCodec ff_libvo_aacenc_encoder = { · 125 unmodified lines | ||
| 126 | 126 | .sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE}, |
| 127 | 127 | .long_name = NULL_IF_CONFIG_SMALL("Android VisualOn AAC"), |
| 128 | 128 | }; |
| 129 | − | |
| @@ -130,4 +130,3 @@ AVCodec ff_libvo_amrwbenc_encoder = { · 129 unmodified lines | ||
| 130 | 130 | "(AMR) Wide-Band"), |
| 131 | 131 | .priv_class = &class, |
| 132 | 132 | }; |
| 133 | − | |
| @@ -384,4 +384,3 @@ AVCodec ff_libxavs_encoder = { · 383 unmodified lines | ||
| 384 | 384 | .priv_class = &class, |
| 385 | 385 | .defaults = xavs_defaults, |
| 386 | 386 | }; |
| 387 | − | |
| @@ -146,4 +146,3 @@ void ff_xvid_rate_control_uninit(MpegEncContext *s){ · 145 unmodified lines | ||
| 146 | 146 | |
| 147 | 147 | xvid_plugin_2pass2(s->rc_context.non_lavc_opaque, XVID_PLG_DESTROY, &xvid_plg_destroy, NULL); |
| 148 | 148 | } |
| 149 | − | |
| @@ -310,4 +310,3 @@ AVCodec ff_mace6_decoder = { · 309 unmodified lines | ||
| 310 | 310 | .capabilities = CODEC_CAP_DR1, |
| 311 | 311 | .long_name = NULL_IF_CONFIG_SMALL("MACE (Macintosh Audio Compression/Expansion) 6:1"), |
| 312 | 312 | }; |
| 313 | − | |
| @@ -179,4 +179,3 @@ if ((y) < (x)) {\ · 178 unmodified lines | ||
| 179 | 179 | #endif |
| 180 | 180 | |
| 181 | 181 | #endif /* AVCODEC_MATHOPS_H */ |
| 182 | − | |
| @@ -278,4 +278,3 @@ AVCodec ff_mdec_decoder = { · 277 unmodified lines | ||
| 278 | 278 | .long_name= NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"), |
| 279 | 279 | .init_thread_copy= ONLY_IF_THREADS_ENABLED(decode_init_thread_copy) |
| 280 | 280 | }; |
| 281 | − | |
| @@ -59,4 +59,3 @@ uint64_t ff_truehd_layout(int chanmap); · 58 unmodified lines | ||
| 59 | 59 | extern const uint64_t ff_mlp_layout[32]; |
| 60 | 60 | |
| 61 | 61 | #endif /* AVCODEC_MLP_PARSER_H */ |
| 62 | − | |
| @@ -2668,4 +2668,3 @@ AVCodec ff_mpeg1_vdpau_decoder = { · 2667 unmodified lines | ||
| 2668 | 2668 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video (VDPAU acceleration)"), |
| 2669 | 2669 | }; |
| 2670 | 2670 | #endif |
| 2671 | − | |
| @@ -168,4 +168,3 @@ int ff_mpeg4_set_direct_mv(MpegEncContext *s, int mx, int my){ · 167 unmodified lines | ||
| 168 | 168 | return MB_TYPE_DIRECT2 | MB_TYPE_16x16 | MB_TYPE_L0L1; //Note see prev line |
| 169 | 169 | } |
| 170 | 170 | } |
| 171 | − | |
| @@ -260,4 +260,3 @@ int ff_msrle_decode(AVCodecContext *avctx, AVPicture *pic, int depth, · 259 unmodified lines | ||
| 260 | 260 | return -1; |
| 261 | 261 | } |
| 262 | 262 | } |
| 263 | − | |
| @@ -37,4 +37,3 @@ int ff_msrle_decode(AVCodecContext *avctx, AVPicture *pic, int depth, · 36 unmodified lines | ||
| 37 | 37 | const uint8_t* data, int data_size); |
| 38 | 38 | |
| 39 | 39 | #endif /* AVCODEC_MSRLEDEC_H */ |
| 40 | − | |
| @@ -223,4 +223,3 @@ void ff_nelly_get_sample_bits(const float *buf, int *bits) · 222 unmodified lines | ||
| 223 | 223 | bits[i] = 0; |
| 224 | 224 | } |
| 225 | 225 | } |
| 226 | − | |
| @@ -232,4 +232,3 @@ AVCodec ff_nellymoser_decoder = { · 231 unmodified lines | ||
| 232 | 232 | AV_SAMPLE_FMT_S16, |
| 233 | 233 | AV_SAMPLE_FMT_NONE }, |
| 234 | 234 | }; |
| 235 | − | |
| @@ -297,4 +297,3 @@ AVCodec ff_nuv_decoder = { · 296 unmodified lines | ||
| 297 | 297 | .capabilities = CODEC_CAP_DR1, |
| 298 | 298 | .long_name = NULL_IF_CONFIG_SMALL("NuppelVideo/RTJPEG"), |
| 299 | 299 | }; |
| 300 | − | |
| @@ -37,4 +37,3 @@ int main(void) · 36 unmodified lines | ||
| 37 | 37 | |
| 38 | 38 | return 0; |
| 39 | 39 | } |
| 40 | − | |
| @@ -134,4 +134,3 @@ av_cold void ff_psy_preprocess_end(struct FFPsyPreprocessContext *ctx) · 133 unmodified lines | ||
| 134 | 134 | av_freep(&ctx->fstate); |
| 135 | 135 | av_free(ctx); |
| 136 | 136 | } |
| 137 | − | |
| @@ -565,4 +565,3 @@ AVCodec ff_qtrle_decoder = { · 564 unmodified lines | ||
| 565 | 565 | .capabilities = CODEC_CAP_DR1, |
| 566 | 566 | .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), |
| 567 | 567 | }; |
| 568 | − | |
| @@ -102,4 +102,3 @@ void ff_xvid_rate_control_uninit(struct MpegEncContext *s); · 101 unmodified lines | ||
| 102 | 102 | float ff_xvid_rate_estimate_qscale(struct MpegEncContext *s, int dry_run); |
| 103 | 103 | |
| 104 | 104 | #endif /* AVCODEC_RATECONTROL_H */ |
| 105 | − | |
| @@ -230,4 +230,3 @@ AVCodec ff_rl2_decoder = { · 229 unmodified lines | ||
| 230 | 230 | .capabilities = CODEC_CAP_DR1, |
| 231 | 231 | .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), |
| 232 | 232 | }; |
| 233 | − | |
| @@ -32,6 +32,7 @@ · 31 unmodified lines | ||
| 32 | 32 | #include <stdint.h> |
| 33 | 33 | #include "fft.h" |
| 34 | 34 | #include "aacps.h" |
| 35 | +#include "sbrdsp.h" | |
| 35 | 36 | |
| 36 | 37 | /** |
| 37 | 38 | * Spectral Band Replication header - spectrum parameters that invoke a reset if they differ from the previous header. |
| @@ -87,8 +88,8 @@ typedef struct { · 49 unmodified lines | ||
| 87 | 88 | ///QMF values of the original signal |
| 88 | 89 | float W[2][32][32][2]; |
| 89 | 90 | ///QMF output of the HF adjustor |
| 90 | − float Y[2][38][64][2]; | |
| 91 | − float g_temp[42][48]; | |
| 91 | + DECLARE_ALIGNED(16, float, Y)[2][38][64][2]; | |
| 92 | + DECLARE_ALIGNED(16, float, g_temp)[42][48]; | |
| 92 | 93 | float q_temp[42][48]; |
| 93 | 94 | uint8_t s_indexmapped[8][48]; |
| 94 | 95 | ///Envelope scalefactors |
| @@ -155,15 +156,15 @@ typedef struct { · 60 unmodified lines | ||
| 155 | 156 | uint8_t patch_num_subbands[6]; |
| 156 | 157 | uint8_t patch_start_subband[6]; |
| 157 | 158 | ///QMF low frequency input to the HF generator |
| 158 | − float X_low[32][40][2]; | |
| 159 | + DECLARE_ALIGNED(16, float, X_low)[32][40][2]; | |
| 159 | 160 | ///QMF output of the HF generator |
| 160 | − float X_high[64][40][2]; | |
| 161 | + DECLARE_ALIGNED(16, float, X_high)[64][40][2]; | |
| 161 | 162 | ///QMF values of the reconstructed signal |
| 162 | 163 | DECLARE_ALIGNED(16, float, X)[2][2][38][64]; |
| 163 | 164 | ///Zeroth coefficient used to filter the subband signals |
| 164 | − float alpha0[64][2]; | |
| 165 | + DECLARE_ALIGNED(16, float, alpha0)[64][2]; | |
| 165 | 166 | ///First coefficient used to filter the subband signals |
| 166 | − float alpha1[64][2]; | |
| 167 | + DECLARE_ALIGNED(16, float, alpha1)[64][2]; | |
| 167 | 168 | ///Dequantized envelope scalefactors, remapped |
| 168 | 169 | float e_origmapped[7][48]; |
| 169 | 170 | ///Dequantized noise scalefactors, remapped |
| @@ -180,6 +181,7 @@ typedef struct { · 10 unmodified lines | ||
| 180 | 181 | DECLARE_ALIGNED(16, float, qmf_filter_scratch)[5][64]; |
| 181 | 182 | FFTContext mdct_ana; |
| 182 | 183 | FFTContext mdct; |
| 184 | + SBRDSPContext dsp; | |
| 183 | 185 | } SpectralBandReplication; |
| 184 | 186 | |
| 185 | 187 | #endif /* AVCODEC_SBR_H */ |
| @@ -0,0 +1,241 @@ | ||
| 1 | +/* | |
| 2 | + * AAC Spectral Band Replication decoding functions | |
| 3 | + * Copyright (c) 2008-2009 Robert Swain ( rob opendot cl ) | |
| 4 | + * Copyright (c) 2009-2010 Alex Converse <alex.converse@gmail.com> | |
| 5 | + * | |
| 6 | + * This file is part of Libav. | |
| 7 | + * | |
| 8 | + * Libav is free software; you can redistribute it and/or | |
| 9 | + * modify it under the terms of the GNU Lesser General Public | |
| 10 | + * License as published by the Free Software Foundation; either | |
| 11 | + * version 2.1 of the License, or (at your option) any later version. | |
| 12 | + * | |
| 13 | + * Libav is distributed in the hope that it will be useful, | |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 16 | + * Lesser General Public License for more details. | |
| 17 | + * | |
| 18 | + * You should have received a copy of the GNU Lesser General Public | |
| 19 | + * License along with Libav; if not, write to the Free Software | |
| 20 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 21 | + */ | |
| 22 | + | |
| 23 | +#include "config.h" | |
| 24 | +#include "libavutil/attributes.h" | |
| 25 | +#include "sbrdsp.h" | |
| 26 | + | |
| 27 | +static void sbr_sum64x5_c(float *z) | |
| 28 | +{ | |
| 29 | + int k; | |
| 30 | + for (k = 0; k < 64; k++) { | |
| 31 | + float f = z[k] + z[k + 64] + z[k + 128] + z[k + 192] + z[k + 256]; | |
| 32 | + z[k] = f; | |
| 33 | + } | |
| 34 | +} | |
| 35 | + | |
| 36 | +static float sbr_sum_square_c(float (*x)[2], int n) | |
| 37 | +{ | |
| 38 | + float sum = 0.0f; | |
| 39 | + int i; | |
| 40 | + | |
| 41 | + for (i = 0; i < n; i++) | |
| 42 | + sum += x[i][0] * x[i][0] + x[i][1] * x[i][1]; | |
| 43 | + | |
| 44 | + return sum; | |
| 45 | +} | |
| 46 | + | |
| 47 | +static void sbr_neg_odd_64_c(float *x) | |
| 48 | +{ | |
| 49 | + int i; | |
| 50 | + for (i = 1; i < 64; i += 2) | |
| 51 | + x[i] = -x[i]; | |
| 52 | +} | |
| 53 | + | |
| 54 | +static void sbr_qmf_pre_shuffle_c(float *z) | |
| 55 | +{ | |
| 56 | + int k; | |
| 57 | + z[64] = z[0]; | |
| 58 | + z[65] = z[1]; | |
| 59 | + for (k = 1; k < 32; k++) { | |
| 60 | + z[64+2*k ] = -z[64 - k]; | |
| 61 | + z[64+2*k+1] = z[ k + 1]; | |
| 62 | + } | |
| 63 | +} | |
| 64 | + | |
| 65 | +static void sbr_qmf_post_shuffle_c(float W[32][2], const float *z) | |
| 66 | +{ | |
| 67 | + int k; | |
| 68 | + for (k = 0; k < 32; k++) { | |
| 69 | + W[k][0] = -z[63-k]; | |
| 70 | + W[k][1] = z[k]; | |
| 71 | + } | |
| 72 | +} | |
| 73 | + | |
| 74 | +static void sbr_qmf_deint_neg_c(float *v, const float *src) | |
| 75 | +{ | |
| 76 | + int i; | |
| 77 | + for (i = 0; i < 32; i++) { | |
| 78 | + v[ i] = src[63 - 2*i ]; | |
| 79 | + v[63 - i] = -src[63 - 2*i - 1]; | |
| 80 | + } | |
| 81 | +} | |
| 82 | + | |
| 83 | +static void sbr_qmf_deint_bfly_c(float *v, const float *src0, const float *src1) | |
| 84 | +{ | |
| 85 | + int i; | |
| 86 | + for (i = 0; i < 64; i++) { | |
| 87 | + v[ i] = src0[i] - src1[63 - i]; | |
| 88 | + v[127 - i] = src0[i] + src1[63 - i]; | |
| 89 | + } | |
| 90 | +} | |
| 91 | + | |
| 92 | +static av_always_inline void autocorrelate(const float x[40][2], | |
| 93 | + float phi[3][2][2], int lag) | |
| 94 | +{ | |
| 95 | + int i; | |
| 96 | + float real_sum = 0.0f; | |
| 97 | + float imag_sum = 0.0f; | |
| 98 | + if (lag) { | |
| 99 | + for (i = 1; i < 38; i++) { | |
| 100 | + real_sum += x[i][0] * x[i+lag][0] + x[i][1] * x[i+lag][1]; | |
| 101 | + imag_sum += x[i][0] * x[i+lag][1] - x[i][1] * x[i+lag][0]; | |
| 102 | + } | |
| 103 | + phi[2-lag][1][0] = real_sum + x[ 0][0] * x[lag][0] + x[ 0][1] * x[lag][1]; | |
| 104 | + phi[2-lag][1][1] = imag_sum + x[ 0][0] * x[lag][1] - x[ 0][1] * x[lag][0]; | |
| 105 | + if (lag == 1) { | |
| 106 | + phi[0][0][0] = real_sum + x[38][0] * x[39][0] + x[38][1] * x[39][1]; | |
| 107 | + phi[0][0][1] = imag_sum + x[38][0] * x[39][1] - x[38][1] * x[39][0]; | |
| 108 | + } | |
| 109 | + } else { | |
| 110 | + for (i = 1; i < 38; i++) { | |
| 111 | + real_sum += x[i][0] * x[i][0] + x[i][1] * x[i][1]; | |
| 112 | + } | |
| 113 | + phi[2][1][0] = real_sum + x[ 0][0] * x[ 0][0] + x[ 0][1] * x[ 0][1]; | |
| 114 | + phi[1][0][0] = real_sum + x[38][0] * x[38][0] + x[38][1] * x[38][1]; | |
| 115 | + } | |
| 116 | +} | |
| 117 | + | |
| 118 | +static void sbr_autocorrelate_c(const float x[40][2], float phi[3][2][2]) | |
| 119 | +{ | |
| 120 | + autocorrelate(x, phi, 0); | |
| 121 | + autocorrelate(x, phi, 1); | |
| 122 | + autocorrelate(x, phi, 2); | |
| 123 | +} | |
| 124 | + | |
| 125 | +static void sbr_hf_gen_c(float (*X_high)[2], const float (*X_low)[2], | |
| 126 | + const float alpha0[2], const float alpha1[2], | |
| 127 | + float bw, int start, int end) | |
| 128 | +{ | |
| 129 | + float alpha[4]; | |
| 130 | + int i; | |
| 131 | + | |
| 132 | + alpha[0] = alpha1[0] * bw * bw; | |
| 133 | + alpha[1] = alpha1[1] * bw * bw; | |
| 134 | + alpha[2] = alpha0[0] * bw; | |
| 135 | + alpha[3] = alpha0[1] * bw; | |
| 136 | + | |
| 137 | + for (i = start; i < end; i++) { | |
| 138 | + X_high[i][0] = | |
| 139 | + X_low[i - 2][0] * alpha[0] - | |
| 140 | + X_low[i - 2][1] * alpha[1] + | |
| 141 | + X_low[i - 1][0] * alpha[2] - | |
| 142 | + X_low[i - 1][1] * alpha[3] + | |
| 143 | + X_low[i][0]; | |
| 144 | + X_high[i][1] = | |
| 145 | + X_low[i - 2][1] * alpha[0] + | |
| 146 | + X_low[i - 2][0] * alpha[1] + | |
| 147 | + X_low[i - 1][1] * alpha[2] + | |
| 148 | + X_low[i - 1][0] * alpha[3] + | |
| 149 | + X_low[i][1]; | |
| 150 | + } | |
| 151 | +} | |
| 152 | + | |
| 153 | +static void sbr_hf_g_filt_c(float (*Y)[2], const float (*X_high)[40][2], | |
| 154 | + const float *g_filt, int m_max, int ixh) | |
| 155 | +{ | |
| 156 | + int m; | |
| 157 | + | |
| 158 | + for (m = 0; m < m_max; m++) { | |
| 159 | + Y[m][0] = X_high[m][ixh][0] * g_filt[m]; | |
| 160 | + Y[m][1] = X_high[m][ixh][1] * g_filt[m]; | |
| 161 | + } | |
| 162 | +} | |
| 163 | + | |
| 164 | +static av_always_inline void sbr_hf_apply_noise(float (*Y)[2], | |
| 165 | + const float *s_m, | |
| 166 | + const float *q_filt, | |
| 167 | + int noise, | |
| 168 | + float phi_sign0, | |
| 169 | + float phi_sign1, | |
| 170 | + int m_max) | |
| 171 | +{ | |
| 172 | + int m; | |
| 173 | + | |
| 174 | + for (m = 0; m < m_max; m++) { | |
| 175 | + float y0 = Y[m][0]; | |
| 176 | + float y1 = Y[m][1]; | |
| 177 | + noise = (noise + 1) & 0x1ff; | |
| 178 | + if (s_m[m]) { | |
| 179 | + y0 += s_m[m] * phi_sign0; | |
| 180 | + y1 += s_m[m] * phi_sign1; | |
| 181 | + } else { | |
| 182 | + y0 += q_filt[m] * ff_sbr_noise_table[noise][0]; | |
| 183 | + y1 += q_filt[m] * ff_sbr_noise_table[noise][1]; | |
| 184 | + } | |
| 185 | + Y[m][0] = y0; | |
| 186 | + Y[m][1] = y1; | |
| 187 | + phi_sign1 = -phi_sign1; | |
| 188 | + } | |
| 189 | +} | |
| 190 | + | |
| 191 | +static void sbr_hf_apply_noise_0(float (*Y)[2], const float *s_m, | |
| 192 | + const float *q_filt, int noise, | |
| 193 | + int kx, int m_max) | |
| 194 | +{ | |
| 195 | + sbr_hf_apply_noise(Y, s_m, q_filt, noise, 1.0, 0.0, m_max); | |
| 196 | +} | |
| 197 | + | |
| 198 | +static void sbr_hf_apply_noise_1(float (*Y)[2], const float *s_m, | |
| 199 | + const float *q_filt, int noise, | |
| 200 | + int kx, int m_max) | |
| 201 | +{ | |
| 202 | + float phi_sign = 1 - 2 * (kx & 1); | |
| 203 | + sbr_hf_apply_noise(Y, s_m, q_filt, noise, 0.0, phi_sign, m_max); | |
| 204 | +} | |
| 205 | + | |
| 206 | +static void sbr_hf_apply_noise_2(float (*Y)[2], const float *s_m, | |
| 207 | + const float *q_filt, int noise, | |
| 208 | + int kx, int m_max) | |
| 209 | +{ | |
| 210 | + sbr_hf_apply_noise(Y, s_m, q_filt, noise, -1.0, 0.0, m_max); | |
| 211 | +} | |
| 212 | + | |
| 213 | +static void sbr_hf_apply_noise_3(float (*Y)[2], const float *s_m, | |
| 214 | + const float *q_filt, int noise, | |
| 215 | + int kx, int m_max) | |
| 216 | +{ | |
| 217 | + float phi_sign = 1 - 2 * (kx & 1); | |
| 218 | + sbr_hf_apply_noise(Y, s_m, q_filt, noise, 0.0, -phi_sign, m_max); | |
| 219 | +} | |
| 220 | + | |
| 221 | +av_cold void ff_sbrdsp_init(SBRDSPContext *s) | |
| 222 | +{ | |
| 223 | + s->sum64x5 = sbr_sum64x5_c; | |
| 224 | + s->sum_square = sbr_sum_square_c; | |
| 225 | + s->neg_odd_64 = sbr_neg_odd_64_c; | |
| 226 | + s->qmf_pre_shuffle = sbr_qmf_pre_shuffle_c; | |
| 227 | + s->qmf_post_shuffle = sbr_qmf_post_shuffle_c; | |
| 228 | + s->qmf_deint_neg = sbr_qmf_deint_neg_c; | |
| 229 | + s->qmf_deint_bfly = sbr_qmf_deint_bfly_c; | |
| 230 | + s->autocorrelate = sbr_autocorrelate_c; | |
| 231 | + s->hf_gen = sbr_hf_gen_c; | |
| 232 | + s->hf_g_filt = sbr_hf_g_filt_c; | |
| 233 | + | |
| 234 | + s->hf_apply_noise[0] = sbr_hf_apply_noise_0; | |
| 235 | + s->hf_apply_noise[1] = sbr_hf_apply_noise_1; | |
| 236 | + s->hf_apply_noise[2] = sbr_hf_apply_noise_2; | |
| 237 | + s->hf_apply_noise[3] = sbr_hf_apply_noise_3; | |
| 238 | + | |
| 239 | + if (ARCH_ARM) | |
| 240 | + ff_sbrdsp_init_arm(s); | |
| 241 | +} | |
| @@ -0,0 +1,48 @@ | ||
| 1 | +/* | |
| 2 | + * Copyright (c) 2012 Mans Rullgard | |
| 3 | + * | |
| 4 | + * This file is part of Libav. | |
| 5 | + * | |
| 6 | + * Libav is free software; you can redistribute it and/or | |
| 7 | + * modify it under the terms of the GNU Lesser General Public | |
| 8 | + * License as published by the Free Software Foundation; either | |
| 9 | + * version 2.1 of the License, or (at your option) any later version. | |
| 10 | + * | |
| 11 | + * Libav is distributed in the hope that it will be useful, | |
| 12 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 14 | + * Lesser General Public License for more details. | |
| 15 | + * | |
| 16 | + * You should have received a copy of the GNU Lesser General Public | |
| 17 | + * License along with Libav; if not, write to the Free Software | |
| 18 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
| 19 | + */ | |
| 20 | + | |
| 21 | +#ifndef LIBAVCODEC_SBRDSP_H | |
| 22 | +#define LIBAVCODEC_SBRDSP_H | |
| 23 | + | |
| 24 | +typedef struct SBRDSPContext { | |
| 25 | + void (*sum64x5)(float *z); | |
| 26 | + float (*sum_square)(float (*x)[2], int n); | |
| 27 | + void (*neg_odd_64)(float *x); | |
| 28 | + void (*qmf_pre_shuffle)(float *z); | |
| 29 | + void (*qmf_post_shuffle)(float W[32][2], const float *z); | |
| 30 | + void (*qmf_deint_neg)(float *v, const float *src); | |
| 31 | + void (*qmf_deint_bfly)(float *v, const float *src0, const float *src1); | |
| 32 | + void (*autocorrelate)(const float x[40][2], float phi[3][2][2]); | |
| 33 | + void (*hf_gen)(float (*X_high)[2], const float (*X_low)[2], | |
| 34 | + const float alpha0[2], const float alpha1[2], | |
| 35 | + float bw, int start, int end); | |
| 36 | + void (*hf_g_filt)(float (*Y)[2], const float (*X_high)[40][2], | |
| 37 | + const float *g_filt, int m_max, int ixh); | |
| 38 | + void (*hf_apply_noise[4])(float (*Y)[2], const float *s_m, | |
| 39 | + const float *q_filt, int noise, | |
| 40 | + int kx, int m_max); | |
| 41 | +} SBRDSPContext; | |
| 42 | + | |
| 43 | +extern const float ff_sbr_noise_table[][2]; | |
| 44 | + | |
| 45 | +void ff_sbrdsp_init(SBRDSPContext *s); | |
| 46 | +void ff_sbrdsp_init_arm(SBRDSPContext *s); | |
| 47 | + | |
| 48 | +#endif | |
| @@ -269,4 +269,3 @@ AVCodec ff_sgi_decoder = { · 268 unmodified lines | ||
| 269 | 269 | .decode = decode_frame, |
| 270 | 270 | .long_name = NULL_IF_CONFIG_SMALL("SGI image"), |
| 271 | 271 | }; |
| 272 | − | |
| @@ -762,4 +762,3 @@ AVCodec ff_smackaud_decoder = { · 761 unmodified lines | ||
| 762 | 762 | .capabilities = CODEC_CAP_DR1, |
| 763 | 763 | .long_name = NULL_IF_CONFIG_SMALL("Smacker audio"), |
| 764 | 764 | }; |
| 765 | − | |
| @@ -650,4 +650,3 @@ av_cold void ff_snow_common_end(SnowContext *s) · 649 unmodified lines | ||
| 650 | 650 | if (s->current_picture.data[0]) |
| 651 | 651 | s->avctx->release_buffer(s->avctx, &s->current_picture); |
| 652 | 652 | } |
| 653 | − | |
| @@ -210,4 +210,3 @@ AVCodec ff_tscc_decoder = { · 209 unmodified lines | ||
| 210 | 210 | .capabilities = CODEC_CAP_DR1, |
| 211 | 211 | .long_name = NULL_IF_CONFIG_SMALL("TechSmith Screen Capture Codec"), |
| 212 | 212 | }; |
| 213 | − | |
| @@ -429,4 +429,3 @@ AVCodec ff_ulti_decoder = { · 428 unmodified lines | ||
| 429 | 429 | .capabilities = CODEC_CAP_DR1, |
| 430 | 430 | .long_name = NULL_IF_CONFIG_SMALL("IBM UltiMotion"), |
| 431 | 431 | }; |
| 432 | − | |
| @@ -242,7 +242,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 241 unmodified lines | ||
| 242 | 242 | *height+=2; // some of the optimized chroma MC reads one line too much |
| 243 | 243 | // which is also done in mpeg decoders with lowres > 0 |
| 244 | 244 | |
| 245 | − for (i = 0; i < AV_NUM_DATA_POINTERS; i++) | |
| 245 | + for (i = 0; i < 4; i++) | |
| 246 | 246 | linesize_align[i] = STRIDE_ALIGN; |
| 247 | 247 | //STRIDE_ALIGN is 8 for SSE* but this does not work for SVQ1 chroma planes |
| 248 | 248 | //we could change STRIDE_ALIGN to 16 for x86/sse but it would increase the |
| @@ -252,7 +252,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 3 unmodified lines | ||
| 252 | 252 | if(s->codec_id == CODEC_ID_SVQ1 || s->codec_id == CODEC_ID_VP5 || |
| 253 | 253 | s->codec_id == CODEC_ID_VP6 || s->codec_id == CODEC_ID_VP6F || |
| 254 | 254 | s->codec_id == CODEC_ID_VP6A || s->codec_id == CODEC_ID_DIRAC) { |
| 255 | − for (i = 0; i < AV_NUM_DATA_POINTERS; i++) | |
| 255 | + for (i = 0; i < 4; i++) | |
| 256 | 256 | linesize_align[i] = 16; |
| 257 | 257 | } |
| 258 | 258 | #endif |
| @@ -578,4 +578,3 @@ AVCodec ff_utvideo_decoder = { · 577 unmodified lines | ||
| 578 | 578 | .capabilities = CODEC_CAP_DR1 | CODEC_CAP_FRAME_THREADS, |
| 579 | 579 | .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), |
| 580 | 580 | }; |
| 581 | − | |
| @@ -281,4 +281,3 @@ AVCodec ff_vb_decoder = { · 280 unmodified lines | ||
| 281 | 281 | .decode = decode_frame, |
| 282 | 282 | .long_name = NULL_IF_CONFIG_SMALL("Beam Software VB"), |
| 283 | 283 | }; |
| 284 | − | |
| @@ -520,4 +520,3 @@ AVCodec ff_vmnc_decoder = { · 519 unmodified lines | ||
| 520 | 520 | .capabilities = CODEC_CAP_DR1, |
| 521 | 521 | .long_name = NULL_IF_CONFIG_SMALL("VMware Screen Codec / VMware Video"), |
| 522 | 522 | }; |
| 523 | − | |
| @@ -1725,4 +1725,3 @@ AVCodec ff_vorbis_decoder = { · 1724 unmodified lines | ||
| 1725 | 1725 | AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE |
| 1726 | 1726 | }, |
| 1727 | 1727 | }; |
| 1728 | − | |
| @@ -525,4 +525,3 @@ int ff_wma_run_level_decode(AVCodecContext* avctx, GetBitContext* gb, · 524 unmodified lines | ||
| 525 | 525 | |
| 526 | 526 | return 0; |
| 527 | 527 | } |
| 528 | − | |
| @@ -432,4 +432,3 @@ AVCodec ff_xan_wc4_decoder = { · 431 unmodified lines | ||
| 432 | 432 | .capabilities = CODEC_CAP_DR1, |
| 433 | 433 | .long_name = NULL_IF_CONFIG_SMALL("Wing Commander IV / Xxan"), |
| 434 | 434 | }; |
| 435 | − | |
| @@ -677,4 +677,3 @@ AVCodec ff_zmbv_decoder = { · 676 unmodified lines | ||
| 677 | 677 | .capabilities = CODEC_CAP_DR1, |
| 678 | 678 | .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), |
| 679 | 679 | }; |
| 680 | − | |
| @@ -78,4 +78,3 @@ const char *avdevice_license(void); · 77 unmodified lines | ||
| 78 | 78 | void avdevice_register_all(void); |
| 79 | 79 | |
| 80 | 80 | #endif /* AVDEVICE_AVDEVICE_H */ |
| 81 | − | |
| @@ -271,4 +271,3 @@ AVFilterBufferRef *avfilter_null_get_audio_buffer(AVFilterLink *link, int perms, · 270 unmodified lines | ||
| 271 | 271 | { |
| 272 | 272 | return avfilter_get_audio_buffer(link->dst->outputs[0], perms, nb_samples); |
| 273 | 273 | } |
| 274 | − | |
| @@ -357,3 +357,4 @@ int main(void) · 356 unmodified lines | ||
| 357 | 357 | } |
| 358 | 358 | |
| 359 | 359 | #endif |
| 360 | + | |
| @@ -143,4 +143,3 @@ AVFilter avfilter_vf_setsar = { · 142 unmodified lines | ||
| 143 | 143 | { .name = NULL}}, |
| 144 | 144 | }; |
| 145 | 145 | #endif /* CONFIG_SETSAR_FILTER */ |
| 146 | − | |
| @@ -142,4 +142,3 @@ AVFilter avfilter_vf_noformat = { · 141 unmodified lines | ||
| 142 | 142 | { .name = NULL}}, |
| 143 | 143 | }; |
| 144 | 144 | #endif /* CONFIG_NOFORMAT_FILTER */ |
| 145 | − | |
| @@ -103,4 +103,3 @@ AVInputFormat ff_aea_demuxer = { · 102 unmodified lines | ||
| 103 | 103 | .flags= AVFMT_GENERIC_INDEX, |
| 104 | 104 | .extensions = "aea", |
| 105 | 105 | }; |
| 106 | − | |
| @@ -383,4 +383,3 @@ int ff_check_interrupt(AVIOInterruptCB *cb) · 382 unmodified lines | ||
| 383 | 383 | return ret; |
| 384 | 384 | return 0; |
| 385 | 385 | } |
| 386 | − | |
| @@ -265,4 +265,3 @@ char *ff_http_auth_create_response(HTTPAuthState *state, const char *auth, · 264 unmodified lines | ||
| 265 | 265 | } |
| 266 | 266 | return authstr; |
| 267 | 267 | } |
| 268 | − | |
| @@ -39,4 +39,3 @@ extern const char * const ff_id3v1_genre_str[ID3v1_GENRE_MAX + 1]; · 38 unmodified lines | ||
| 39 | 39 | void ff_id3v1_read(AVFormatContext *s); |
| 40 | 40 | |
| 41 | 41 | #endif /* AVFORMAT_ID3V1_H */ |
| 42 | − | |
| @@ -135,4 +135,3 @@ AVInputFormat ff_iss_demuxer = { · 134 unmodified lines | ||
| 135 | 135 | .read_header = iss_read_header, |
| 136 | 136 | .read_packet = iss_read_packet, |
| 137 | 137 | }; |
| 138 | − | |
| @@ -346,4 +346,3 @@ AVInputFormat ff_lxf_demuxer = { · 345 unmodified lines | ||
| 346 | 346 | .read_packet = lxf_read_packet, |
| 347 | 347 | .codec_tag = (const AVCodecTag* const []){lxf_tags, 0}, |
| 348 | 348 | }; |
| 349 | − | |
| @@ -68,4 +68,3 @@ void ff_metadata_conv_ctx(AVFormatContext *ctx, const AVMetadataConv *d_conv, · 67 unmodified lines | ||
| 68 | 68 | for (i=0; i<ctx->nb_programs; i++) |
| 69 | 69 | ff_metadata_conv(&ctx->programs[i]->metadata, d_conv, s_conv); |
| 70 | 70 | } |
| 71 | − | |
| @@ -459,4 +459,3 @@ void ff_mov_close_hinting(MOVTrack *track) { · 458 unmodified lines | ||
| 459 | 459 | } |
| 460 | 460 | avformat_free_context(rtp_ctx); |
| 461 | 461 | } |
| 462 | − | |
| @@ -183,4 +183,3 @@ int ff_is_multicast_address(struct sockaddr *addr) · 182 unmodified lines | ||
| 183 | 183 | |
| 184 | 184 | return 0; |
| 185 | 185 | } |
| 186 | − | |
| @@ -445,4 +445,3 @@ AVInputFormat ff_oma_demuxer = { · 444 unmodified lines | ||
| 445 | 445 | .extensions = "oma,omg,aa3", |
| 446 | 446 | .codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0}, |
| 447 | 447 | }; |
| 448 | − | |
| @@ -297,4 +297,3 @@ AVInputFormat ff_rl2_demuxer = { · 296 unmodified lines | ||
| 297 | 297 | .read_packet = rl2_read_packet, |
| 298 | 298 | .read_seek = rl2_read_seek, |
| 299 | 299 | }; |
| 300 | − | |
| @@ -205,4 +205,3 @@ RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = { · 204 unmodified lines | ||
| 205 | 205 | .free = amr_free_context, |
| 206 | 206 | .parse_packet = amr_handle_packet, |
| 207 | 207 | }; |
| 208 | − | |
| @@ -105,4 +105,3 @@ RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = { · 104 unmodified lines | ||
| 105 | 105 | .codec_id = CODEC_ID_H263, |
| 106 | 106 | .parse_packet = h263_handle_packet, |
| 107 | 107 | }; |
| 108 | − | |
| @@ -63,4 +63,3 @@ void ff_rtp_send_amr(AVFormatContext *s1, const uint8_t *buff, int size) · 62 unmodified lines | ||
| 63 | 63 | memcpy(s->buf_ptr, buff, size); |
| 64 | 64 | s->buf_ptr += size; |
| 65 | 65 | } |
| 66 | − | |
| @@ -84,4 +84,3 @@ AVFormatContext *ff_rtp_chain_mux_open(AVFormatContext *s, AVStream *st, · 83 unmodified lines | ||
| 84 | 84 | |
| 85 | 85 | return rtpctx; |
| 86 | 86 | } |
| 87 | − | |
| @@ -115,5 +115,3 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size) · 114 unmodified lines | ||
| 115 | 115 | end_of_slice = 0; |
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | − | |
| 119 | − | |
| @@ -1992,4 +1992,3 @@ AVInputFormat ff_rtp_demuxer = { · 1991 unmodified lines | ||
| 1992 | 1992 | .priv_class = &rtp_demuxer_class |
| 1993 | 1993 | }; |
| 1994 | 1994 | #endif /* CONFIG_RTP_DEMUXER */ |
| 1995 | − | |
| @@ -245,4 +245,3 @@ AVOutputFormat ff_rtsp_muxer = { · 244 unmodified lines | ||
| 245 | 245 | .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, |
| 246 | 246 | .priv_class = &rtsp_muxer_class, |
| 247 | 247 | }; |
| 248 | − | |
| @@ -236,4 +236,3 @@ AVInputFormat ff_sap_demuxer = { · 235 unmodified lines | ||
| 236 | 236 | .read_close = sap_read_close, |
| 237 | 237 | .flags = AVFMT_NOFILE, |
| 238 | 238 | }; |
| 239 | − | |
| @@ -261,4 +261,3 @@ AVOutputFormat ff_sap_muxer = { · 260 unmodified lines | ||
| 261 | 261 | .write_trailer = sap_write_close, |
| 262 | 262 | .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER, |
| 263 | 263 | }; |
| 264 | − | |
| @@ -642,4 +642,3 @@ void ff_sdp_write_media(char *buff, int size, AVCodecContext *c, const char *des · 641 unmodified lines | ||
| 642 | 642 | { |
| 643 | 643 | } |
| 644 | 644 | #endif |
| 645 | − | |
| @@ -516,4 +516,3 @@ void ff_free_parser_state(AVFormatContext *s, AVParserState *state) · 515 unmodified lines | ||
| 516 | 516 | av_free(state->stream_states); |
| 517 | 517 | av_free(state); |
| 518 | 518 | } |
| 519 | − | |
| @@ -41,4 +41,3 @@ const AVCRC *av_crc_get_table(AVCRCId crc_id); · 40 unmodified lines | ||
| 41 | 41 | uint32_t av_crc(const AVCRC *ctx, uint32_t start_crc, const uint8_t *buffer, size_t length) av_pure; |
| 42 | 42 | |
| 43 | 43 | #endif /* AVUTIL_CRC_H */ |
| 44 | − | |
| @@ -95,4 +95,3 @@ AVExtFloat av_dbl2ext(double d){ · 94 unmodified lines | ||
| 95 | 95 | ext.exponent[0] |= 0x80; |
| 96 | 96 | return ext; |
| 97 | 97 | } |
| 98 | − | |
| @@ -43,4 +43,3 @@ void av_md5_sum(uint8_t *dst, const uint8_t *src, const int len); · 42 unmodified lines | ||
| 43 | 43 | */ |
| 44 | 44 | |
| 45 | 45 | #endif /* AVUTIL_MD5_H */ |
| 46 | − | |
| @@ -228,3 +228,4 @@ void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem) · 227 unmodified lines | ||
| 228 | 228 | tab[nb++] = (intptr_t)elem; |
| 229 | 229 | *nb_ptr = nb; |
| 230 | 230 | } |
| 231 | + | |
| @@ -331,4 +331,3 @@ DEFINE_SHUFFLE_BYTES(0, 3, 2, 1) · 330 unmodified lines | ||
| 331 | 331 | DEFINE_SHUFFLE_BYTES(1, 2, 3, 0) |
| 332 | 332 | DEFINE_SHUFFLE_BYTES(3, 0, 1, 2) |
| 333 | 333 | DEFINE_SHUFFLE_BYTES(3, 2, 1, 0) |
| 334 | − | |
| @@ -1575,4 +1575,3 @@ struct SwsContext *sws_getCachedContext(struct SwsContext *context, · 1574 unmodified lines | ||
| 1575 | 1575 | } |
| 1576 | 1576 | return context; |
| 1577 | 1577 | } |
| 1578 | − | |