Recherche avancée

Médias (0)

Mot : - Tags -/organisation

Aucun média correspondant à vos critères n’est disponible sur le site.

Autres articles (39)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • 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" (...)

  • Mise à disposition des fichiers

    14 avril 2011, par

    Par défaut, lors de son initialisation, MediaSPIP ne permet pas aux visiteurs de télécharger les fichiers qu’ils soient originaux ou le résultat de leur transformation ou encodage. Il permet uniquement de les visualiser.
    Cependant, il est possible et facile d’autoriser les visiteurs à avoir accès à ces documents et ce sous différentes formes.
    Tout cela se passe dans la page de configuration du squelette. Il vous faut aller dans l’espace d’administration du canal, et choisir dans la navigation (...)

Sur d’autres sites (8079)

  • aacpsy : correct calculation of minath in psy_3gpp_init

    21 avril 2015, par Andreas Cadhalpun
    aacpsy : correct calculation of minath in psy_3gpp_init
    

    The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD.
    This patch uses the first order approximation to determine it.

    For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638)
    not the one at 3410 (-5.24237967).

    CC : libav-stabl@libav.org
    Signed-off-by : Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DH] libavcodec/aacpsy.c
  • aaccoder : Implement Perceptual Noise Substitution for AAC

    15 avril 2015, par Rostislav Pehlivanov
    aaccoder : Implement Perceptual Noise Substitution for AAC
    

    This commit implements the perceptual noise substitution AAC extension. This is a proof of concept
    implementation, and as such, is not enabled by default. This is the fourth revision of this patch,
    made after some problems were noted out. Any changes made since the previous revisions have been indicated.

    In order to extend the encoder to use an additional codebook, the array holding each codebook has been
    modified with two additional entries - 13 for the NOISE_BT codebook and 12 which has a placeholder function.
    The cost system was modified to skip the 12th entry using an array to map the input and outputs it has. It
    also does not accept using the 13th codebook for any band which is not marked as containing noise, thereby
    restricting its ability to arbitrarily choose it for bands. The use of arrays allows the system to be easily
    extended to allow for intensity stereo encoding, which uses additional codebooks.

    The 12th entry in the codebook function array points to a function which stops the execution of the program
    by calling an assert with an always ’false’ argument. It was pointed out in an email discussion with
    Claudio Freire that having a ’NULL’ entry can result in unexpected behaviour and could be used as
    a security hole. There is no danger of this function being called during encoding due to the codebook maps introduced.

    Another change from version 1 of the patch is the addition of an argument to the encoder, ’-aac_pns’ to
    enable and disable the PNS. This currently defaults to disable the PNS, as it is experimental.
    The switch will be removed in the future, when the algorithm to select noise bands has been improved.
    The current algorithm simply compares the energy to the threshold (multiplied by a constant) to determine
    noise, however the FFPsyBand structure contains other useful figures to determine which bands carry noise more accurately.

    Some of the sample files provided triggered an assertion when the parameter to tune the threshold was set to
    a value of ’2.2’. Claudio Freire reported the problem’s source could be in the range of the scalefactor
    indices for noise and advised to measure the minimal index and clip anything above the maximum allowed
    value. This has been implemented and all the files which used to trigger the asserion now encode without error.

    The third revision of the problem also removes unneded variabes and comparisons. All of them were
    redundant and were of little use for when the PNS implementation would be extended.

    The fourth revision moved the clipping of the noise scalefactors outside the second loop of the two-loop
    algorithm in order to prevent their redundant calculations. Also, freq_mult has been changed to a float
    variable due to the fact that rounding errors can prove to be a problem at low frequencies.
    Considerations were taken whether the entire expression could be evaluated inside the expression
    , but in the end it was decided that it would be for the best if just the type of the variable were
    to change. Claudio Freire reported the two problems. There is no change of functionality
    (except for low sampling frequencies) so the spectral demonstrations at the end of this commit’s message were not updated.

    Finally, the way energy values are converted to scalefactor indices has changed since the first commit,
    as per the suggestion of Claudio Freire. This may still have some drawbacks, but unlike the first commit
    it works without having redundant offsets and outputs what the decoder expects to have, in terms of the
    ranges of the scalefactor indices.

    Some spectral comparisons : https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Original.png (original),
    https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_NO.png (encoded without PNS),
    https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS1.2.png (encoded with PNS, const = 1.2),
    https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/Difference1.png (spectral difference).
    The constant is the value which multiplies the threshold when it gets compared to the energy, larger
    values means more noise will be substituded by PNS values. Example when const = 2.2 :
    https://trac.ffmpeg.org/attachment/wiki/Encode/AAC/PNS_2.2.png

    Reviewed-by : Claudio Freire <klaussfreire@gmail.com>
    Signed-off-by : Michael Niedermayer <michaelni@gmx.at>

    • [DH] libavcodec/aaccoder.c
    • [DH] libavcodec/aacenc.c
    • [DH] libavcodec/aacenc.h
  • Not able to decode mp4 file using latest ffmpeg library : av_decode_video2

    8 février 2017, par suvirai

    I am writing a wrapper code around latest ffmpeg library. I am supplying MP4 files from local system. My problem is that I am unable to get any decoded frames when I use av_decode_video2(). The return value comes out to be negative. I have used av_read_frame() which returns 0. I googled about the problem I am facing but no where could I find the correct explanation. Please give me insight here. Pasting the pseudo code here.

       av_init_packet(avpkt);
       picture=av_frame_alloc();
       pFrameRGB=av_frame_alloc();
       codec = avcodec_find_decoder(CODEC_ID_H264);
       c= avcodec_alloc_context3(codec)
       avcodec_open2(decoderLibraryData->c, decoderLibraryData->codec, NULL)
       FormatContext = avformat_alloc_context();
       char *pUrl ="./1.MP4";

       iRet = avformat_open_input(atContext, pUrl, pFmt, NULL);

       if(FormatContext == NULL)
       {
           printf("could not assign any memory !!!!!!!!! \n");
       }

       avformat_find_stream_info(FormatContext, NULL);


       while(av_read_frame(FormatContext,avpkt) >= 0)
       {

         len = avcodec_decode_video2(c, picture, &amp;got_picture,avpkt);

         printf("CODEC MANAGER len %d Frame decompressed %d \n",len,got_picture);

         if (len &lt;= 0)
         {
           return ERROR;
         }
       }
    }



           if(lastHeight != 0 &amp;&amp; lastWidth != 0)
           {
               if(lastWidth != c->width || lastHeight != c->height )
               {
                   av_free(buffer);
                   buffer = NULL;
                   lastWidth = c->width;
                   lastHeight = c->height;

               }
           }
           else
           {
               lastWidth = c->width;
               lastHeight = c->height;
           }
           decodeFlag = 1;
           if(!buffer)
           {
               int numBytes;
               v_mutex_lock(globalCodecLock);
               switch(inPixFormat)
               {
               case RGB:


                   // Determine required buffer size and allocate buffer
                   numBytes=avpicture_get_size(PIX_FMT_RGB24, c->width, c->height);

                   buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
                   avpicture_fill((AVPicture *)pFrameRGB,buffer,PIX_FMT_RGB24,c->width, c->height);

                   if(cntxt)
                       sws_freeContext(cntxt);

                   cntxt = sws_getContext(c->width, c->height, c->pix_fmt,
                           c->width, c->height, PIX_FMT_RGB24, SWS_BICUBIC, NULL, NULL, NULL);

                   break;

               }
               v_mutex_unlock(globalCodecLock);
               if(cntxt == NULL)
               {
                   printf("sws_getContext error\n");
                   return ERROR;
               }
               }

           {
               sws_scale(cntxt, picture->data, picture->linesize, 0, c->height, pFrameRGB->data, pFrameRGB->linesize);
               if(rgbBuff)
               {


                   if(c->width &lt;= *width &amp;&amp; c->height &lt;= *height)
                   {                  
                       saveFrame(pFrameRGB, c->width, c->height, rgbBuff,inPixFormat);

                       *width = c->width;
                       *height = c->height;
                       rs = SUCCESS;
                       break;
                   }
                   else
                   {
                       rs = VA_LOWBUFFERSIZE;
                   }
               }
               else
               {
                   rs = VA_LOWBUFFERSIZE;
               }
           }
           if(width)
           {
               *width = c->width;
           }
           if(height)
           {
               *height = c->height;
           }
           if(rs == VA_LOWBUFFERSIZE)
           {
               break;
           }

    I am getting the return value of av_read_frame as 0 but av_decode_video2 returns value in negative. I am not able to get any clue here.