Recherche avancée

Médias (1)

Mot : - Tags -/book

Autres articles (96)

  • Sélection de projets utilisant MediaSPIP

    29 avril 2011, par

    Les exemples cités ci-dessous sont des éléments représentatifs d’usages spécifiques de MediaSPIP pour certains projets.
    Vous pensez avoir un site "remarquable" réalisé avec MediaSPIP ? Faites le nous savoir ici.
    Ferme MediaSPIP @ Infini
    L’Association Infini développe des activités d’accueil, de point d’accès internet, de formation, de conduite de projets innovants dans le domaine des Technologies de l’Information et de la Communication, et l’hébergement de sites. Elle joue en la matière un rôle unique (...)

  • Multilang : améliorer l’interface pour les blocs multilingues

    18 février 2011, par

    Multilang est un plugin supplémentaire qui n’est pas activé par défaut lors de l’initialisation de MediaSPIP.
    Après son activation, une préconfiguration est mise en place automatiquement par MediaSPIP init permettant à la nouvelle fonctionnalité d’être automatiquement opérationnelle. Il n’est donc pas obligatoire de passer par une étape de configuration pour cela.

  • Gestion des droits de création et d’édition des objets

    8 février 2011, par

    Par défaut, beaucoup de fonctionnalités sont limitées aux administrateurs mais restent configurables indépendamment pour modifier leur statut minimal d’utilisation notamment : la rédaction de contenus sur le site modifiables dans la gestion des templates de formulaires ; l’ajout de notes aux articles ; l’ajout de légendes et d’annotations sur les images ;

