Recherche avancée

Médias (1)

Mot : - Tags -/MediaSPIP 0.2

Autres articles (52)

  • ANNEXE : Les plugins utilisés spécifiquement pour la ferme

    5 mars 2010, par

    Le site central/maître de la ferme a besoin d’utiliser plusieurs plugins supplémentaires vis à vis des canaux pour son bon fonctionnement. le plugin Gestion de la mutualisation ; le plugin inscription3 pour gérer les inscriptions et les demandes de création d’instance de mutualisation dès l’inscription des utilisateurs ; le plugin verifier qui fournit une API de vérification des champs (utilisé par inscription3) ; le plugin champs extras v2 nécessité par inscription3 (...)

  • Creating farms of unique websites

    13 avril 2011, par

    MediaSPIP platforms can be installed as a farm, with a single "core" hosted on a dedicated server and used by multiple websites.
    This allows (among other things) : implementation costs to be shared between several different projects / individuals rapid deployment of multiple unique sites creation of groups of like-minded sites, making it possible to browse media in a more controlled and selective environment than the major "open" (...)

  • Keeping control of your media in your hands

    13 avril 2011, par

    The vocabulary used on this site and around MediaSPIP in general, aims to avoid reference to Web 2.0 and the companies that profit from media-sharing.
    While using MediaSPIP, you are invited to avoid using words like "Brand", "Cloud" and "Market".
    MediaSPIP is designed to facilitate the sharing of creative media online, while allowing authors to retain complete control of their work.
    MediaSPIP aims to be accessible to as many people as possible and development is based on expanding the (...)

