Recherche avancée

Médias (1)

Mot : - Tags -/epub

Autres articles (89)

  • Websites made ​​with MediaSPIP

    2 mai 2011, par

    This page lists some websites based on MediaSPIP.

  • Publier sur MédiaSpip

    13 juin 2013

    Puis-je poster des contenus à partir d’une tablette Ipad ?
    Oui, si votre Médiaspip installé est à la version 0.2 ou supérieure. Contacter au besoin l’administrateur de votre MédiaSpip pour le savoir

  • Initialisation de MediaSPIP (préconfiguration)

    20 février 2010, par

    Lors de l’installation de MediaSPIP, celui-ci est préconfiguré pour les usages les plus fréquents.
    Cette préconfiguration est réalisée par un plugin activé par défaut et non désactivable appelé MediaSPIP Init.
    Ce plugin sert à préconfigurer de manière correcte chaque instance de MediaSPIP. Il doit donc être placé dans le dossier plugins-dist/ du site ou de la ferme pour être installé par défaut avant de pouvoir utiliser le site.
    Dans un premier temps il active ou désactive des options de SPIP qui ne le (...)

Sur d’autres sites (5331)

  • x86inc : Add debug symbols indicating sizes of compiled functions

    12 octobre 2015, par Geza Lore
    x86inc : Add debug symbols indicating sizes of compiled functions
    

    Some debuggers/profilers use this metadata to determine which function a
    given instruction is in ; without it they get can confused by local labels
    (if you haven’t stripped those). On the other hand, some tools are still
    confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

    Currently only implemented for ELF.

    • [DH] libavcodec/x86/proresdsp.asm
    • [DH] libavcodec/x86/simple_idct10.asm
    • [DH] libavutil/x86/x86inc.asm
    • [DH] tests/checkasm/x86/checkasm.asm
  • x86inc : Add debug symbols indicating sizes of compiled functions

    18 janvier 2016, par Geza Lore
    x86inc : Add debug symbols indicating sizes of compiled functions
    

    Some debuggers/profilers use this metadata to determine which function a
    given instruction is in ; without it they get can confused by local labels
    (if you haven’t stripped those). On the other hand, some tools are still
    confused even with this metadata. e.g. this fixes `gdb`, but not `perf`.

    Currently only implemented for ELF.

    Signed-off-by : Anton Khirnov <anton@khirnov.net>

    • [DBH] libavcodec/x86/proresdsp.asm
    • [DBH] libavutil/x86/x86inc.asm
    • [DBH] tests/checkasm/x86/checkasm.asm
  • Rendering Bitmap using ANativeWindow

    19 février 2016, par William Seemann

    I’m decoding a video frame and trying to render is using Android’s ANativeWindow API in conjunction with a SurfaceView. I know I’m decoding the frame successfully because my demo application returns the decoded (and re-encoded) frame as a bitmap and displays it in an ImageView (bottom image). However, when trying to draw the decoded frame to a SurfaceView I’m getting garbage output (top image). Can someone explain why ?

    const int TARGET_IMAGE_FORMAT = AV_PIX_FMT_RGBA;
    const int TARGET_IMAGE_CODEC = AV_CODEC_ID_PNG;

    void convert_image(State *state, AVCodecContext *pCodecCtx, AVFrame *pFrame, AVPacket *avpkt, int *got_packet_ptr, int width, int height) {
           AVCodecContext *codecCtx;
           AVCodec *codec;
           AVFrame *frame;

           *got_packet_ptr = 0;

           if (width == -1) {
               width = pCodecCtx->width;
           }

           if (height == -1) {
               height = pCodecCtx->height;
           }

           codec = avcodec_find_encoder(TARGET_IMAGE_CODEC);
           if (!codec) {
               printf("avcodec_find_decoder() failed to find decoder\n");
               goto fail;
           }

           codecCtx = avcodec_alloc_context3(codec);
           if (!codecCtx) {
               printf("avcodec_alloc_context3 failed\n");
               goto fail;
           }

           codecCtx->bit_rate = pCodecCtx->bit_rate;
           //codecCtx->width = pCodecCtx->width;
           //codecCtx->height = pCodecCtx->height;
           codecCtx->width = width;
           codecCtx->height = height;
           codecCtx->pix_fmt = TARGET_IMAGE_FORMAT;
           codecCtx->codec_type = AVMEDIA_TYPE_VIDEO;
           codecCtx->time_base.num = pCodecCtx->time_base.num;
           codecCtx->time_base.den = pCodecCtx->time_base.den;

           if (!codec || avcodec_open2(codecCtx, codec, NULL) &lt; 0) {
               printf("avcodec_open2() failed\n");
               goto fail;
           }

           frame = av_frame_alloc();

           if (!frame) {
               goto fail;
           }

           // Determine required buffer size and allocate buffer
           int numBytes = avpicture_get_size(TARGET_IMAGE_FORMAT, codecCtx->width, codecCtx->height);
           void * buffer = (uint8_t *) av_malloc(numBytes * sizeof(uint8_t));

           printf("wqwq %d\n", numBytes);

           avpicture_fill(((AVPicture *)frame),
                   buffer,
                   TARGET_IMAGE_FORMAT,
                   codecCtx->width,
                   codecCtx->height);

           avpicture_alloc(((AVPicture *)frame),
                   TARGET_IMAGE_FORMAT,
                   codecCtx->width,
                   codecCtx->height);

           struct SwsContext *scalerCtx = sws_getContext(pCodecCtx->width,
                   pCodecCtx->height,
                   pCodecCtx->pix_fmt,
                   //pCodecCtx->width,
                   //pCodecCtx->height,
                   width,
                   height,
                   TARGET_IMAGE_FORMAT,
                   SWS_FAST_BILINEAR, 0, 0, 0);

           if (!scalerCtx) {
               printf("sws_getContext() failed\n");
               goto fail;
           }

           sws_scale(scalerCtx,
                   (const uint8_t * const *) pFrame->data,
                   pFrame->linesize,
                   0,
                   pFrame->height,
                   frame->data,
                   frame->linesize);

           int ret = avcodec_encode_video2(codecCtx, avpkt, frame, got_packet_ptr);

           // code to draw the re-encoded frame on the surface view
           if (state->native_window) {    
               ANativeWindow_Buffer windowBuffer;

               if (ANativeWindow_lock(state->native_window, &amp;windowBuffer, NULL) == 0) {
                   memcpy(windowBuffer.bits, avpkt->data, windowBuffer.width * windowBuffer.height * 4);
                   ANativeWindow_unlockAndPost(state->native_window);
               }
           }

           if (ret &lt; 0) {
               *got_packet_ptr = 0;
           }

           fail:
           av_free(frame);

           free(buffer);

           if (codecCtx) {
               avcodec_close(codecCtx);
               av_free(codecCtx);
           }

           if (scalerCtx) {
               sws_freeContext(scalerCtx);
           }

           if (ret &lt; 0 || !*got_packet_ptr) {
               av_free_packet(avpkt);
           }
       }

    enter image description here