Recherche avancée

Médias (91)

Autres articles (78)

  • Le profil des utilisateurs

    12 avril 2011, par

    Chaque utilisateur dispose d’une page de profil lui permettant de modifier ses informations personnelle. Dans le menu de haut de page par défaut, un élément de menu est automatiquement créé à l’initialisation de MediaSPIP, visible uniquement si le visiteur est identifié sur le site.
    L’utilisateur a accès à la modification de profil depuis sa page auteur, un lien dans la navigation "Modifier votre profil" est (...)

  • Configurer la prise en compte des langues

    15 novembre 2010, par

    Accéder à la configuration et ajouter des langues prises en compte
    Afin de configurer la prise en compte de nouvelles langues, il est nécessaire de se rendre dans la partie "Administrer" du site.
    De là, dans le menu de navigation, vous pouvez accéder à une partie "Gestion des langues" permettant d’activer la prise en compte de nouvelles langues.
    Chaque nouvelle langue ajoutée reste désactivable tant qu’aucun objet n’est créé dans cette langue. Dans ce cas, elle devient grisée dans la configuration et (...)

  • XMP PHP

    13 mai 2011, par

    Dixit Wikipedia, XMP signifie :
    Extensible Metadata Platform ou XMP est un format de métadonnées basé sur XML utilisé dans les applications PDF, de photographie et de graphisme. Il a été lancé par Adobe Systems en avril 2001 en étant intégré à la version 5.0 d’Adobe Acrobat.
    Étant basé sur XML, il gère un ensemble de tags dynamiques pour l’utilisation dans le cadre du Web sémantique.
    XMP permet d’enregistrer sous forme d’un document XML des informations relatives à un fichier : titre, auteur, historique (...)

