[FFmpeg-devel] [PATCH] avutil/crc: use ff_thread_once at av_crc_get_table
Muhammad Faiz
mfcc64 at gmail.com
Mon Oct 30 09:14:35 EET 2017
On Tue, Oct 24, 2017 at 4:31 PM, Muhammad Faiz <mfcc64 at gmail.com> wrote:
> Fix tsan warnings.
>
> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
> ---
> libavutil/crc.c | 49 +++++++++++++++++++++++++++++--------------------
> 1 file changed, 29 insertions(+), 20 deletions(-)
Ping.
My recent benchmark:
old/new:
296320/ 340400 decicycles in AV_CRC_8_ATM, 1 runs, 0 skips
1180/ 2040 decicycles in AV_CRC_8_ATM, 1 runs, 0 skips
830/ 1460 decicycles in AV_CRC_8_ATM, 2 runs, 0 skips
620/ 995 decicycles in AV_CRC_8_ATM, 4 runs, 0 skips
505/ 797 decicycles in AV_CRC_8_ATM, 8 runs, 0 skips
487/ 653 decicycles in AV_CRC_8_ATM, 16 runs, 0 skips
448/ 546 decicycles in AV_CRC_8_ATM, 32 runs, 0 skips
435/ 531 decicycles in AV_CRC_8_ATM, 64 runs, 0 skips
445/ 479 decicycles in AV_CRC_8_ATM, 128 runs, 0 skips
454/ 451 decicycles in AV_CRC_8_ATM, 256 runs, 0 skips
469/ 436 decicycles in AV_CRC_8_ATM, 512 runs, 0 skips
459/ 429 decicycles in AV_CRC_8_ATM, 1024 runs, 0 skips
467/ 425 decicycles in AV_CRC_8_ATM, 2048 runs, 0 skips
137180/ 118440 decicycles in AV_CRC_16_ANSI, 1 runs, 0 skips
720/ 1140 decicycles in AV_CRC_16_ANSI, 1 runs, 0 skips
550/ 880 decicycles in AV_CRC_16_ANSI, 2 runs, 0 skips
515/ 700 decicycles in AV_CRC_16_ANSI, 4 runs, 0 skips
550/ 560 decicycles in AV_CRC_16_ANSI, 8 runs, 0 skips
508/ 515 decicycles in AV_CRC_16_ANSI, 16 runs, 0 skips
493/ 520 decicycles in AV_CRC_16_ANSI, 32 runs, 0 skips
482/ 515 decicycles in AV_CRC_16_ANSI, 64 runs, 0 skips
482/ 468 decicycles in AV_CRC_16_ANSI, 128 runs, 0 skips
481/ 443 decicycles in AV_CRC_16_ANSI, 256 runs, 0 skips
467/ 429 decicycles in AV_CRC_16_ANSI, 512 runs, 0 skips
474/ 422 decicycles in AV_CRC_16_ANSI, 1024 runs, 0 skips
469/ 425 decicycles in AV_CRC_16_ANSI, 2048 runs, 0 skips
124720/ 104060 decicycles in AV_CRC_16_CCITT, 1 runs, 0 skips
460/ 860 decicycles in AV_CRC_16_CCITT, 1 runs, 0 skips
440/ 740 decicycles in AV_CRC_16_CCITT, 2 runs, 0 skips
505/ 660 decicycles in AV_CRC_16_CCITT, 4 runs, 0 skips
472/ 605 decicycles in AV_CRC_16_CCITT, 8 runs, 0 skips
486/ 561 decicycles in AV_CRC_16_CCITT, 16 runs, 0 skips
466/ 557 decicycles in AV_CRC_16_CCITT, 32 runs, 0 skips
489/ 546 decicycles in AV_CRC_16_CCITT, 64 runs, 0 skips
496/ 552 decicycles in AV_CRC_16_CCITT, 128 runs, 0 skips
459/ 522 decicycles in AV_CRC_16_CCITT, 256 runs, 0 skips
447/ 493 decicycles in AV_CRC_16_CCITT, 512 runs, 0 skips
468/ 469 decicycles in AV_CRC_16_CCITT, 1024 runs, 0 skips
477/ 454 decicycles in AV_CRC_16_CCITT, 2048 runs, 0 skips
123500/ 102600 decicycles in AV_CRC_32_IEEE, 1 runs, 0 skips
460/ 1060 decicycles in AV_CRC_32_IEEE, 1 runs, 0 skips
420/ 850 decicycles in AV_CRC_32_IEEE, 2 runs, 0 skips
415/ 685 decicycles in AV_CRC_32_IEEE, 4 runs, 0 skips
407/ 557 decicycles in AV_CRC_32_IEEE, 8 runs, 0 skips
402/ 540 decicycles in AV_CRC_32_IEEE, 16 runs, 0 skips
428/ 491 decicycles in AV_CRC_32_IEEE, 32 runs, 0 skips
452/ 501 decicycles in AV_CRC_32_IEEE, 64 runs, 0 skips
466/ 507 decicycles in AV_CRC_32_IEEE, 128 runs, 0 skips
474/ 506 decicycles in AV_CRC_32_IEEE, 256 runs, 0 skips
478/ 482 decicycles in AV_CRC_32_IEEE, 512 runs, 0 skips
476/ 454 decicycles in AV_CRC_32_IEEE, 1024 runs, 0 skips
472/ 435 decicycles in AV_CRC_32_IEEE, 2048 runs, 0 skips
133800/ 110660 decicycles in AV_CRC_32_IEEE_LE, 1 runs, 0 skips
460/ 1060 decicycles in AV_CRC_32_IEEE_LE, 1 runs, 0 skips
560/ 820 decicycles in AV_CRC_32_IEEE_LE, 2 runs, 0 skips
530/ 665 decicycles in AV_CRC_32_IEEE_LE, 4 runs, 0 skips
502/ 547 decicycles in AV_CRC_32_IEEE_LE, 8 runs, 0 skips
498/ 533 decicycles in AV_CRC_32_IEEE_LE, 16 runs, 0 skips
481/ 533 decicycles in AV_CRC_32_IEEE_LE, 32 runs, 0 skips
493/ 542 decicycles in AV_CRC_32_IEEE_LE, 64 runs, 0 skips
494/ 489 decicycles in AV_CRC_32_IEEE_LE, 128 runs, 0 skips
500/ 461 decicycles in AV_CRC_32_IEEE_LE, 256 runs, 0 skips
493/ 446 decicycles in AV_CRC_32_IEEE_LE, 512 runs, 0 skips
498/ 439 decicycles in AV_CRC_32_IEEE_LE, 1024 runs, 0 skips
482/ 436 decicycles in AV_CRC_32_IEEE_LE, 2048 runs, 0 skips
131300/ 105420 decicycles in AV_CRC_16_ANSI_LE, 1 runs, 0 skips
500/ 840 decicycles in AV_CRC_16_ANSI_LE, 1 runs, 0 skips
460/ 740 decicycles in AV_CRC_16_ANSI_LE, 2 runs, 0 skips
430/ 635 decicycles in AV_CRC_16_ANSI_LE, 4 runs, 0 skips
467/ 547 decicycles in AV_CRC_16_ANSI_LE, 8 runs, 0 skips
465/ 506 decicycles in AV_CRC_16_ANSI_LE, 16 runs, 0 skips
448/ 475 decicycles in AV_CRC_16_ANSI_LE, 32 runs, 0 skips
466/ 445 decicycles in AV_CRC_16_ANSI_LE, 64 runs, 0 skips
475/ 477 decicycles in AV_CRC_16_ANSI_LE, 128 runs, 0 skips
477/ 481 decicycles in AV_CRC_16_ANSI_LE, 256 runs, 0 skips
475/ 446 decicycles in AV_CRC_16_ANSI_LE, 512 runs, 0 skips
477/ 429 decicycles in AV_CRC_16_ANSI_LE, 1024 runs, 0 skips
471/ 420 decicycles in AV_CRC_16_ANSI_LE, 2048 runs, 0 skips
59040/ 65960 decicycles in AV_CRC_24_IEEE, 1 runs, 0 skips
720/ 1180 decicycles in AV_CRC_24_IEEE, 1 runs, 0 skips
590/ 1050 decicycles in AV_CRC_24_IEEE, 2 runs, 0 skips
515/ 780 decicycles in AV_CRC_24_IEEE, 4 runs, 0 skips
475/ 602 decicycles in AV_CRC_24_IEEE, 8 runs, 0 skips
461/ 555 decicycles in AV_CRC_24_IEEE, 16 runs, 0 skips
456/ 543 decicycles in AV_CRC_24_IEEE, 32 runs, 0 skips
460/ 489 decicycles in AV_CRC_24_IEEE, 64 runs, 0 skips
466/ 521 decicycles in AV_CRC_24_IEEE, 128 runs, 0 skips
486/ 539 decicycles in AV_CRC_24_IEEE, 256 runs, 0 skips
480/ 499 decicycles in AV_CRC_24_IEEE, 512 runs, 0 skips
493/ 472 decicycles in AV_CRC_24_IEEE, 1024 runs, 0 skips
492/ 457 decicycles in AV_CRC_24_IEEE, 2048 runs, 0 skips
Thank's.
More information about the ffmpeg-devel
mailing list