
Recherche avancée
Médias (1)
-
Video d’abeille en portrait
14 mai 2011, par
Mis à jour : Février 2012
Langue : français
Type : Video
Autres articles (50)
-
La file d’attente de SPIPmotion
28 novembre 2010, parUne file d’attente stockée dans la base de donnée
Lors de son installation, SPIPmotion crée une nouvelle table dans la base de donnée intitulée spip_spipmotion_attentes.
Cette nouvelle table est constituée des champs suivants : id_spipmotion_attente, l’identifiant numérique unique de la tâche à traiter ; id_document, l’identifiant numérique du document original à encoder ; id_objet l’identifiant unique de l’objet auquel le document encodé devra être attaché automatiquement ; objet, le type d’objet auquel (...) -
Contribute to documentation
13 avril 2011Documentation is vital to the development of improved technical capabilities.
MediaSPIP welcomes documentation by users as well as developers - including : critique of existing features and functions articles contributed by developers, administrators, content producers and editors screenshots to illustrate the above translations of existing documentation into other languages
To contribute, register to the project users’ mailing (...) -
Use, discuss, criticize
13 avril 2011, parTalk 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 (6367)
-
problem in loading texture from AVFrame(android)
25 mars 2013, par SieuTrucI get a problem when loading data from AVFrame to openGL :
int target_width = 320;
int target_height = 240;
img_convert_ctx = sws_getContext(pCodecCtx->width, pCodecCtx->height,
pCodecCtx->pix_fmt,
target_width, target_height, PIX_FMT_RGBA, SWS_FAST_BILINEAR,
NULL, NULL, NULL);
if(img_convert_ctx == NULL) {
LOGE("could not initialize conversion context\n");
return;
}
sws_scale(img_convert_ctx, (const uint8_t* const*)pFrame->data, pFrame->linesize, 0, pCodecCtx->height, pFrameRGB->data, pFrameRGB->linesize);
//free(data);
int line=target_width*target_height*4;
data=(char*)malloc(line);
if (!data)
LOGE("create data frame fail");
LOGE("successful data");
filldata(data,pFrameRGB,target_width,target_height);with function filldata as :
static void filldata(char *data,AVFrame *pFrame,int w,int h)
{uint8_t *frameLine;
int yy;
int i=0;
for (yy = 0; yy < h; yy++) {
frameLine = (uint8_t *)pFrame->data[0] + (yy * pFrame->linesize[0]);
int xx;
for (xx = 0; xx < w; xx++) {
int in_offset = xx * 4;
data[i++] = frameLine[in_offset];
data[i++] = frameLine[in_offset+1];
data[i++] = frameLine[in_offset+2];
data[i++] = frameLine[in_offset+3];
}
}
}After that i use data to transfer to
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, *wi, *he, 0, GL_RGBA, GL_UNSIGNED_BYTE, (GLvoid*)data);
but it cannot show texture, maybe data above and data in function gltextimage2D are different.
Please help me figure out what is the format for gltextimage2D so i can configure data to show texture. OR anyone has some sample code to show me. -
ffmpeg buffer not released
11 mars 2013, par ByteByterSo, I have written a basic decoder for ffmpeg that simply reads the input frames pixel data (Stored using RGB 8 format), and places it directly into the output buffer. (Also RGB 8) The problem is that when I use this decoder in ffmpeg, it says that there is 1 unreleased buffer.(Tested using ffmpeg -i Test.utah Test.png). Unfortunately, I am unsure of what buffer it is talking about, as I am not creating my own buffer. I have tried releasing the AVContext's coded_frame buffer in my decoders closing method, but this causes segmentation faults.
Any help would be greatly appreciated.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
{
int ret; /*Hold return from get_buffer */
int skipSize; /*Number of dummy bytes to skip per line*/
int fseek=8; /*Location of the first pixel*/
int i=0; int j=0; /*Output buffer seek index/Input Buffer seek index*/
const uint8_t *buf = avpkt->data; /*Hold a pointer to the input buffer*/
AVFrame *pict=data; /*Hold a pointer to the output buffer*/
/*Set the output pixel format to RGB8*/
avctx->pix_fmt = AV_PIX_FMT_RGB8;
/*Get the width and height*/
bytestream_get_le32(&buf);
avctx->width=bytestream_get_le16(&buf);
avctx->height=bytestream_get_le16(&buf);
/*Release the old buffer*/
if (pict->data[0]) avctx->release_buffer(avctx, pict);
/*Aquire a large enough data buffer to hold the decompressed picture*/
if (ret=ff_get_buffer(avctx, pict) < 0) return ret;
skipSize=pict->linesize[0] - avctx->width;
/*Transfer input buffer to output buffer*/
for(int y=0;yheight;y++){
for(int x=0;xwidth;x++){
pict->data[0][i]=avpkt->data[fseek+j];
j++;
i++;
}
i+=skipSize;
}
/*Inform ffmpeg the output is a key frame and that it is ready for external usage*/
pict->pict_type = AV_PICTURE_TYPE_I;
pict->key_frame = 1;
*got_frame=1;
return 0;
} -
How to avoid audio sample 16bit clipping after equalization ?
28 mai 2013, par testCoderI have samples which come from ffmpeg, very often it is 16 bit samples (short type), i have used iir band pass filter with dbGain as described here, after filtering i sometimes got a short type overflow and result of it is some noise when calculated sample value go out from 32767/-32767, Is any way to escape audio pcm sample clipping. May be exists any approaches ?
I have googled but not found any worked example ?
UPDATE
When i cast transfer function calculation result to integer and check overflow then noise still occurs: :
int result = A1 * ((int) Rx) + A2 * ((int) Rxx) + A3 * ((int) Rxxx)
- B1 * ((int) Ryy) - B2 * ((int) Ryyy);
if (result > 32767)
result = 32767;
if (result < -32700)
result = -32700;
y = (short) result;