Sur d’autres sites (13404)

  • avcodec/x86/vvc : add avg and avg_w AVX2 optimizations

    23 janvier 2024, par Wu Jianhua
    avcodec/x86/vvc : add avg and avg_w AVX2 optimizations
    

    The avg/avg_w is based on dav1d.
    See https://code.videolan.org/videolan/dav1d/-/blob/master/src/x86/mc_avx2.asm

    vvc_avg_8_2x2_c : 71.6
    vvc_avg_8_2x2_avx2 : 26.8
    vvc_avg_8_2x4_c : 140.8
    vvc_avg_8_2x4_avx2 : 34.6
    vvc_avg_8_2x8_c : 410.3
    vvc_avg_8_2x8_avx2 : 41.3
    vvc_avg_8_2x16_c : 769.3
    vvc_avg_8_2x16_avx2 : 60.3
    vvc_avg_8_2x32_c : 1669.6
    vvc_avg_8_2x32_avx2 : 105.1
    vvc_avg_8_2x64_c : 1978.3
    vvc_avg_8_2x64_avx2 : 425.8
    vvc_avg_8_2x128_c : 6536.8
    vvc_avg_8_2x128_avx2 : 1315.1
    vvc_avg_8_4x2_c : 155.6
    vvc_avg_8_4x2_avx2 : 26.1
    vvc_avg_8_4x4_c : 250.3
    vvc_avg_8_4x4_avx2 : 31.3
    vvc_avg_8_4x8_c : 831.8
    vvc_avg_8_4x8_avx2 : 41.3
    vvc_avg_8_4x16_c : 1461.1
    vvc_avg_8_4x16_avx2 : 57.1
    vvc_avg_8_4x32_c : 2821.6
    vvc_avg_8_4x32_avx2 : 105.1
    vvc_avg_8_4x64_c : 3615.8
    vvc_avg_8_4x64_avx2 : 412.6
    vvc_avg_8_4x128_c : 11962.6
    vvc_avg_8_4x128_avx2 : 1274.3
    vvc_avg_8_8x2_c : 215.8
    vvc_avg_8_8x2_avx2 : 29.1
    vvc_avg_8_8x4_c : 430.6
    vvc_avg_8_8x4_avx2 : 37.6
    vvc_avg_8_8x8_c : 1463.3
    vvc_avg_8_8x8_avx2 : 51.8
    vvc_avg_8_8x16_c : 2630.1
    vvc_avg_8_8x16_avx2 : 97.6
    vvc_avg_8_8x32_c : 5813.8
    vvc_avg_8_8x32_avx2 : 196.6
    vvc_avg_8_8x64_c : 6687.3
    vvc_avg_8_8x64_avx2 : 487.8
    vvc_avg_8_8x128_c : 13178.6
    vvc_avg_8_8x128_avx2 : 1290.6
    vvc_avg_8_16x2_c : 443.8
    vvc_avg_8_16x2_avx2 : 28.3
    vvc_avg_8_16x4_c : 1253.3
    vvc_avg_8_16x4_avx2 : 32.1
    vvc_avg_8_16x8_c : 2236.3
    vvc_avg_8_16x8_avx2 : 44.3
    vvc_avg_8_16x16_c : 5127.8
    vvc_avg_8_16x16_avx2 : 63.3
    vvc_avg_8_16x32_c : 6573.3
    vvc_avg_8_16x32_avx2 : 223.6
    vvc_avg_8_16x64_c : 30311.8
    vvc_avg_8_16x64_avx2 : 437.8
    vvc_avg_8_16x128_c : 25693.3
    vvc_avg_8_16x128_avx2 : 1266.8
    vvc_avg_8_32x2_c : 954.6
    vvc_avg_8_32x2_avx2 : 32.1
    vvc_avg_8_32x4_c : 2359.6
    vvc_avg_8_32x4_avx2 : 39.6
    vvc_avg_8_32x8_c : 5703.6
    vvc_avg_8_32x8_avx2 : 57.1
    vvc_avg_8_32x16_c : 9967.6
    vvc_avg_8_32x16_avx2 : 107.1
    vvc_avg_8_32x32_c : 21327.6
    vvc_avg_8_32x32_avx2 : 272.6
    vvc_avg_8_32x64_c : 39240.8
    vvc_avg_8_32x64_avx2 : 529.6
    vvc_avg_8_32x128_c : 52580.8
    vvc_avg_8_32x128_avx2 : 1338.8
    vvc_avg_8_64x2_c : 1647.3
    vvc_avg_8_64x2_avx2 : 38.8
    vvc_avg_8_64x4_c : 5130.1
    vvc_avg_8_64x4_avx2 : 58.8
    vvc_avg_8_64x8_c : 6529.3
    vvc_avg_8_64x8_avx2 : 88.3
    vvc_avg_8_64x16_c : 19913.6
    vvc_avg_8_64x16_avx2 : 162.3
    vvc_avg_8_64x32_c : 39360.8
    vvc_avg_8_64x32_avx2 : 295.8
    vvc_avg_8_64x64_c : 49658.3
    vvc_avg_8_64x64_avx2 : 784.1
    vvc_avg_8_64x128_c : 108513.1
    vvc_avg_8_64x128_avx2 : 1977.1
    vvc_avg_8_128x2_c : 3226.1
    vvc_avg_8_128x2_avx2 : 61.1
    vvc_avg_8_128x4_c : 10280.3
    vvc_avg_8_128x4_avx2 : 94.6
    vvc_avg_8_128x8_c : 18079.3
    vvc_avg_8_128x8_avx2 : 155.3
    vvc_avg_8_128x16_c : 45121.8
    vvc_avg_8_128x16_avx2 : 285.3
    vvc_avg_8_128x32_c : 48651.8
    vvc_avg_8_128x32_avx2 : 581.6
    vvc_avg_8_128x64_c : 165078.6
    vvc_avg_8_128x64_avx2 : 1942.8
    vvc_avg_8_128x128_c : 339103.1
    vvc_avg_8_128x128_avx2 : 4332.6
    vvc_avg_10_2x2_c : 144.3
    vvc_avg_10_2x2_avx2 : 26.8
    vvc_avg_10_2x4_c : 142.6
    vvc_avg_10_2x4_avx2 : 45.3
    vvc_avg_10_2x8_c : 478.1
    vvc_avg_10_2x8_avx2 : 38.1
    vvc_avg_10_2x16_c : 518.3
    vvc_avg_10_2x16_avx2 : 58.1
    vvc_avg_10_2x32_c : 2059.8
    vvc_avg_10_2x32_avx2 : 93.1
    vvc_avg_10_2x64_c : 2383.8
    vvc_avg_10_2x64_avx2 : 714.8
    vvc_avg_10_2x128_c : 4498.3
    vvc_avg_10_2x128_avx2 : 1466.3
    vvc_avg_10_4x2_c : 228.6
    vvc_avg_10_4x2_avx2 : 26.8
    vvc_avg_10_4x4_c : 378.3
    vvc_avg_10_4x4_avx2 : 30.6
    vvc_avg_10_4x8_c : 866.8
    vvc_avg_10_4x8_avx2 : 44.6
    vvc_avg_10_4x16_c : 1018.1
    vvc_avg_10_4x16_avx2 : 58.1
    vvc_avg_10_4x32_c : 3590.8
    vvc_avg_10_4x32_avx2 : 128.8
    vvc_avg_10_4x64_c : 4200.8
    vvc_avg_10_4x64_avx2 : 663.6
    vvc_avg_10_4x128_c : 8450.8
    vvc_avg_10_4x128_avx2 : 1531.8
    vvc_avg_10_8x2_c : 369.3
    vvc_avg_10_8x2_avx2 : 28.3
    vvc_avg_10_8x4_c : 513.8
    vvc_avg_10_8x4_avx2 : 32.1
    vvc_avg_10_8x8_c : 1720.3
    vvc_avg_10_8x8_avx2 : 49.1
    vvc_avg_10_8x16_c : 1894.8
    vvc_avg_10_8x16_avx2 : 71.6
    vvc_avg_10_8x32_c : 3931.3
    vvc_avg_10_8x32_avx2 : 148.1
    vvc_avg_10_8x64_c : 7964.3
    vvc_avg_10_8x64_avx2 : 613.1
    vvc_avg_10_8x128_c : 15540.1
    vvc_avg_10_8x128_avx2 : 1585.1
    vvc_avg_10_16x2_c : 877.3
    vvc_avg_10_16x2_avx2 : 27.6
    vvc_avg_10_16x4_c : 955.8
    vvc_avg_10_16x4_avx2 : 29.8
    vvc_avg_10_16x8_c : 3419.6
    vvc_avg_10_16x8_avx2 : 62.6
    vvc_avg_10_16x16_c : 3826.8
    vvc_avg_10_16x16_avx2 : 54.3
    vvc_avg_10_16x32_c : 7655.3
    vvc_avg_10_16x32_avx2 : 86.3
    vvc_avg_10_16x64_c : 30011.1
    vvc_avg_10_16x64_avx2 : 692.6
    vvc_avg_10_16x128_c : 47894.8
    vvc_avg_10_16x128_avx2 : 1580.3
    vvc_avg_10_32x2_c : 944.3
    vvc_avg_10_32x2_avx2 : 29.8
    vvc_avg_10_32x4_c : 2022.6
    vvc_avg_10_32x4_avx2 : 35.1
    vvc_avg_10_32x8_c : 6148.8
    vvc_avg_10_32x8_avx2 : 51.3
    vvc_avg_10_32x16_c : 12601.6
    vvc_avg_10_32x16_avx2 : 70.8
    vvc_avg_10_32x32_c : 15958.6
    vvc_avg_10_32x32_avx2 : 124.3
    vvc_avg_10_32x64_c : 31784.6
    vvc_avg_10_32x64_avx2 : 757.3
    vvc_avg_10_32x128_c : 63892.8
    vvc_avg_10_32x128_avx2 : 1711.3
    vvc_avg_10_64x2_c : 1890.8
    vvc_avg_10_64x2_avx2 : 34.3
    vvc_avg_10_64x4_c : 6267.3
    vvc_avg_10_64x4_avx2 : 42.6
    vvc_avg_10_64x8_c : 12778.1
    vvc_avg_10_64x8_avx2 : 67.8
    vvc_avg_10_64x16_c : 22304.3
    vvc_avg_10_64x16_avx2 : 116.8
    vvc_avg_10_64x32_c : 30777.1
    vvc_avg_10_64x32_avx2 : 201.1
    vvc_avg_10_64x64_c : 60169.1
    vvc_avg_10_64x64_avx2 : 1454.3
    vvc_avg_10_64x128_c : 124392.8
    vvc_avg_10_64x128_avx2 : 3648.6
    vvc_avg_10_128x2_c : 3650.1
    vvc_avg_10_128x2_avx2 : 41.1
    vvc_avg_10_128x4_c : 22887.8
    vvc_avg_10_128x4_avx2 : 64.1
    vvc_avg_10_128x8_c : 14622.6
    vvc_avg_10_128x8_avx2 : 111.6
    vvc_avg_10_128x16_c : 62207.6
    vvc_avg_10_128x16_avx2 : 186.3
    vvc_avg_10_128x32_c : 59761.3
    vvc_avg_10_128x32_avx2 : 374.6
    vvc_avg_10_128x64_c : 117504.3
    vvc_avg_10_128x64_avx2 : 2684.6
    vvc_avg_10_128x128_c : 236767.6
    vvc_avg_10_128x128_avx2 : 15278.1
    vvc_avg_12_2x2_c : 78.6
    vvc_avg_12_2x2_avx2 : 26.1
    vvc_avg_12_2x4_c : 254.1
    vvc_avg_12_2x4_avx2 : 30.6
    vvc_avg_12_2x8_c : 261.8
    vvc_avg_12_2x8_avx2 : 39.1
    vvc_avg_12_2x16_c : 527.6
    vvc_avg_12_2x16_avx2 : 57.3
    vvc_avg_12_2x32_c : 1089.1
    vvc_avg_12_2x32_avx2 : 93.8
    vvc_avg_12_2x64_c : 2337.6
    vvc_avg_12_2x64_avx2 : 707.1
    vvc_avg_12_2x128_c : 4582.1
    vvc_avg_12_2x128_avx2 : 1414.6
    vvc_avg_12_4x2_c : 129.6
    vvc_avg_12_4x2_avx2 : 26.8
    vvc_avg_12_4x4_c : 427.3
    vvc_avg_12_4x4_avx2 : 30.6
    vvc_avg_12_4x8_c : 529.6
    vvc_avg_12_4x8_avx2 : 36.6
    vvc_avg_12_4x16_c : 1022.1
    vvc_avg_12_4x16_avx2 : 57.3
    vvc_avg_12_4x32_c : 1987.6
    vvc_avg_12_4x32_avx2 : 84.3
    vvc_avg_12_4x64_c : 4147.6
    vvc_avg_12_4x64_avx2 : 706.3
    vvc_avg_12_4x128_c : 8469.3
    vvc_avg_12_4x128_avx2 : 1448.3
    vvc_avg_12_8x2_c : 253.6
    vvc_avg_12_8x2_avx2 : 27.6
    vvc_avg_12_8x4_c : 836.3
    vvc_avg_12_8x4_avx2 : 32.1
    vvc_avg_12_8x8_c : 1074.6
    vvc_avg_12_8x8_avx2 : 45.1
    vvc_avg_12_8x16_c : 3616.8
    vvc_avg_12_8x16_avx2 : 71.6
    vvc_avg_12_8x32_c : 3823.6
    vvc_avg_12_8x32_avx2 : 140.1
    vvc_avg_12_8x64_c : 7764.8
    vvc_avg_12_8x64_avx2 : 656.1
    vvc_avg_12_8x128_c : 15896.1
    vvc_avg_12_8x128_avx2 : 1232.8
    vvc_avg_12_16x2_c : 462.1
    vvc_avg_12_16x2_avx2 : 26.8
    vvc_avg_12_16x4_c : 1732.1
    vvc_avg_12_16x4_avx2 : 29.1
    vvc_avg_12_16x8_c : 2097.6
    vvc_avg_12_16x8_avx2 : 62.6
    vvc_avg_12_16x16_c : 6753.1
    vvc_avg_12_16x16_avx2 : 47.8
    vvc_avg_12_16x32_c : 7373.1
    vvc_avg_12_16x32_avx2 : 80.8
    vvc_avg_12_16x64_c : 15046.3
    vvc_avg_12_16x64_avx2 : 621.1
    vvc_avg_12_16x128_c : 52574.6
    vvc_avg_12_16x128_avx2 : 1417.1
    vvc_avg_12_32x2_c : 1712.1
    vvc_avg_12_32x2_avx2 : 29.8
    vvc_avg_12_32x4_c : 2036.8
    vvc_avg_12_32x4_avx2 : 37.6
    vvc_avg_12_32x8_c : 4017.6
    vvc_avg_12_32x8_avx2 : 44.1
    vvc_avg_12_32x16_c : 8018.6
    vvc_avg_12_32x16_avx2 : 70.8
    vvc_avg_12_32x32_c : 15637.6
    vvc_avg_12_32x32_avx2 : 124.3
    vvc_avg_12_32x64_c : 31143.3
    vvc_avg_12_32x64_avx2 : 830.3
    vvc_avg_12_32x128_c : 75706.8
    vvc_avg_12_32x128_avx2 : 1604.8
    vvc_avg_12_64x2_c : 3230.3
    vvc_avg_12_64x2_avx2 : 33.6
    vvc_avg_12_64x4_c : 4139.6
    vvc_avg_12_64x4_avx2 : 45.1
    vvc_avg_12_64x8_c : 8201.6
    vvc_avg_12_64x8_avx2 : 67.1
    vvc_avg_12_64x16_c : 25632.3
    vvc_avg_12_64x16_avx2 : 110.3
    vvc_avg_12_64x32_c : 30744.3
    vvc_avg_12_64x32_avx2 : 200.3
    vvc_avg_12_64x64_c : 105554.8
    vvc_avg_12_64x64_avx2 : 1325.6
    vvc_avg_12_64x128_c : 235254.3
    vvc_avg_12_64x128_avx2 : 3132.6
    vvc_avg_12_128x2_c : 6194.3
    vvc_avg_12_128x2_avx2 : 55.1
    vvc_avg_12_128x4_c : 7583.8
    vvc_avg_12_128x4_avx2 : 79.3
    vvc_avg_12_128x8_c : 14635.6
    vvc_avg_12_128x8_avx2 : 104.3
    vvc_avg_12_128x16_c : 29270.8
    vvc_avg_12_128x16_avx2 : 194.3
    vvc_avg_12_128x32_c : 60113.6
    vvc_avg_12_128x32_avx2 : 346.3
    vvc_avg_12_128x64_c : 197030.3
    vvc_avg_12_128x64_avx2 : 2779.6
    vvc_avg_12_128x128_c : 432809.6
    vvc_avg_12_128x128_avx2 : 5513.3
    vvc_w_avg_8_2x2_c : 84.3
    vvc_w_avg_8_2x2_avx2 : 42.6
    vvc_w_avg_8_2x4_c : 156.3
    vvc_w_avg_8_2x4_avx2 : 58.8
    vvc_w_avg_8_2x8_c : 310.6
    vvc_w_avg_8_2x8_avx2 : 73.1
    vvc_w_avg_8_2x16_c : 942.1
    vvc_w_avg_8_2x16_avx2 : 113.3
    vvc_w_avg_8_2x32_c : 1098.8
    vvc_w_avg_8_2x32_avx2 : 202.6
    vvc_w_avg_8_2x64_c : 2414.3
    vvc_w_avg_8_2x64_avx2 : 467.6
    vvc_w_avg_8_2x128_c : 4763.8
    vvc_w_avg_8_2x128_avx2 : 1333.1
    vvc_w_avg_8_4x2_c : 140.1
    vvc_w_avg_8_4x2_avx2 : 49.8
    vvc_w_avg_8_4x4_c : 276.3
    vvc_w_avg_8_4x4_avx2 : 58.1
    vvc_w_avg_8_4x8_c : 524.3
    vvc_w_avg_8_4x8_avx2 : 72.3
    vvc_w_avg_8_4x16_c : 1108.1
    vvc_w_avg_8_4x16_avx2 : 111.8
    vvc_w_avg_8_4x32_c : 2149.8
    vvc_w_avg_8_4x32_avx2 : 199.6
    vvc_w_avg_8_4x64_c : 12288.1
    vvc_w_avg_8_4x64_avx2 : 509.3
    vvc_w_avg_8_4x128_c : 8398.6
    vvc_w_avg_8_4x128_avx2 : 1319.6
    vvc_w_avg_8_8x2_c : 271.1
    vvc_w_avg_8_8x2_avx2 : 44.1
    vvc_w_avg_8_8x4_c : 503.3
    vvc_w_avg_8_8x4_avx2 : 61.8
    vvc_w_avg_8_8x8_c : 1031.1
    vvc_w_avg_8_8x8_avx2 : 93.8
    vvc_w_avg_8_8x16_c : 2009.8
    vvc_w_avg_8_8x16_avx2 : 163.1
    vvc_w_avg_8_8x32_c : 4161.3
    vvc_w_avg_8_8x32_avx2 : 292.1
    vvc_w_avg_8_8x64_c : 7940.6
    vvc_w_avg_8_8x64_avx2 : 592.1
    vvc_w_avg_8_8x128_c : 16802.3
    vvc_w_avg_8_8x128_avx2 : 1287.6
    vvc_w_avg_8_16x2_c : 762.6
    vvc_w_avg_8_16x2_avx2 : 53.6
    vvc_w_avg_8_16x4_c : 1486.3
    vvc_w_avg_8_16x4_avx2 : 67.1
    vvc_w_avg_8_16x8_c : 1907.8
    vvc_w_avg_8_16x8_avx2 : 96.8
    vvc_w_avg_8_16x16_c : 3883.6
    vvc_w_avg_8_16x16_avx2 : 151.3
    vvc_w_avg_8_16x32_c : 7974.8
    vvc_w_avg_8_16x32_avx2 : 285.8
    vvc_w_avg_8_16x64_c : 25160.6
    vvc_w_avg_8_16x64_avx2 : 589.8
    vvc_w_avg_8_16x128_c : 58328.1
    vvc_w_avg_8_16x128_avx2 : 1169.8
    vvc_w_avg_8_32x2_c : 1009.1
    vvc_w_avg_8_32x2_avx2 : 65.6
    vvc_w_avg_8_32x4_c : 2091.1
    vvc_w_avg_8_32x4_avx2 : 96.8
    vvc_w_avg_8_32x8_c : 3997.8
    vvc_w_avg_8_32x8_avx2 : 156.3
    vvc_w_avg_8_32x16_c : 8216.8
    vvc_w_avg_8_32x16_avx2 : 269.6
    vvc_w_avg_8_32x32_c : 21746.1
    vvc_w_avg_8_32x32_avx2 : 635.3
    vvc_w_avg_8_32x64_c : 31564.8
    vvc_w_avg_8_32x64_avx2 : 1010.6
    vvc_w_avg_8_32x128_c : 114373.3
    vvc_w_avg_8_32x128_avx2 : 2013.6
    vvc_w_avg_8_64x2_c : 2067.3
    vvc_w_avg_8_64x2_avx2 : 97.6
    vvc_w_avg_8_64x4_c : 3901.1
    vvc_w_avg_8_64x4_avx2 : 154.8
    vvc_w_avg_8_64x8_c : 7911.6
    vvc_w_avg_8_64x8_avx2 : 268.8
    vvc_w_avg_8_64x16_c : 16508.8
    vvc_w_avg_8_64x16_avx2 : 501.8
    vvc_w_avg_8_64x32_c : 38770.3
    vvc_w_avg_8_64x32_avx2 : 1287.6
    vvc_w_avg_8_64x64_c : 110350.6
    vvc_w_avg_8_64x64_avx2 : 1890.8
    vvc_w_avg_8_64x128_c : 141354.6
    vvc_w_avg_8_64x128_avx2 : 3839.6
    vvc_w_avg_8_128x2_c : 7012.1
    vvc_w_avg_8_128x2_avx2 : 159.3
    vvc_w_avg_8_128x4_c : 8146.8
    vvc_w_avg_8_128x4_avx2 : 272.6
    vvc_w_avg_8_128x8_c : 24596.8
    vvc_w_avg_8_128x8_avx2 : 501.1
    vvc_w_avg_8_128x16_c : 35918.1
    vvc_w_avg_8_128x16_avx2 : 948.8
    vvc_w_avg_8_128x32_c : 68799.6
    vvc_w_avg_8_128x32_avx2 : 1963.1
    vvc_w_avg_8_128x64_c : 133862.1
    vvc_w_avg_8_128x64_avx2 : 3833.6
    vvc_w_avg_8_128x128_c : 348427.8
    vvc_w_avg_8_128x128_avx2 : 7682.8
    vvc_w_avg_10_2x2_c : 118.6
    vvc_w_avg_10_2x2_avx2 : 73.1
    vvc_w_avg_10_2x4_c : 189.1
    vvc_w_avg_10_2x4_avx2 : 89.3
    vvc_w_avg_10_2x8_c : 382.8
    vvc_w_avg_10_2x8_avx2 : 179.8
    vvc_w_avg_10_2x16_c : 658.3
    vvc_w_avg_10_2x16_avx2 : 185.1
    vvc_w_avg_10_2x32_c : 1409.3
    vvc_w_avg_10_2x32_avx2 : 290.8
    vvc_w_avg_10_2x64_c : 2906.8
    vvc_w_avg_10_2x64_avx2 : 793.1
    vvc_w_avg_10_2x128_c : 6292.6
    vvc_w_avg_10_2x128_avx2 : 1696.8
    vvc_w_avg_10_4x2_c : 178.8
    vvc_w_avg_10_4x2_avx2 : 80.1
    vvc_w_avg_10_4x4_c : 581.6
    vvc_w_avg_10_4x4_avx2 : 97.6
    vvc_w_avg_10_4x8_c : 693.3
    vvc_w_avg_10_4x8_avx2 : 128.1
    vvc_w_avg_10_4x16_c : 1436.6
    vvc_w_avg_10_4x16_avx2 : 179.8
    vvc_w_avg_10_4x32_c : 2409.1
    vvc_w_avg_10_4x32_avx2 : 292.3
    vvc_w_avg_10_4x64_c : 4925.3
    vvc_w_avg_10_4x64_avx2 : 746.1
    vvc_w_avg_10_4x128_c : 10664.6
    vvc_w_avg_10_4x128_avx2 : 1647.6
    vvc_w_avg_10_8x2_c : 359.3
    vvc_w_avg_10_8x2_avx2 : 80.1
    vvc_w_avg_10_8x4_c : 925.6
    vvc_w_avg_10_8x4_avx2 : 97.6
    vvc_w_avg_10_8x8_c : 1360.6
    vvc_w_avg_10_8x8_avx2 : 121.8
    vvc_w_avg_10_8x16_c : 3490.3
    vvc_w_avg_10_8x16_avx2 : 203.3
    vvc_w_avg_10_8x32_c : 5266.1
    vvc_w_avg_10_8x32_avx2 : 325.8
    vvc_w_avg_10_8x64_c : 11127.1
    vvc_w_avg_10_8x64_avx2 : 747.8
    vvc_w_avg_10_8x128_c : 31058.3
    vvc_w_avg_10_8x128_avx2 : 1424.6
    vvc_w_avg_10_16x2_c : 624.8
    vvc_w_avg_10_16x2_avx2 : 84.6
    vvc_w_avg_10_16x4_c : 1389.6
    vvc_w_avg_10_16x4_avx2 : 109.1
    vvc_w_avg_10_16x8_c : 2688.3
    vvc_w_avg_10_16x8_avx2 : 137.1
    vvc_w_avg_10_16x16_c : 5387.1
    vvc_w_avg_10_16x16_avx2 : 224.6
    vvc_w_avg_10_16x32_c : 10776.3
    vvc_w_avg_10_16x32_avx2 : 312.1
    vvc_w_avg_10_16x64_c : 18069.1
    vvc_w_avg_10_16x64_avx2 : 858.6
    vvc_w_avg_10_16x128_c : 43460.3
    vvc_w_avg_10_16x128_avx2 : 1411.6
    vvc_w_avg_10_32x2_c : 1232.8
    vvc_w_avg_10_32x2_avx2 : 99.1
    vvc_w_avg_10_32x4_c : 4017.6
    vvc_w_avg_10_32x4_avx2 : 134.1
    vvc_w_avg_10_32x8_c : 9306.3
    vvc_w_avg_10_32x8_avx2 : 208.1
    vvc_w_avg_10_32x16_c : 8424.6
    vvc_w_avg_10_32x16_avx2 : 349.3
    vvc_w_avg_10_32x32_c : 20787.8
    vvc_w_avg_10_32x32_avx2 : 655.3
    vvc_w_avg_10_32x64_c : 40972.1
    vvc_w_avg_10_32x64_avx2 : 904.8
    vvc_w_avg_10_32x128_c : 85670.3
    vvc_w_avg_10_32x128_avx2 : 1751.6
    vvc_w_avg_10_64x2_c : 2454.1
    vvc_w_avg_10_64x2_avx2 : 132.6
    vvc_w_avg_10_64x4_c : 5012.6
    vvc_w_avg_10_64x4_avx2 : 215.6
    vvc_w_avg_10_64x8_c : 10811.3
    vvc_w_avg_10_64x8_avx2 : 361.1
    vvc_w_avg_10_64x16_c : 33349.1
    vvc_w_avg_10_64x16_avx2 : 904.1
    vvc_w_avg_10_64x32_c : 41892.3
    vvc_w_avg_10_64x32_avx2 : 1220.6
    vvc_w_avg_10_64x64_c : 66983.3
    vvc_w_avg_10_64x64_avx2 : 2622.1
    vvc_w_avg_10_64x128_c : 246508.8
    vvc_w_avg_10_64x128_avx2 : 3316.8
    vvc_w_avg_10_128x2_c : 7791.6
    vvc_w_avg_10_128x2_avx2 : 198.8
    vvc_w_avg_10_128x4_c : 10534.3
    vvc_w_avg_10_128x4_avx2 : 337.3
    vvc_w_avg_10_128x8_c : 21142.3
    vvc_w_avg_10_128x8_avx2 : 614.8
    vvc_w_avg_10_128x16_c : 40968.6
    vvc_w_avg_10_128x16_avx2 : 1160.6
    vvc_w_avg_10_128x32_c : 113043.3
    vvc_w_avg_10_128x32_avx2 : 1644.6
    vvc_w_avg_10_128x64_c : 230658.3
    vvc_w_avg_10_128x64_avx2 : 5065.3
    vvc_w_avg_10_128x128_c : 335236.3
    vvc_w_avg_10_128x128_avx2 : 6450.3
    vvc_w_avg_12_2x2_c : 185.3
    vvc_w_avg_12_2x2_avx2 : 43.6
    vvc_w_avg_12_2x4_c : 340.3
    vvc_w_avg_12_2x4_avx2 : 55.8
    vvc_w_avg_12_2x8_c : 632.3
    vvc_w_avg_12_2x8_avx2 : 70.1
    vvc_w_avg_12_2x16_c : 728.3
    vvc_w_avg_12_2x16_avx2 : 108.1
    vvc_w_avg_12_2x32_c : 1392.6
    vvc_w_avg_12_2x32_avx2 : 176.8
    vvc_w_avg_12_2x64_c : 2618.3
    vvc_w_avg_12_2x64_avx2 : 757.3
    vvc_w_avg_12_2x128_c : 6408.8
    vvc_w_avg_12_2x128_avx2 : 1435.1
    vvc_w_avg_12_4x2_c : 349.3
    vvc_w_avg_12_4x2_avx2 : 44.3
    vvc_w_avg_12_4x4_c : 607.1
    vvc_w_avg_12_4x4_avx2 : 52.6
    vvc_w_avg_12_4x8_c : 1134.8
    vvc_w_avg_12_4x8_avx2 : 70.1
    vvc_w_avg_12_4x16_c : 1378.1
    vvc_w_avg_12_4x16_avx2 : 115.3
    vvc_w_avg_12_4x32_c : 2599.3
    vvc_w_avg_12_4x32_avx2 : 174.3
    vvc_w_avg_12_4x64_c : 4474.8
    vvc_w_avg_12_4x64_avx2 : 656.1
    vvc_w_avg_12_4x128_c : 11319.6
    vvc_w_avg_12_4x128_avx2 : 1373.1
    vvc_w_avg_12_8x2_c : 595.8
    vvc_w_avg_12_8x2_avx2 : 44.3
    vvc_w_avg_12_8x4_c : 1164.3
    vvc_w_avg_12_8x4_avx2 : 56.6
    vvc_w_avg_12_8x8_c : 2019.6
    vvc_w_avg_12_8x8_avx2 : 80.1
    vvc_w_avg_12_8x16_c : 4071.6
    vvc_w_avg_12_8x16_avx2 : 139.3
    vvc_w_avg_12_8x32_c : 4485.1
    vvc_w_avg_12_8x32_avx2 : 250.6
    vvc_w_avg_12_8x64_c : 8404.8
    vvc_w_avg_12_8x64_avx2 : 735.8
    vvc_w_avg_12_8x128_c : 35679.8
    vvc_w_avg_12_8x128_avx2 : 1252.6
    vvc_w_avg_12_16x2_c : 1114.8
    vvc_w_avg_12_16x2_avx2 : 46.6
    vvc_w_avg_12_16x4_c : 2240.1
    vvc_w_avg_12_16x4_avx2 : 62.6
    vvc_w_avg_12_16x8_c : 13174.6
    vvc_w_avg_12_16x8_avx2 : 88.6
    vvc_w_avg_12_16x16_c : 5334.6
    vvc_w_avg_12_16x16_avx2 : 144.3
    vvc_w_avg_12_16x32_c : 8378.1
    vvc_w_avg_12_16x32_avx2 : 234.6
    vvc_w_avg_12_16x64_c : 21300.8
    vvc_w_avg_12_16x64_avx2 : 761.8
    vvc_w_avg_12_16x128_c : 32786.8
    vvc_w_avg_12_16x128_avx2 : 1432.8
    vvc_w_avg_12_32x2_c : 2154.3
    vvc_w_avg_12_32x2_avx2 : 61.1
    vvc_w_avg_12_32x4_c : 4299.8
    vvc_w_avg_12_32x4_avx2 : 83.1
    vvc_w_avg_12_32x8_c : 7964.8
    vvc_w_avg_12_32x8_avx2 : 132.6
    vvc_w_avg_12_32x16_c : 13321.6
    vvc_w_avg_12_32x16_avx2 : 234.6
    vvc_w_avg_12_32x32_c : 21149.3
    vvc_w_avg_12_32x32_avx2 : 433.3
    vvc_w_avg_12_32x64_c : 43666.6
    vvc_w_avg_12_32x64_avx2 : 876.6
    vvc_w_avg_12_32x128_c : 83189.8
    vvc_w_avg_12_32x128_avx2 : 1756.6
    vvc_w_avg_12_64x2_c : 3829.8
    vvc_w_avg_12_64x2_avx2 : 83.1
    vvc_w_avg_12_64x4_c : 8588.1
    vvc_w_avg_12_64x4_avx2 : 127.1
    vvc_w_avg_12_64x8_c : 17027.6
    vvc_w_avg_12_64x8_avx2 : 310.6
    vvc_w_avg_12_64x16_c : 29797.8
    vvc_w_avg_12_64x16_avx2 : 415.6
    vvc_w_avg_12_64x32_c : 43854.3
    vvc_w_avg_12_64x32_avx2 : 773.3
    vvc_w_avg_12_64x64_c : 137767.3
    vvc_w_avg_12_64x64_avx2 : 1608.6
    vvc_w_avg_12_64x128_c : 316428.3
    vvc_w_avg_12_64x128_avx2 : 3249.8
    vvc_w_avg_12_128x2_c : 8824.6
    vvc_w_avg_12_128x2_avx2 : 130.3
    vvc_w_avg_12_128x4_c : 17173.6
    vvc_w_avg_12_128x4_avx2 : 219.3
    vvc_w_avg_12_128x8_c : 21997.8
    vvc_w_avg_12_128x8_avx2 : 397.3
    vvc_w_avg_12_128x16_c : 43553.8
    vvc_w_avg_12_128x16_avx2 : 790.1
    vvc_w_avg_12_128x32_c : 89792.1
    vvc_w_avg_12_128x32_avx2 : 1497.6
    vvc_w_avg_12_128x64_c : 226573.3
    vvc_w_avg_12_128x64_avx2 : 3153.1
    vvc_w_avg_12_128x128_c : 332090.1
    vvc_w_avg_12_128x128_avx2 : 6499.6

    Signed-off-by : Wu Jianhua <toqsxw@outlook.com>

    • [DH] libavcodec/x86/vvc/Makefile
    • [DH] libavcodec/x86/vvc/vvc_mc.asm
    • [DH] libavcodec/x86/vvc/vvcdsp_init.c
  • How can I fix a segmentation fault in a C program ? [duplicate]

    31 mars 2023, par ipegasus
    &#xA;

    Possible Duplicate :
    &#xA;Segmentation fault

    &#xA;

    &#xA;

    Currently I am upgrading an open source program used for HTTP streaming. It needs to support the latest FFmpeg.&#xA;The code compiles fine without any warnings, although I am getting a segmentation fault error.

    &#xA;

    How can I fix the issue ? And / or, what is the best way to debug ? Please find attached a portion of the code due to size. I will try to add the project to GitHub :)

    &#xA;

    Sample Usage

    &#xA;

    # segmenter --i out.ts --l 10 --o stream.m3u8 --d segments --f stream&#xA;

    &#xA;

    Makefile

    &#xA;

    FFLIBS=`pkg-config --libs libavformat libavcodec libavutil`&#xA;FFFLAGS=`pkg-config --cflags libavformat libavcodec libavutil`&#xA;&#xA;all:&#xA;    gcc -Wall -g segmenter.c -o segmenter ${FFFLAGS} ${FFLIBS}&#xA;

    &#xA;

    segmenter.c

    &#xA;

    /*&#xA; * Copyright (c) 2009 Chase Douglas&#xA; *&#xA; * This program is free software; you can redistribute it and/or&#xA; * modify it under the terms of the GNU General Public License version 2&#xA; * as published by the Free Software Foundation.&#xA; *&#xA; * This program is distributed in the hope that it will be useful,&#xA; * but WITHOUT ANY WARRANTY; without even the implied warranty of&#xA; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the&#xA; * GNU General Public License for more details.&#xA; *&#xA; * You should have received a copy of the GNU General Public License&#xA; * along with this program; if not, write to the Free Software&#xA; * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.&#xA; */&#xA;#include &#xA;#include &#xA;#include &#xA;#include &#xA;#include &#xA;#include "libavformat/avformat.h"&#xA;&#xA;#include "libavformat/avio.h"&#xA;&#xA;#include <sys></sys>stat.h>&#xA;&#xA;#include "segmenter.h"&#xA;#include "libavformat/avformat.h"&#xA;&#xA;#define IMAGE_ID3_SIZE 9171&#xA;&#xA;void printUsage() {&#xA;    fprintf(stderr, "\nExample: segmenter --i infile --d baseDir --f baseFileName --o playListFile.m3u8 --l 10 \n");&#xA;    fprintf(stderr, "\nOptions: \n");&#xA;    fprintf(stderr, "--i <infile>.\n");&#xA;    fprintf(stderr, "--o <outfile>.\n");&#xA;    fprintf(stderr, "--d basedir, the base directory for files.\n");&#xA;    fprintf(stderr, "--f baseFileName, output files will be baseFileName-#.\n");&#xA;    fprintf(stderr, "--l segment length, the length of each segment.\n");&#xA;    fprintf(stderr, "--a,  audio only decode for &lt; 64k streams.\n");&#xA;    fprintf(stderr, "--v,  video only decode for &lt; 64k streams.\n");&#xA;    fprintf(stderr, "--version, print version details and exit.\n");&#xA;    fprintf(stderr, "\n\n");&#xA;}&#xA;&#xA;void ffmpeg_version() {&#xA;    // output build and version numbers&#xA;    fprintf(stderr, "  libavutil version:   %s\n", AV_STRINGIFY(LIBAVUTIL_VERSION));&#xA;    fprintf(stderr, "  libavutil build:     %d\n", LIBAVUTIL_BUILD);&#xA;    fprintf(stderr, "  libavcodec version:  %s\n", AV_STRINGIFY(LIBAVCODEC_VERSION));&#xA;    fprintf(stdout, "  libavcodec build:    %d\n", LIBAVCODEC_BUILD);&#xA;    fprintf(stderr, "  libavformat version: %s\n", AV_STRINGIFY(LIBAVFORMAT_VERSION));&#xA;    fprintf(stderr, "  libavformat build:   %d\n", LIBAVFORMAT_BUILD);&#xA;    fprintf(stderr, "  built on " __DATE__ " " __TIME__);&#xA;#ifdef __GNUC__&#xA;    fprintf(stderr, ", gcc: " __VERSION__ "\n");&#xA;#else&#xA;    fprintf(stderr, ", using a non-gcc compiler\n");&#xA;#endif&#xA;}&#xA;&#xA;&#xA;static AVStream *add_output_stream(AVFormatContext *output_format_context, AVStream *input_stream) {&#xA;    AVCodecContext *input_codec_context;&#xA;    AVCodecContext *output_codec_context;&#xA;    AVStream *output_stream;&#xA;&#xA;    output_stream = avformat_new_stream(output_format_context, 0);&#xA;    if (!output_stream) {&#xA;        fprintf(stderr, "Segmenter error: Could not allocate stream\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    input_codec_context = input_stream->codec;&#xA;    output_codec_context = output_stream->codec;&#xA;&#xA;    output_codec_context->codec_id = input_codec_context->codec_id;&#xA;    output_codec_context->codec_type = input_codec_context->codec_type;&#xA;    output_codec_context->codec_tag = input_codec_context->codec_tag;&#xA;    output_codec_context->bit_rate = input_codec_context->bit_rate;&#xA;    output_codec_context->extradata = input_codec_context->extradata;&#xA;    output_codec_context->extradata_size = input_codec_context->extradata_size;&#xA;&#xA;    if (av_q2d(input_codec_context->time_base) * input_codec_context->ticks_per_frame > av_q2d(input_stream->time_base) &amp;&amp; av_q2d(input_stream->time_base) &lt; 1.0 / 1000) {&#xA;        output_codec_context->time_base = input_codec_context->time_base;&#xA;        output_codec_context->time_base.num *= input_codec_context->ticks_per_frame;&#xA;    } else {&#xA;        output_codec_context->time_base = input_stream->time_base;&#xA;    }&#xA;&#xA;    switch (input_codec_context->codec_type) {&#xA;#ifdef USE_OLD_FFMPEG&#xA;        case CODEC_TYPE_AUDIO:&#xA;#else&#xA;        case AVMEDIA_TYPE_AUDIO:&#xA;#endif&#xA;            output_codec_context->channel_layout = input_codec_context->channel_layout;&#xA;            output_codec_context->sample_rate = input_codec_context->sample_rate;&#xA;            output_codec_context->channels = input_codec_context->channels;&#xA;            output_codec_context->frame_size = input_codec_context->frame_size;&#xA;            if ((input_codec_context->block_align == 1 &amp;&amp; input_codec_context->codec_id == CODEC_ID_MP3) || input_codec_context->codec_id == CODEC_ID_AC3) {&#xA;                output_codec_context->block_align = 0;&#xA;            } else {&#xA;                output_codec_context->block_align = input_codec_context->block_align;&#xA;            }&#xA;            break;&#xA;#ifdef USE_OLD_FFMPEG&#xA;        case CODEC_TYPE_VIDEO:&#xA;#else&#xA;        case AVMEDIA_TYPE_VIDEO:&#xA;#endif&#xA;            output_codec_context->pix_fmt = input_codec_context->pix_fmt;&#xA;            output_codec_context->width = input_codec_context->width;&#xA;            output_codec_context->height = input_codec_context->height;&#xA;            output_codec_context->has_b_frames = input_codec_context->has_b_frames;&#xA;&#xA;            if (output_format_context->oformat->flags &amp; AVFMT_GLOBALHEADER) {&#xA;                output_codec_context->flags |= CODEC_FLAG_GLOBAL_HEADER;&#xA;            }&#xA;            break;&#xA;        default:&#xA;            break;&#xA;    }&#xA;&#xA;    return output_stream;&#xA;}&#xA;&#xA;int write_index_file(const char index[], const char tmp_index[], const unsigned int planned_segment_duration, const unsigned int actual_segment_duration[],&#xA;        const char output_directory[], const char output_prefix[], const char output_file_extension[],&#xA;        const unsigned int first_segment, const unsigned int last_segment) {&#xA;    FILE *index_fp;&#xA;    char *write_buf;&#xA;    unsigned int i;&#xA;&#xA;    index_fp = fopen(tmp_index, "w");&#xA;    if (!index_fp) {&#xA;        fprintf(stderr, "Could not open temporary m3u8 index file (%s), no index file will be created\n", tmp_index);&#xA;        return -1;&#xA;    }&#xA;&#xA;    write_buf = malloc(sizeof (char) * 1024);&#xA;    if (!write_buf) {&#xA;        fprintf(stderr, "Could not allocate write buffer for index file, index file will be invalid\n");&#xA;        fclose(index_fp);&#xA;        return -1;&#xA;    }&#xA;&#xA;    unsigned int maxDuration = planned_segment_duration;&#xA;&#xA;    for (i = first_segment; i &lt;= last_segment; i&#x2B;&#x2B;)&#xA;        if (actual_segment_duration[i] > maxDuration)&#xA;            maxDuration = actual_segment_duration[i];&#xA;&#xA;&#xA;&#xA;    snprintf(write_buf, 1024, "#EXTM3U\n#EXT-X-TARGETDURATION:%u\n", maxDuration);&#xA;&#xA;    if (fwrite(write_buf, strlen(write_buf), 1, index_fp) != 1) {&#xA;        fprintf(stderr, "Could not write to m3u8 index file, will not continue writing to index file\n");&#xA;        free(write_buf);&#xA;        fclose(index_fp);&#xA;        return -1;&#xA;    }&#xA;&#xA;    for (i = first_segment; i &lt;= last_segment; i&#x2B;&#x2B;) {&#xA;        snprintf(write_buf, 1024, "#EXTINF:%u,\n%s-%u%s\n", actual_segment_duration[i], output_prefix, i, output_file_extension);&#xA;        if (fwrite(write_buf, strlen(write_buf), 1, index_fp) != 1) {&#xA;            fprintf(stderr, "Could not write to m3u8 index file, will not continue writing to index file\n");&#xA;            free(write_buf);&#xA;            fclose(index_fp);&#xA;            return -1;&#xA;        }&#xA;    }&#xA;&#xA;    snprintf(write_buf, 1024, "#EXT-X-ENDLIST\n");&#xA;    if (fwrite(write_buf, strlen(write_buf), 1, index_fp) != 1) {&#xA;        fprintf(stderr, "Could not write last file and endlist tag to m3u8 index file\n");&#xA;        free(write_buf);&#xA;        fclose(index_fp);&#xA;        return -1;&#xA;    }&#xA;&#xA;    free(write_buf);&#xA;    fclose(index_fp);&#xA;&#xA;    return rename(tmp_index, index);&#xA;}&#xA;&#xA;int main(int argc, const char *argv[]) {&#xA;    //input parameters&#xA;    char inputFilename[MAX_FILENAME_LENGTH], playlistFilename[MAX_FILENAME_LENGTH], baseDirName[MAX_FILENAME_LENGTH], baseFileName[MAX_FILENAME_LENGTH];&#xA;    char baseFileExtension[5]; //either "ts", "aac" or "mp3"&#xA;    int segmentLength, outputStreams, verbosity, version;&#xA;&#xA;&#xA;&#xA;    char currentOutputFileName[MAX_FILENAME_LENGTH];&#xA;    char tempPlaylistName[MAX_FILENAME_LENGTH];&#xA;&#xA;&#xA;    //these are used to determine the exact length of the current segment&#xA;    double prev_segment_time = 0;&#xA;    double segment_time;&#xA;    unsigned int actual_segment_durations[2048];&#xA;    double packet_time = 0;&#xA;&#xA;    //new variables to keep track of output size&#xA;    double output_bytes = 0;&#xA;&#xA;    unsigned int output_index = 1;&#xA;    AVOutputFormat *ofmt;&#xA;    AVFormatContext *ic = NULL;&#xA;    AVFormatContext *oc;&#xA;    AVStream *video_st = NULL;&#xA;    AVStream *audio_st = NULL;&#xA;    AVCodec *codec;&#xA;    int video_index;&#xA;    int audio_index;&#xA;    unsigned int first_segment = 1;&#xA;    unsigned int last_segment = 0;&#xA;    int write_index = 1;&#xA;    int decode_done;&#xA;    int ret;&#xA;    int i;&#xA;&#xA;    unsigned char id3_tag[128];&#xA;    unsigned char * image_id3_tag;&#xA;&#xA;    size_t id3_tag_size = 73;&#xA;    int newFile = 1; //a boolean value to flag when a new file needs id3 tag info in it&#xA;&#xA;    if (parseCommandLine(inputFilename, playlistFilename, baseDirName, baseFileName, baseFileExtension, &amp;outputStreams, &amp;segmentLength, &amp;verbosity, &amp;version, argc, argv) != 0)&#xA;        return 0;&#xA;&#xA;    if (version) {&#xA;        ffmpeg_version();&#xA;        return 0;&#xA;    }&#xA;&#xA;&#xA;    fprintf(stderr, "%s %s\n", playlistFilename, tempPlaylistName);&#xA;&#xA;&#xA;    image_id3_tag = malloc(IMAGE_ID3_SIZE);&#xA;    if (outputStreams == OUTPUT_STREAM_AUDIO)&#xA;        build_image_id3_tag(image_id3_tag);&#xA;    build_id3_tag((char *) id3_tag, id3_tag_size);&#xA;&#xA;    snprintf(tempPlaylistName, strlen(playlistFilename) &#x2B; strlen(baseDirName) &#x2B; 1, "%s%s", baseDirName, playlistFilename);&#xA;    strncpy(playlistFilename, tempPlaylistName, strlen(tempPlaylistName));&#xA;    strncpy(tempPlaylistName, playlistFilename, MAX_FILENAME_LENGTH);&#xA;    strncat(tempPlaylistName, ".", 1);&#xA;&#xA;    //decide if this is an aac file or a mpegts file.&#xA;    //postpone deciding format until later&#xA;    /*    ifmt = av_find_input_format("mpegts");&#xA;    if (!ifmt)&#xA;    {&#xA;    fprintf(stderr, "Could not find MPEG-TS demuxer.\n");&#xA;    exit(1);&#xA;    } */&#xA;&#xA;    av_log_set_level(AV_LOG_DEBUG);&#xA;&#xA;    av_register_all();&#xA;    ret = avformat_open_input(&amp;ic, inputFilename, NULL, NULL);&#xA;    if (ret != 0) {&#xA;        fprintf(stderr, "Could not open input file %s. Error %d.\n", inputFilename, ret);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    if (avformat_find_stream_info(ic, NULL) &lt; 0) {&#xA;        fprintf(stderr, "Could not read stream information.\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    oc = avformat_alloc_context();&#xA;    if (!oc) {&#xA;        fprintf(stderr, "Could not allocate output context.");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    video_index = -1;&#xA;    audio_index = -1;&#xA;&#xA;    for (i = 0; i &lt; ic->nb_streams &amp;&amp; (video_index &lt; 0 || audio_index &lt; 0); i&#x2B;&#x2B;) {&#xA;        switch (ic->streams[i]->codec->codec_type) {&#xA;&#xA;#ifdef USE_OLD_FFMPEG&#xA;            case CODEC_TYPE_VIDEO:&#xA;#else&#xA;            case AVMEDIA_TYPE_VIDEO:&#xA;#endif&#xA;                video_index = i;&#xA;                ic->streams[i]->discard = AVDISCARD_NONE;&#xA;                if (outputStreams &amp; OUTPUT_STREAM_VIDEO)&#xA;                    video_st = add_output_stream(oc, ic->streams[i]);&#xA;                break;&#xA;#ifdef USE_OLD_FFMPEG&#xA;            case CODEC_TYPE_AUDIO:&#xA;#else&#xA;            case AVMEDIA_TYPE_AUDIO:&#xA;#endif&#xA;                audio_index = i;&#xA;                ic->streams[i]->discard = AVDISCARD_NONE;&#xA;                if (outputStreams &amp; OUTPUT_STREAM_AUDIO)&#xA;                    audio_st = add_output_stream(oc, ic->streams[i]);&#xA;                break;&#xA;            default:&#xA;                ic->streams[i]->discard = AVDISCARD_ALL;&#xA;                break;&#xA;        }&#xA;    }&#xA;&#xA;    if (video_index == -1) {&#xA;        fprintf(stderr, "Stream must have video component.\n");&#xA;        exit(1);&#xA;    }&#xA;&#xA;    //now that we know the audio and video output streams&#xA;    //we can decide on an output format.&#xA;    if (outputStreams == OUTPUT_STREAM_AUDIO) {&#xA;        //the audio output format should be the same as the audio input format&#xA;        switch (ic->streams[audio_index]->codec->codec_id) {&#xA;            case CODEC_ID_MP3:&#xA;                fprintf(stderr, "Setting output audio to mp3.");&#xA;                strncpy(baseFileExtension, ".mp3", strlen(".mp3"));&#xA;                ofmt = av_guess_format("mp3", NULL, NULL);&#xA;                break;&#xA;            case CODEC_ID_AAC:&#xA;                fprintf(stderr, "Setting output audio to aac.");&#xA;                ofmt = av_guess_format("adts", NULL, NULL);&#xA;                break;&#xA;            default:&#xA;                fprintf(stderr, "Codec id %d not supported.\n", ic->streams[audio_index]->id);&#xA;        }&#xA;        if (!ofmt) {&#xA;            fprintf(stderr, "Could not find audio muxer.\n");&#xA;            exit(1);&#xA;        }&#xA;    } else {&#xA;        ofmt = av_guess_format("mpegts", NULL, NULL);&#xA;        if (!ofmt) {&#xA;            fprintf(stderr, "Could not find MPEG-TS muxer.\n");&#xA;            exit(1);&#xA;        }&#xA;    }&#xA;    oc->oformat = ofmt;&#xA;&#xA;    if (outputStreams &amp; OUTPUT_STREAM_VIDEO &amp;&amp; oc->oformat->flags &amp; AVFMT_GLOBALHEADER) {&#xA;        oc->flags |= CODEC_FLAG_GLOBAL_HEADER;&#xA;    }&#xA;&#xA;&#xA;    /*  Deprecated: pass the options to avformat_write_header directly.&#xA;        if (av_set_parameters(oc, NULL) &lt; 0) {&#xA;            fprintf(stderr, "Invalid output format parameters.\n");&#xA;            exit(1);&#xA;        }&#xA;     */&#xA;&#xA;    av_dump_format(oc, 0, baseFileName, 1);&#xA;&#xA;&#xA;    //open the video codec only if there is video data&#xA;    if (video_index != -1) {&#xA;        if (outputStreams &amp; OUTPUT_STREAM_VIDEO)&#xA;            codec = avcodec_find_decoder(video_st->codec->codec_id);&#xA;        else&#xA;            codec = avcodec_find_decoder(ic->streams[video_index]->codec->codec_id);&#xA;        if (!codec) {&#xA;            fprintf(stderr, "Could not find video decoder, key frames will not be honored.\n");&#xA;        }&#xA;&#xA;        if (outputStreams &amp; OUTPUT_STREAM_VIDEO)&#xA;            ret = avcodec_open2(video_st->codec, codec, NULL);&#xA;        else&#xA;            avcodec_open2(ic->streams[video_index]->codec, codec, NULL);&#xA;        if (ret &lt; 0) {&#xA;            fprintf(stderr, "Could not open video decoder, key frames will not be honored.\n");&#xA;        }&#xA;    }&#xA;&#xA;    snprintf(currentOutputFileName, strlen(baseDirName) &#x2B; strlen(baseFileName) &#x2B; strlen(baseFileExtension) &#x2B; 10, "%s%s-%u%s", baseDirName, baseFileName, output_index&#x2B;&#x2B;, baseFileExtension);&#xA;&#xA;    if (avio_open(&amp;oc->pb, currentOutputFileName, URL_WRONLY) &lt; 0) {&#xA;        fprintf(stderr, "Could not open &#x27;%s&#x27;.\n", currentOutputFileName);&#xA;        exit(1);&#xA;    }&#xA;    newFile = 1;&#xA;&#xA;    int r = avformat_write_header(oc,NULL);&#xA;    if (r) {&#xA;        fprintf(stderr, "Could not write mpegts header to first output file.\n");&#xA;        debugReturnCode(r);&#xA;        exit(1);&#xA;    }&#xA;&#xA;    //no segment info is written here. This just creates the shell of the playlist file&#xA;    write_index = !write_index_file(playlistFilename, tempPlaylistName, segmentLength, actual_segment_durations, baseDirName, baseFileName, baseFileExtension, first_segment, last_segment);&#xA;&#xA;    do {&#xA;        AVPacket packet;&#xA;&#xA;        decode_done = av_read_frame(ic, &amp;packet);&#xA;&#xA;        if (decode_done &lt; 0) {&#xA;            break;&#xA;        }&#xA;&#xA;        if (av_dup_packet(&amp;packet) &lt; 0) {&#xA;            fprintf(stderr, "Could not duplicate packet.");&#xA;            av_free_packet(&amp;packet);&#xA;            break;&#xA;        }&#xA;&#xA;        //this time is used to check for a break in the segments&#xA;        //    if (packet.stream_index == video_index &amp;&amp; (packet.flags &amp; PKT_FLAG_KEY))&#xA;        //    {&#xA;        //    segment_time = (double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;&#xA;        //    }&#xA;#if USE_OLD_FFMPEG&#xA;        if (packet.stream_index == video_index &amp;&amp; (packet.flags &amp; PKT_FLAG_KEY))&#xA;#else&#xA;        if (packet.stream_index == video_index &amp;&amp; (packet.flags &amp; AV_PKT_FLAG_KEY))&#xA;#endif&#xA;        {&#xA;            segment_time = (double) packet.pts * ic->streams[video_index]->time_base.num / ic->streams[video_index]->time_base.den;&#xA;        }&#xA;        //  else if (video_index &lt; 0)&#xA;        //    {&#xA;        //        segment_time = (double)audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;&#xA;        //    }&#xA;&#xA;        //get the most recent packet time&#xA;        //this time is used when the time for the final segment is printed. It may not be on the edge of&#xA;        //of a keyframe!&#xA;        if (packet.stream_index == video_index)&#xA;            packet_time = (double) packet.pts * ic->streams[video_index]->time_base.num / ic->streams[video_index]->time_base.den; //(double)video_st->pts.val * video_st->time_base.num / video_st->time_base.den;&#xA;        else if (outputStreams &amp; OUTPUT_STREAM_AUDIO)&#xA;            packet_time = (double) audio_st->pts.val * audio_st->time_base.num / audio_st->time_base.den;&#xA;        else&#xA;            continue;&#xA;        //start looking for segment splits for videos one half second before segment duration expires. This is because the&#xA;        //segments are split on key frames so we cannot expect all segments to be split exactly equally.&#xA;        if (segment_time - prev_segment_time >= segmentLength - 0.5) {&#xA;            fprintf(stderr, "looking to print index file at time %lf\n", segment_time);&#xA;            avio_flush(oc->pb);&#xA;            avio_close(oc->pb);&#xA;&#xA;            if (write_index) {&#xA;                actual_segment_durations[&#x2B;&#x2B;last_segment] = (unsigned int) rint(segment_time - prev_segment_time);&#xA;                write_index = !write_index_file(playlistFilename, tempPlaylistName, segmentLength, actual_segment_durations, baseDirName, baseFileName, baseFileExtension, first_segment, last_segment);&#xA;                fprintf(stderr, "Writing index file at time %lf\n", packet_time);&#xA;            }&#xA;&#xA;            struct stat st;&#xA;            stat(currentOutputFileName, &amp;st);&#xA;            output_bytes &#x2B;= st.st_size;&#xA;&#xA;            snprintf(currentOutputFileName, strlen(baseDirName) &#x2B; strlen(baseFileName) &#x2B; strlen(baseFileExtension) &#x2B; 10, "%s%s-%u%s", baseDirName, baseFileName, output_index&#x2B;&#x2B;, baseFileExtension);&#xA;            if (avio_open(&amp;oc->pb, currentOutputFileName, URL_WRONLY) &lt; 0) {&#xA;                fprintf(stderr, "Could not open &#x27;%s&#x27;\n", currentOutputFileName);&#xA;                break;&#xA;            }&#xA;&#xA;            newFile = 1;&#xA;            prev_segment_time = segment_time;&#xA;        }&#xA;&#xA;        if (outputStreams == OUTPUT_STREAM_AUDIO &amp;&amp; packet.stream_index == audio_index) {&#xA;            if (newFile &amp;&amp; outputStreams == OUTPUT_STREAM_AUDIO) {&#xA;                //add id3 tag info&#xA;                //fprintf(stderr, "adding id3tag to file %s\n", currentOutputFileName);&#xA;                //printf("%lf %lld %lld %lld %lld %lld %lf\n", segment_time, audio_st->pts.val, audio_st->cur_dts, audio_st->cur_pkt.pts, packet.pts, packet.dts, packet.dts * av_q2d(ic->streams[audio_index]->time_base) );&#xA;                fill_id3_tag((char*) id3_tag, id3_tag_size, packet.dts);&#xA;                avio_write(oc->pb, id3_tag, id3_tag_size);&#xA;                avio_write(oc->pb, image_id3_tag, IMAGE_ID3_SIZE);&#xA;                avio_flush(oc->pb);&#xA;                newFile = 0;&#xA;            }&#xA;&#xA;            packet.stream_index = 0; //only one stream in audio only segments&#xA;            ret = av_interleaved_write_frame(oc, &amp;packet);&#xA;        } else if (outputStreams &amp; OUTPUT_STREAM_VIDEO) {&#xA;            if (newFile) {&#xA;                //fprintf(stderr, "New File: %lld %lld %lld\n", packet.pts, video_st->pts.val, audio_st->pts.val);&#xA;                //printf("%lf %lld %lld %lld %lld %lld %lf\n", segment_time, audio_st->pts.val, audio_st->cur_dts, audio_st->cur_pkt.pts, packet.pts, packet.dts, packet.dts * av_q2d(ic->streams[audio_index]->time_base) );&#xA;                newFile = 0;&#xA;            }&#xA;            if (outputStreams == OUTPUT_STREAM_VIDEO)&#xA;                ret = av_write_frame(oc, &amp;packet);&#xA;            else&#xA;                ret = av_interleaved_write_frame(oc, &amp;packet);&#xA;        }&#xA;&#xA;        if (ret &lt; 0) {&#xA;            fprintf(stderr, "Warning: Could not write frame of stream.\n");&#xA;        } else if (ret > 0) {&#xA;            fprintf(stderr, "End of stream requested.\n");&#xA;            av_free_packet(&amp;packet);&#xA;            break;&#xA;        }&#xA;&#xA;        av_free_packet(&amp;packet);&#xA;    } while (!decode_done);&#xA;&#xA;    //make sure all packets are written and then close the last file.&#xA;    avio_flush(oc->pb);&#xA;    av_write_trailer(oc);&#xA;&#xA;    if (video_st &amp;&amp; video_st->codec)&#xA;        avcodec_close(video_st->codec);&#xA;&#xA;    if (audio_st &amp;&amp; audio_st->codec)&#xA;        avcodec_close(audio_st->codec);&#xA;&#xA;    for (i = 0; i &lt; oc->nb_streams; i&#x2B;&#x2B;) {&#xA;        av_freep(&amp;oc->streams[i]->codec);&#xA;        av_freep(&amp;oc->streams[i]);&#xA;    }&#xA;&#xA;    avio_close(oc->pb);&#xA;    av_free(oc);&#xA;&#xA;    struct stat st;&#xA;    stat(currentOutputFileName, &amp;st);&#xA;    output_bytes &#x2B;= st.st_size;&#xA;&#xA;&#xA;    if (write_index) {&#xA;        actual_segment_durations[&#x2B;&#x2B;last_segment] = (unsigned int) rint(packet_time - prev_segment_time);&#xA;&#xA;        //make sure that the last segment length is not zero&#xA;        if (actual_segment_durations[last_segment] == 0)&#xA;            actual_segment_durations[last_segment] = 1;&#xA;&#xA;        write_index_file(playlistFilename, tempPlaylistName, segmentLength, actual_segment_durations, baseDirName, baseFileName, baseFileExtension, first_segment, last_segment);&#xA;&#xA;    }&#xA;&#xA;    write_stream_size_file(baseDirName, baseFileName, output_bytes * 8 / segment_time);&#xA;&#xA;    return 0;&#xA;}&#xA;</outfile></infile>

    &#xA;

  • Trying to compile x264 and ffmpeg for iPhone - "missing required architecture arm in file"

    4 août 2012, par jtrim

    I'm trying to compile x264 for use in an iPhone application. I see there are instructions on how to compile ffmpeg for use on the platform here : http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2009-October/076618.html , but I can't seem to find anything this complete for compiling x264 on the iPhone. I've found this source tree : http://gitorious.org/x264-arm that seems to have support for the ARM platform.

    Here is my config line :

    ./configure —cross-prefix=/usr/bin/ —host=arm-apple-darwin10 —extra-cflags="-B /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/ -I /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.2.sdk/usr/lib/"
    

    ...and inside configure I'm using the gas-preprocessor script (first link above) as my assembler :

    gas-preprocessor.pl gcc
    

    When I start compiling, it chunks away for a little while, then it spits out these warnings and a huge list of undefined symbols :

    ld : warning : option -s is obsolete and being ignored
    ld : warning : -force_cpusubtype_ALL will become unsupported for ARM architectures
    ld : warning : in /usr/lib/crt1.o, missing required architecture arm in file
    ld : warning : in /usr/X11R6/lib/libX11.dylib, missing required architecture arm in file
    ld : warning : in /usr/lib/libm.dylib, missing required architecture arm in file
    ld : warning : in /usr/lib/libpthread.dylib, missing required architecture arm in file
    ld : warning : in /usr/lib/libgcc_s.1.dylib, missing required architecture arm in file
    ld : warning : in /usr/lib/libSystem.dylib, missing required architecture arm in file
    Undefined symbols :
    

    My guess would be that the problem has to do with the "missing required architecture arm in file" warning...any ideas ?