Sur d’autres sites (5594)

  • a lot of GREEN Color at YUV420p —> RGB in OpenGL 2.0 Shader on iOS

    25 octobre 2012, par 이형근

    I want to make a movie player for iOS using ffmpeg and OpenGL ES 2.0
    but I have some problem. Output RGB image has a lot of GREEN color.
    This is code and images

    • 480x320 width & height :
    • 512x512 Texture width & height

    I got a YUV420p row data from ffmpeg AVFrame.

       for (int i = 0, nDataLen = 0; i < 3; i++) {
           int nShift = (i == 0) ? 0 : 1;
           uint8_t *pYUVData = (uint8_t *)_frame->data[i];
           for (int j = 0; j < (mHeight >> nShift); j++) {
               memcpy(&pData->pOutBuffer[nDataLen], pYUVData, (mWidth >> nShift));
               pYUVData += _frame->linesize[i];
               nDataLen += (mWidth >> nShift);
           }
       }

    and prepare texture for Y, U & V channel.

    //: U Texture
       if (sampler1Texture) glDeleteTextures(1, &sampler1Texture);

       glActiveTexture(GL_TEXTURE1);
       glGenTextures(1, &sampler1Texture);
       glBindTexture(GL_TEXTURE_2D, sampler1Texture);

       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       // This is necessary for non-power-of-two textures
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
       glEnable(GL_TEXTURE_2D);

       glTexImage2D(GL_TEXTURE_2D,
                    0,
                    GL_LUMINANCE,
                    texW / 2,
                    texH / 2,
                    0,
                    GL_LUMINANCE,
                    GL_UNSIGNED_BYTE,
                    NULL);

       //: V Texture
       if (sampler2Texture) glDeleteTextures(1, &sampler2Texture);

       glActiveTexture(GL_TEXTURE2);
       glGenTextures(1, &sampler2Texture);
       glBindTexture(GL_TEXTURE_2D, sampler2Texture);

       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       // This is necessary for non-power-of-two textures
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
       glEnable(GL_TEXTURE_2D);

       glTexImage2D(GL_TEXTURE_2D,
                    0,
                    GL_LUMINANCE,
                    texW / 2,
                    texH / 2,
                    0,
                    GL_LUMINANCE,
                    GL_UNSIGNED_BYTE,
                    NULL);

       //: Y Texture
       if (sampler0Texture) glDeleteTextures(1, &sampler0Texture);

       glActiveTexture(GL_TEXTURE0);
       glGenTextures(1, &sampler0Texture);
       glBindTexture(GL_TEXTURE_2D, sampler0Texture);

       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
       // This is necessary for non-power-of-two textures
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
       glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
       glEnable(GL_TEXTURE_2D);

       glTexImage2D(GL_TEXTURE_2D,
                    0,
                    GL_LUMINANCE,
                    texW,
                    texH,
                    0,
                    GL_LUMINANCE,
                    GL_UNSIGNED_BYTE,
                    NULL);

    Rendering part is below.

    int _idxU = mFrameW * mFrameH;
    int _idxV = _idxU + (_idxU / 4);

    // U data
    glActiveTexture(GL_TEXTURE1);
    glBindTexture(GL_TEXTURE_2D, sampler1Texture);
    glUniform1i(sampler1Uniform, 1);

    glTexSubImage2D(
                   GL_TEXTURE_2D,
                   0,
                   0,
                   0,
                   mFrameW / 2,            // source width
                   mFrameH / 2,            // source height
                   GL_LUMINANCE,
                   GL_UNSIGNED_BYTE,
                   &_frameData[_idxU]);

    // V data
    glActiveTexture(GL_TEXTURE2);
    glBindTexture(GL_TEXTURE_2D, sampler2Texture);
    glUniform1i(sampler2Texture, 2);

    glTexSubImage2D(
                   GL_TEXTURE_2D,
                   0,
                   0,
                   0,
                   mFrameW / 2,            // source width
                   mFrameH / 2,            // source height
                   GL_LUMINANCE,
                   GL_UNSIGNED_BYTE,
                   &_frameData[_idxV]);

    // Y data
    glActiveTexture(GL_TEXTURE0);
    glBindTexture(GL_TEXTURE_2D, sampler0Texture);
    glUniform1i(sampler0Uniform, 0);

    glTexSubImage2D(
                   GL_TEXTURE_2D,
                   0,
                   0,
                   0,
                   mFrameW,            // source width
                   mFrameH,            // source height
                   GL_LUMINANCE,
                   GL_UNSIGNED_BYTE,
                   _frameData);

    Vertex Shader & Fragment Shader is below.

    attribute vec4 Position;
    attribute vec2 TexCoordIn;

    varying vec2 TexCoordOut;
    varying vec2 TexCoordOut_UV;

    uniform mat4 Projection;
    uniform mat4 Modelview;

    void main()
    {
       gl_Position = Projection * Modelview * Position;
       TexCoordOut = TexCoordIn;
    }



    uniform sampler2D sampler0; // Y Texture Sampler
    uniform sampler2D sampler1; // U Texture Sampler
    uniform sampler2D sampler2; // V Texture Sampler

    varying highp vec2 TexCoordOut;

    void main()
    {
       highp float y = texture2D(sampler0, TexCoordOut).r;
       highp float u = texture2D(sampler2, TexCoordOut).r - 0.5;
       highp float v = texture2D(sampler1, TexCoordOut).r - 0.5;

       //y = 0.0;
       //u = 0.0;
       //v = 0.0;

       highp float r = y + 1.13983 * v;
       highp float g = y - 0.39465 * u - 0.58060 * v;
       highp float b = y + 2.03211 * u;

       gl_FragColor = vec4(r, g, b, 1.0);
    }

    Y Texture (Grayscale) is correct but U & V has a lot of Green Color.
    So final RGB image (Y+U+V) has a lot of GREEN Color.
    What's the problem ?

    Please help.
    thanks.

  • record desktop save every 30 minutes

    31 mars 2014, par Maged E William

    here is my question that related to the same problem :

    better way to record desktop via ffmpeg

    I have this command : ffmpeg -f dshow -i video="screen-capture-recorder" -r 30 -t 10 E:\test01.flv

    And i am happy with it, but i wonder if i can make it save every 30 minutes so if the power went off i only loses the last 30 minutes.

    I use C# to launch and hide ffmpeg cmd, so i wonder how to make it save to the same test01.flv every 30 minutes ?

  • Cortex-A7 instruction cycle timings

    15 mai 2014, par Mans — ARM

    The Cortex-A7 ARM core is a popular choice in low-power and low-cost designs. Unfortunately, the public TRM does not include instruction timing information. It does reveal that execution is in-order which makes measuring the throughput and latency for individual instructions relatively straight-forward.

    The table below lists the measured issue cycles (inverse throughput) and result latency of some commonly used instructions.

    It should be noted that in some cases, the perceived latency depends on the instruction consuming the result. Most of the values were measured with the result used as input to the same instruction. For instructions with multiple outputs, the latencies of the result registers may also differ.

    Finally, although instruction issue is in-order, completion is out of order, allowing independent instructions to issue and complete unimpeded while a multi-cycle instruction is executing in another unit. For example, a 3-cycle MUL instruction does not block ADD instructions following it in program order.

    ALU instructions Issue cycles Result latency
    MOV Rd, Rm 1/2 1
    ADD Rd, Rn, #imm 1/2 1
    ADD Rd, Rn, Rm 1 1
    ADD Rd, Rn, Rm, LSL #imm 1 1
    ADD Rd, Rn, Rm, LSL Rs 1 1
    LSL Rd, Rn, #imm 1 2
    LSL Rd, Rn, Rs 1 2
    QADD Rd, Rn, Rm 1 2
    QADD8 Rd, Rn, Rm 1 2
    QADD16 Rd, Rn, Rm 1 2
    CLZ Rd, Rm 1 1
    RBIT Rd, Rm 1 2
    REV Rd, Rm 1 2
    SBFX Rd, Rn 1 2
    BFC Rd, #lsb, #width 1 2
    BFI Rd, Rn, #lsb, #width 1 2
    NOTE : Shifted operands and shift amounts needed one cycle early.
    Multiply instructions Issue cycles Result latency
    MUL Rd, Rn, Rm 1 3
    MLA Rd, Rn, Rm, Ra 1 31
    SMULL Rd, RdHi, Rn, Rm 1 3
    SMLAL Rd, RdHi, Rn, Rm 1 31
    SMMUL Rd, Rn, Rm 1 3
    SMMLA Rd, Rn, Rm, Ra 1 31
    SMULBB Rd, Rn, Rm 1 3
    SMLABB Rd, Rn, Rm, Ra 1 31
    SMULWB Rd, Rn, Rm 1 3
    SMLAWB Rd, Rn, Rm, Ra 1 31
    SMUAD Rd, Rn, Rm 1 3
    1 Accumulator forwarding allows back to back MLA instructions without delay.
    Divide instructions Issue cycles Result latency
    SDIV Rd, Rn, Rm 4-20 6-22
    UDIV Rd, Rn, Rm 3-19 5-21
    Load/store instructions Issue cycles Result latency
    LDR Rt, [Rn] 1 3
    LDR Rt, [Rn, #imm] 1 3
    LDR Rt, [Rn, Rm] 1 3
    LDR Rt, [Rn, Rm, lsl #imm] 1 3
    LDRD Rt, Rt2, [Rn] 1 3-4
    LDM Rn, regs 1-8 3-10
    STR Rt, [Rn] 1 2
    STRD Rt, Rt2, [Rn] 1 2
    STM Rn, regs 1-10 2-12
    NOTE : Load results are forwarded to dependent stores without delay.
    VFP instructions Issue cycles Result latency
    VMOV.F32 Sd, Sm 1 4
    VMOV.F64 Dd, Dm 1 4
    VNEG.F32 Sd, Sm 1 4
    VNEG.F64 Dd, Dm 1 4
    VABS.F32 Sd, Sm 1 4
    VABS.F64 Dd, Dm 1 4
    VADD.F32 Sd, Sn, Sm 1 4
    VADD.F64 Dd, Dn, Dm 1 4
    VMUL.F32 Sd, Sn, Sm 1 4
    VMUL.F64 Dd, Dn, Dm 4 7
    VMLA.F32 Sd, Sn, Sm 1 81
    VMLA.F64 Dd, Dn, Dm 4 112
    VFMA.F32 Sd, Sn, Sm 1 81
    VFMA.F64 Dd, Dn, Dm 5 82
    VDIV.F32 Sd, Sn, Sm 15 18
    VDIV.F64 Dd, Dn, Dm 29 32
    VSQRT.F32 Sd, Sm 14 17
    VSQRT.F64 Dd, Dm 28 31
    VCVT.F32.F64 Sd, Dm 1 4
    VCVT.F64.F32 Dd, Sm 1 4
    VCVT.F32.S32 Sd, Sm 1 4
    VCVT.F64.S32 Dd, Sm 1 4
    VCVT.S32.F32 Sd, Sm 1 4
    VCVT.S32.F64 Sd, Dm 1 4
    VCVT.F32.S32 Sd, Sd, #fbits 1 4
    VCVT.F64.S32 Dd, Dd, #fbits 1 4
    VCVT.S32.F32 Sd, Sd, #fbits 1 4
    VCVT.S32.F64 Dd, Dd, #fbits 1 4
    1 5 cycles with dependency only on accumulator.
    2 8 cycles with dependency only on accumulator.
    NEON integer instructions Issue cycles Result latency
    VADD.I8 Dd, Dn, Dm 1 4
    VADDL.S8 Qd, Dn, Dm 2 4
    VADD.I8 Qd, Qn, Qm 2 4
    VMUL.I8 Dd, Dn, Dm 2 4
    VMULL.S8 Qd, Dn, Dm 2 4
    VMUL.I8 Qd, Qn, Qm 4 4
    VMLA.I8 Dd, Dn, Dm 2 4
    VMLAL.S8 Qd, Dn, Dm 2 4
    VMLA.I8 Qd, Qn, Qm 4 4
    VADD.I16 Dd, Dn, Dm 1 4
    VADDL.S16 Qd, Dn, Dm 2 4
    VADD.I16 Qd, Qn, Qm 2 4
    VMUL.I16 Dd, Dn, Dm 1 4
    VMULL.S16 Qd, Dn, Dm 2 4
    VMUL.I16 Qd, Qn, Qm 2 4
    VMLA.I16 Dd, Dn, Dm 1 4
    VMLAL.S16 Qd, Dn, Dm 2 4
    VMLA.I16 Qd, Qn, Qm 2 4
    VADD.I32 Dd, Dn, Dm 1 4
    VADDL.S32 Qd, Dn, Dm 2 4
    VADD.I32 Qd, Qn, Qm 2 4
    VMUL.I32 Dd, Dn, Dm 2 4
    VMULL.S32 Qd, Dn, Dm 2 4
    VMUL.I32 Qd, Qn, Qm 4 4
    VMLA.I32 Dd, Dn, Dm 2 4
    VMLAL.S32 Qd, Dn, Dm 2 4
    VMLA.I32 Qd, Qn, Qm 4 4
    NEON floating-point instructions Issue cycles Result latency
    VADD.F32 Dd, Dn, Dm 2 4
    VADD.F32 Qd, Qn, Qm 4 4
    VMUL.F32 Dd, Dn, Dm 2 4
    VMUL.F32 Qd, Qn, Qm 4 4
    VMLA.F32 Dd, Dn, Dm 2 81
    VMLA.F32 Qd, Qn, Qm 4 81
    1 5 cycles with dependency only on accumulator.
    NEON permute instructions Issue cycles Result latency
    VEXT.n Dd, Dn, Dm, #imm 1 4
    VEXT.n Qd, Qn, Qm, #imm 2 5
    VTRN.n Dd, Dn, Dm 2 5
    VTRN.n Qd, Qn, Qm 4 5
    VUZP.n Dd, Dn, Dm 2 5
    VUZP.n Qd, Qn, Qm 4 6
    VZIP.n Dd, Dn, Dm 2 5
    VZIP.n Qd, Qn, Qm 4 6
    VTBL.8 Dd, Dn, Dm 1 4
    VTBL.8 Dd, Dn-Dn+1, Dm 1 4
    VTBL.8 Dd, Dn-Dn+2, Dm 2 5
    VTBL.8 Dd, Dn-Dn+3, Dm 2 5