Recherche avancée

Médias (1)

Mot : - Tags -/musée

Autres articles (44)

  • Demande de création d’un canal

    12 mars 2010, par

    En fonction de la configuration de la plateforme, l’utilisateur peu avoir à sa disposition deux méthodes différentes de demande de création de canal. La première est au moment de son inscription, la seconde, après son inscription en remplissant un formulaire de demande.
    Les deux manières demandent les mêmes choses fonctionnent à peu près de la même manière, le futur utilisateur doit remplir une série de champ de formulaire permettant tout d’abord aux administrateurs d’avoir des informations quant à (...)

  • Ajouter des informations spécifiques aux utilisateurs et autres modifications de comportement liées aux auteurs

    12 avril 2011, par

    La manière la plus simple d’ajouter des informations aux auteurs est d’installer le plugin Inscription3. Il permet également de modifier certains comportements liés aux utilisateurs (référez-vous à sa documentation pour plus d’informations).
    Il est également possible d’ajouter des champs aux auteurs en installant les plugins champs extras 2 et Interface pour champs extras.

  • Use, discuss, criticize

    13 avril 2011, par

    Talk to people directly involved in MediaSPIP’s development, or to people around you who could use MediaSPIP to share, enhance or develop their creative projects.
    The bigger the community, the more MediaSPIP’s potential will be explored and the faster the software will evolve.
    A discussion list is available for all exchanges between users.

Sur d’autres sites (6157)

  • Does the Remote I/O audio unit set the number of channels in the buffer ?

    25 novembre 2013, par awfulcode

    I'm using kxmovie (it's a ffmpeg-based video player) as a base for an app and I'm trying to figure out how the RemoteI/O unit works on iOS when the only thing connected to a device is headphones and we're playing a track with more than 2 channels (say a surround 6 track channel). It seems like it is going with the output channel setting and the buffer only has 2 channels. Is this because of Core Audio's pull structure ? And if so, what's happening to the other channels in the track ? Are they being downmixed or simply ignored ?

    The code for the render callback connected to the remoteio unit is here :

    - (BOOL) renderFrames: (UInt32) numFrames
                  ioData: (AudioBufferList *) ioData
    {
       NSLog(@"Number of channels in buffer: %lu",ioData->mNumberBuffers);

       for (int iBuffer=0; iBuffer < ioData->mNumberBuffers; ++iBuffer) {
           memset(ioData->mBuffers[iBuffer].mData, 0, ioData->mBuffers[iBuffer].mDataByteSize);
       }


       if (_playing && _outputBlock ) {

           // Collect data to render from the callbacks
           _outputBlock(_outData, numFrames, _numOutputChannels);

           // Put the rendered data into the output buffer
           if (_numBytesPerSample == 4) // then we've already got floats
           {
               float zero = 0.0;

               for (int iBuffer=0; iBuffer < ioData->mNumberBuffers; ++iBuffer) {

                   int thisNumChannels = ioData->mBuffers[iBuffer].mNumberChannels;

                   for (int iChannel = 0; iChannel < thisNumChannels; ++iChannel) {
                       vDSP_vsadd(_outData+iChannel, _numOutputChannels, &zero, (float *)ioData->mBuffers[iBuffer].mData, thisNumChannels, numFrames);
                   }
               }
           }
           else if (_numBytesPerSample == 2) // then we need to convert SInt16 -> Float (and also scale)
           {
               float scale = (float)INT16_MAX;
               vDSP_vsmul(_outData, 1, &scale, _outData, 1, numFrames*_numOutputChannels);

               for (int iBuffer=0; iBuffer < ioData->mNumberBuffers; ++iBuffer) {

                   int thisNumChannels = ioData->mBuffers[iBuffer].mNumberChannels;

                   for (int iChannel = 0; iChannel < thisNumChannels; ++iChannel) {
                       vDSP_vfix16(_outData+iChannel, _numOutputChannels, (SInt16 *)ioData->mBuffers[iBuffer].mData+iChannel, thisNumChannels, numFrames);
                   }
               }

           }        
       }

       return noErr;
    }

    Thanks !

    edit : Here's the code for the ASBD (_ouputFormat). It's getting its values straight from the remoteio. You can also check the whole method file here.

    if (checkError(AudioUnitGetProperty(_audioUnit,
                                       kAudioUnitProperty_StreamFormat,
                                       kAudioUnitScope_Input,
                                       0,
                                       &_outputFormat,
                                       &size),
                  "Couldn't get the hardware output stream format"))
       return NO;


    _outputFormat.mSampleRate = _samplingRate;
    if (checkError(AudioUnitSetProperty(_audioUnit,
                                       kAudioUnitProperty_StreamFormat,
                                       kAudioUnitScope_Input,
                                       0,
                                       &_outputFormat,
                                       size),
                  "Couldn't set the hardware output stream format")) {

       // just warning
    }

    _numBytesPerSample = _outputFormat.mBitsPerChannel / 8;
    _numOutputChannels = _outputFormat.mChannelsPerFrame;

    NSLog(@"Current output bytes per sample: %ld", _numBytesPerSample);
    NSLog(@"Current output num channels: %ld", _numOutputChannels);

    // Slap a render callback on the unit
    AURenderCallbackStruct callbackStruct;
    callbackStruct.inputProc = renderCallback;
    callbackStruct.inputProcRefCon = (__bridge void *)(self);

    if (checkError(AudioUnitSetProperty(_audioUnit,
                                       kAudioUnitProperty_SetRenderCallback,
                                       kAudioUnitScope_Input,
                                       0,
                                       &callbackStruct,
                                       sizeof(callbackStruct)),
                  "Couldn't set the render callback on the audio unit"))
       return NO;
  • avfilter/pthread : use slice threading from avutil

    12 juillet 2017, par Muhammad Faiz
    avfilter/pthread : use slice threading from avutil
    

    Benchmark (with 2 cpus) :
    ./ffmpeg -f rawvideo -s 1280x720 -t 1000 -i /dev/zero \
    -filter_threads $threads -vf transpose=clock -f null null
    threads=2 :
    old : 31.129s 31.446s 31.574s
    new : 29.602s 29.636s 29.656s
    threads=3 (nb_threads = nb_cpus + 1 is bad choice at this situation) :
    old : 40.132s 40.279s 40.279s
    new : 39.308s 39.570s 39.693s
    threads=4 :
    old : 31.306s 31.366s 31.654s
    new : 30.231s 30.360s 30.451s

    Signed-off-by : Muhammad Faiz <mfcc64@gmail.com>

    • [DH] libavfilter/pthread.c
  • avcodec/rdft : reorder calculation

    21 juillet 2017, par Muhammad Faiz
    avcodec/rdft : reorder calculation
    

    old :
    165188 decicycles in rdft, 65536 runs, 0 skips
    165865 decicycles in irdft, 65536 runs, 0 skips
    new :
    142487 decicycles in rdft, 65536 runs, 0 skips
    141498 decicycles in irdft, 65536 runs, 0 skips

    Signed-off-by : Muhammad Faiz <mfcc64@gmail.com>

    • [DH] libavcodec/rdft.c