Recherche avancée

Médias (1)

Mot : - Tags -/école

Autres articles (50)

  • Personnaliser les catégories

    21 juin 2013, par

    Formulaire de création d’une catégorie
    Pour ceux qui connaissent bien SPIP, une catégorie peut être assimilée à une rubrique.
    Dans le cas d’un document de type catégorie, les champs proposés par défaut sont : Texte
    On peut modifier ce formulaire dans la partie :
    Administration > Configuration des masques de formulaire.
    Dans le cas d’un document de type média, les champs non affichés par défaut sont : Descriptif rapide
    Par ailleurs, c’est dans cette partie configuration qu’on peut indiquer le (...)

  • La sauvegarde automatique de canaux SPIP

    1er avril 2010, par

    Dans le cadre de la mise en place d’une plateforme ouverte, il est important pour les hébergeurs de pouvoir disposer de sauvegardes assez régulières pour parer à tout problème éventuel.
    Pour réaliser cette tâche on se base sur deux plugins SPIP : Saveauto qui permet une sauvegarde régulière de la base de donnée sous la forme d’un dump mysql (utilisable dans phpmyadmin) mes_fichiers_2 qui permet de réaliser une archive au format zip des données importantes du site (les documents, les éléments (...)

  • Automated installation script of MediaSPIP

    25 avril 2011, par

    To overcome the difficulties mainly due to the installation of server side software dependencies, an "all-in-one" installation script written in bash was created to facilitate this step on a server with a compatible Linux distribution.
    You must have access to your server via SSH and a root account to use it, which will install the dependencies. Contact your provider if you do not have that.
    The documentation of the use of this installation script is available here.
    The code of this (...)

Sur d’autres sites (6896)

  • sws/rgb2rgb : RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2

    28 septembre 2022, par Rémi Denis-Courmont
    sws/rgb2rgb : RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2
    

    This is currently 64-bit only because the stack spilling code would not
    assemble on RV32I (and it would corrupt s0 and s1 on RV128I, in theory).

    This could be added later in the unlikely that someone wants it.

    • [DH] libswscale/riscv/rgb2rgb.c
    • [DH] libswscale/riscv/rgb2rgb_rvv.S
  • avcodec/sgidec : Use planar pixel formats

    29 septembre 2022, par Andreas Rheinhardt
    avcodec/sgidec : Use planar pixel formats
    

    The data in SGI images is stored planar, so exporting
    it via planar pixel formats is natural.

    Signed-off-by : Andreas Rheinhardt <andreas.rheinhardt@outlook.com>

    • [DH] libavcodec/sgidec.c
    • [DH] tests/ref/fate/sgi-rgb24
    • [DH] tests/ref/fate/sgi-rgb24-rle
    • [DH] tests/ref/fate/sgi-rgb48
    • [DH] tests/ref/fate/sgi-rgb48-rle
    • [DH] tests/ref/fate/sgi-rgba
    • [DH] tests/ref/fate/sgi-rgba-rle
    • [DH] tests/ref/fate/sgi-rgba64
    • [DH] tests/ref/fate/sgi-rgba64-rle
    • [DH] tests/ref/lavf/sgi
  • Turn off sw_scale conversion to planar YUV 32 byte alignment requirements

    8 novembre 2022, par flansel

    I am experiencing artifacts on the right edge of scaled and converted images when converting into planar YUV pixel formats with sw_scale. I am reasonably sure (although I can not find it anywhere in the documentation) that this is because sw_scale is using an optimization for 32 byte aligned lines, in the destination. However I would like to turn this off because I am using sw_scale for image composition, so even though the destination lines may be 32 byte aligned, the output image may not be.

    &#xA;

    Example.

    &#xA;

    Full output frame is 1280x720 yuv422p10le. (this is 32 byte aligned)&#xA;However into the top left corner I am scaling an image with an outwidth of 1280 / 3 = 426.&#xA;426 in this format is not 32 byte aligned, but I believe sw_scale sees that the output linesize is 32 byte aligned and overwrites the width of 426 putting garbage in the next 22 bytes of data thinking this is simply padding when in my case this is displayable area.

    &#xA;

    This is why I need to actually disable this optimization or somehow trick sw_scale into believing it does not apply while keeping intact the way the program works, which is otherwise fine.

    &#xA;

    I have tried adding extra padding to the destination lines so they are no longer 32 byte aligned,&#xA;this did not help as far as I can tell.

    &#xA;

    Edit with code Example. Rendering omitted for ease of use.&#xA;Also here is a similar issue, unfortunately as I stated there fix will not work for my use case. https://github.com/obsproject/obs-studio/pull/2836

    &#xA;

    Use the commented line of code to swap between a output width which is and isnt 32 byte aligned.

    &#xA;

    #include "libswscale/swscale.h"&#xA;#include "libavutil/imgutils.h"&#xA;#include "libavutil/pixelutils.h"&#xA;#include "libavutil/pixfmt.h"&#xA;#include "libavutil/pixdesc.h"&#xA;#include &#xA;#include &#xA;#include &#xA;&#xA;int main(int argc, char **argv) {&#xA;&#xA;/// Set up a 1280x720 window, and an item with 1/3 width and height of the window.&#xA;int window_width, window_height, item_width, item_height;&#xA;window_width = 1280;&#xA;window_height = 720;&#xA;item_width = (window_width / 3);&#xA;item_height = (window_height / 3);&#xA;&#xA;int item_out_width = item_width;&#xA;/// This line sets the item width to be 32 byte aligned uncomment to see uncorrupted results&#xA;/// Note %16 because outformat is 2 bytes per component&#xA;//item_out_width -= (item_width % 16);&#xA;&#xA;enum AVPixelFormat outformat = AV_PIX_FMT_YUV422P10LE;&#xA;enum AVPixelFormat informat = AV_PIX_FMT_UYVY422;&#xA;int window_lines[4] = {0};&#xA;av_image_fill_linesizes(window_lines, outformat, window_width);&#xA;&#xA;uint8_t *window_planes[4] = {0};&#xA;window_planes[0] = calloc(1, window_lines[0] * window_height);&#xA;window_planes[1] = calloc(1, window_lines[1] * window_height);&#xA;window_planes[2] = calloc(1, window_lines[2] * window_height); /// Fill the window with all 0s, this is green in yuv.&#xA;&#xA;&#xA;int item_lines[4] = {0};&#xA;av_image_fill_linesizes(item_lines, informat, item_width);&#xA;&#xA;uint8_t *item_planes[4] = {0};&#xA;item_planes[0] = malloc(item_lines[0] * item_height);&#xA;memset(item_planes[0], 100, item_lines[0] * item_height);&#xA;&#xA;struct SwsContext *ctx;&#xA;ctx = sws_getContext(item_width, item_height, informat,&#xA;               item_out_width, item_height, outformat, SWS_FAST_BILINEAR, NULL, NULL, NULL);&#xA;&#xA;/// Check a block in the normal region&#xA;printf("Pre scale normal region %d %d %d\n", (int)((uint16_t*)window_planes[0])[0], (int)((uint16_t*)window_planes[1])[0],&#xA;       (int)((uint16_t*)window_planes[2])[0]);&#xA;&#xA;/// Check a block in the corrupted region (should be all zeros) These values should be out of the converted region&#xA;int corrupt_offset_y = (item_out_width &#x2B; 3) * 2; ///(item_width &#x2B; 3) * 2 bytes per component Y PLANE&#xA;int corrupt_offset_uv = (item_out_width &#x2B; 3); ///(item_width &#x2B; 3) * (2 bytes per component rshift 1 for horiz scaling) U and V PLANES&#xA;&#xA;printf("Pre scale corrupted region %d %d %d\n", (int)(*((uint16_t*)(window_planes[0] &#x2B; corrupt_offset_y))),&#xA;       (int)(*((uint16_t*)(window_planes[1] &#x2B; corrupt_offset_uv))), (int)(*((uint16_t*)(window_planes[2] &#x2B; corrupt_offset_uv))));&#xA;sws_scale(ctx, (const uint8_t**)item_planes, item_lines, 0, item_height,window_planes, window_lines);&#xA;&#xA;/// Preform same tests after scaling&#xA;printf("Post scale normal region %d %d %d\n", (int)((uint16_t*)window_planes[0])[0], (int)((uint16_t*)window_planes[1])[0],&#xA;       (int)((uint16_t*)window_planes[2])[0]);&#xA;printf("Post scale corrupted region %d %d %d\n", (int)(*((uint16_t*)(window_planes[0] &#x2B; corrupt_offset_y))),&#xA;       (int)(*((uint16_t*)(window_planes[1] &#x2B; corrupt_offset_uv))), (int)(*((uint16_t*)(window_planes[2] &#x2B; corrupt_offset_uv))));&#xA;&#xA;return 0;&#xA;

    &#xA;

    }

    &#xA;

    Example Output:&#xA;&#xA;//No alignment&#xA;Pre scale normal region 0 0 0&#xA;Pre scale corrupted region 0 0 0&#xA;Post scale normal region 400 400 400&#xA;Post scale corrupted region 512 36865 36865&#xA;&#xA;//With alignment&#xA;Pre scale normal region 0 0 0&#xA;Pre scale corrupted region 0 0 0&#xA;Post scale normal region 400 400 400&#xA;Post scale corrupted region 0 0 0&#xA;

    &#xA;