Sur d’autres sites (7640)

  • avfilter/delogo : Fix show option when band is small

    28 septembre 2015, par Jean Delvare
    avfilter/delogo : Fix show option when band is small
    

    The code assumed that the outermost interpolated pixels were always in
    the fuzzy area defined by the band option. However if the band value
    is small, there may be no fuzzy area on a given plane. In that case,
    option show did not work, no rectangle was drawn (or only on the luma
    plane, depending on the band value and chroma plane subsampling
    factors.)

    Fix the problem by not making any assumption on where the outermost
    interpolated pixels will be.

    The new code was verified to produce the same result as the original
    code when the band value is not small.

    Signed-off-by : Jean Delvare <jdelvare@suse.de>
    Signed-off-by : Michael Niedermayer <michael@niedermayer.cc>

    • [DH] libavfilter/vf_delogo.c
  • avcodec/frame_thread_encoder : Avoid allocations of AVPackets, fix deadlock

    7 février 2021, par Andreas Rheinhardt
    avcodec/frame_thread_encoder : Avoid allocations of AVPackets, fix deadlock
    

    Up until now, when doing frame thread encoding, each worker thread
    tried to allocate an AVPacket for every AVFrame to be encoded ; said
    packets would then be handed back to the main thread, where the content
    of said packet is copied into the packet actually destined for output ;
    the temporary AVPacket is then freed.

    Besides being wasteful this also has another problem : There is a risk of
    deadlock, namely if no AVPacket can be allocated at all. The user
    doesn't get an error at all in this case and the worker threads will
    simply try to allocate a packet again and again. If the user has
    supplied enough frames, the user's thread will block until a task has
    been completed, which just doesn't happen if no packet can ever be
    allocated.

    This patch instead modifies the code to allocate the packets during
    init ; they are then reused again and again.

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

    • [DH] libavcodec/frame_thread_encoder.c
  • Why JPEG compressing an uncompressed image differs its original (FFmpeg, NvJPEG, ...)

    22 juin 2021, par Fruchtzwerg

    I am currently struggling to understand why recompressing an uncompressed JPEG image differs its original.

    &#xA;

    It's clear, that JPEG is a lossy compression, but what if the image to compress is already uncompressed, which means all sampling losses are already included ? In other words : Downsampling and DCT should be inversable at this point without loosing data.

    &#xA;

    JPEG algorithm

    &#xA;

    To make sure losses are not effected by the color space conversion, this step is skipped and YUV images are used.

    &#xA;

      &#xA;
    1. Compress YUV image to JPEG (image.yuv —> image.yuv.jpg)
    2. &#xA;

    3. Uncompress JPEG image to YUV image (image.yuv.jpg —> image.yuv.jpg.yuv)
    4. &#xA;

    5. Compress YUV image to JPEG (image.yuv.jpg.yuv —> image.yuv.jpg.yuv.jpg)
    6. &#xA;

    7. Uncompress JPEG image to YUV image (image.yuv.jpg.yuv.jpg —> image.yuv.jpg.yuv.jpg.yuv)
    8. &#xA;

    &#xA;

    Step 1 includes a lossy compression, so we will not deal with this step anymore. For me, intresting is what happens afterwards :

    &#xA;

    Uncompressing the JPEG image back to YUV (step 2) leads to an image which perfectly fits all sampling steps if compressed again (step 3). So the JPEG image after step 3 should (from my understanding) be exactly the same as after step 1. Also the YUV images after step 4 and step 2 should equal each other.

    &#xA;

    Looking at the steps for one 8x8 block the following simplified sequence should illustrate what I am trying to descibe. Lets start with the original YUV image, which can only be decompressed loosing all decimal places :

    &#xA;

    [ 1.123, 2.345, 3.456, ... ]    (YUV)&#xA;    DTC &#x2B; Quantization&#xA;[ -26, -3, -6, ... ]            (Quantized frequency space)&#xA;    Inverse DTC &#x2B; Quantization&#xA;[ 1, 2, 3, ... ]                (YUV)&#xA;

    &#xA;

    Doing this with input, which already matches all steps, which may lead to loss of data afterwards (using round numbers in my example), the decompressed image should match its original :

    &#xA;

    [ 1, 2, 3, ... ]                (YUV)&#xA;    DTC &#x2B; Quantization&#xA;[ -26, -3, -6, ... ]            (Quantized frequency space)&#xA;    Inverse DTC &#x2B; Quantization&#xA;[ 1, 2, 3, ... ]                (YUV)&#xA;

    &#xA;

    There are also some sources and discussions, which are confirming my idea :

    &#xA;

    &#xA;

    So much for theory. In praxis, I've runned these steps using ffmpeg and Nvidias jpeg samples (using NvJPEGEncoder).

    &#xA;

    ffmpeg :

    &#xA;

    #Create YUV image&#xA;ffmpeg -y -i image.jpg -s 1920x1080 -pix_fmt yuv420p image.yuv&#xA;#YUV to JPEG&#xA;ffmpeg -y -s 1920x1080 -pix_fmt yuv420p -i image.yuv image.yuv.jpg&#xA;#JPEG TO YUV&#xA;ffmpeg -y -i image.yuv.jpg -s 1920x1080 -pix_fmt yuv420p image.yuv.jpg.yuv&#xA;#YUV to JPEG&#xA;ffmpeg -y -s 1920x1080 -pix_fmt yuv420p -i image.yuv.jpg.yuv image.yuv.jpg.yuv.jpg&#xA;#JPEG TO YUV&#xA;ffmpeg -y -i image.yuv.jpg.yuv.jpg -s 1920x1080 -pix_fmt yuv420p image.yuv.jpg.yuv.jpg.yuv&#xA;#YUV to JPEG&#xA;ffmpeg -y -s 1920x1080 -pix_fmt yuv420p -i image.yuv.jpg.yuv.jpg.yuv image.yuv.jpg.yuv.jpg.yuv.jpg&#xA;

    &#xA;

    Nvidia :

    &#xA;

    #Create YUV image&#xA;./jpeg_decode num_files 1 image.jpg image.yuv&#xA;#YUV to JPEG&#xA;./jpeg_encode image.yuv 1920 1080 image.yuv.jpg&#xA;#JPEG TO YUV&#xA;./jpeg_decode num_files 1 image.yuv.jpg image.yuv.jpg.yuv&#xA;#YUV to JPEG&#xA;./jpeg_encode image.yuv.jpg.yuv 1920 1080 image.yuv.jpg.yuv.jpg&#xA;#JPEG TO YUV&#xA;./jpeg_decode num_files 1 image.yuv.jpg.yuv.jpg image.yuv.jpg.yuv.jpg.yuv&#xA;#YUV to JPEG&#xA;./jpeg_encode image.yuv.jpg.yuv.jpg.yuv 1920 1080 image.yuv.jpg.yuv.jpg.yuv.jpg&#xA;

    &#xA;

    But a comparison of the images

    &#xA;

      &#xA;
    • image.yuv.jpg.yuv and image.yuv.jpg.yuv.jpg.yuv
    • &#xA;

    • image.yuv.jpg.yuv.jpg and image.yuv.jpg.yuv.jpg.yuv.jpg
    • &#xA;

    &#xA;

    showing differences in the files. That brings me to my question why and where the difference gets happen, since from my understanding the files should be equal.

    &#xA;