
Recherche avancée
Autres articles (101)
-
MediaSPIP 0.1 Beta version
25 avril 2011, parMediaSPIP 0.1 beta is the first version of MediaSPIP proclaimed as "usable".
The zip file provided here only contains the sources of MediaSPIP in its standalone version.
To get a working installation, you must manually install all-software dependencies on the server.
If you want to use this archive for an installation in "farm mode", you will also need to proceed to other manual (...) -
Les tâches Cron régulières de la ferme
1er décembre 2010, parLa gestion de la ferme passe par l’exécution à intervalle régulier de plusieurs tâches répétitives dites Cron.
Le super Cron (gestion_mutu_super_cron)
Cette tâche, planifiée chaque minute, a pour simple effet d’appeler le Cron de l’ensemble des instances de la mutualisation régulièrement. Couplée avec un Cron système sur le site central de la mutualisation, cela permet de simplement générer des visites régulières sur les différents sites et éviter que les tâches des sites peu visités soient trop (...) -
Emballe Médias : Mettre en ligne simplement des documents
29 octobre 2010, parLe plugin emballe médias a été développé principalement pour la distribution mediaSPIP mais est également utilisé dans d’autres projets proches comme géodiversité par exemple. Plugins nécessaires et compatibles
Pour fonctionner ce plugin nécessite que d’autres plugins soient installés : CFG Saisies SPIP Bonux Diogène swfupload jqueryui
D’autres plugins peuvent être utilisés en complément afin d’améliorer ses capacités : Ancres douces Légendes photo_infos spipmotion (...)
Sur d’autres sites (11986)
-
Fix read-after-free in matroska_read_seek().
6 novembre 2014, par Xiaohan WangFix read-after-free in matroska_read_seek().
In matroska_read_seek(), |tracks| is assigned at the begining of the function.
However, functions like matroska_parse_cues() could reallocate the tracks so
that |tracks| can get invalidated.This CL assigns |tracks| only before we use it so that it won’t be invalidated.
BUG=427266
TEST=Test case in associated bug passes now.Change-Id : I9c7065fe8f4311ca846076281df2282d190ed344
Signed-off-by : Michael Niedermayer <michaelni@gmx.at>
-
FFMPEG : RGB to YUV conversion by binary ffmpeg and by code C++ give different results
15 mars 2015, par muocdichI am trying to convert RGB frames (ppm format) to YUV420P format using ffmpeg. To make sure that my code C++ is good , I compared the output with the one created by this command (the same filer BILINEAR) :
ffmpeg -start_number 1 -i data/test512x512%d.ppm -sws_flags ’bilinear’ -pix_fmt yuv420p data/test-yuv420p.yuvMy code :
static unsigned char *readPPM(int i)
{
FILE *pF;
unsigned char *imgRGB;
unsigned char *imgBGR;
int w,h;
int c;
int bit;
char buff[16];
char *filename;
asprintf(&filename,"test512x512%d.ppm",i);
pF = fopen(filename,"rb");
free(filename);
if (pF) {
if (!fgets(buff, sizeof(buff), pF)) {
return nullptr;
}
if (buff[0] != 'P' || buff[1] != '6') {
fprintf(stderr, "Invalid image format (must be 'P6')\n");
return nullptr;
}
c = getc(pF);
while (c == '#') {
while (getc(pF) != '\n') ;
c = getc(pF);
}
ungetc(c, pF);
// read size
if (fscanf(pF, "%d %d", &w, &h) != 2) {
fprintf(stderr, "Invalid image size (error loading '%s')\n", filename);
return nullptr;
}
//read bit
if (fscanf(pF, "%d", &bit) != 1) {
fprintf(stderr, "Invalid rgb component (error loading '%s')\n", filename);
exit(1);
}
imgRGB =(unsigned char*) malloc(3*h*w);
imgBGR =(unsigned char*) malloc(3*h*w);
//read pixel data from file
int length = fread(imgBGR, sizeof(unsigned char)*3, w*h, pF) ;
if (length != w*h) {
fprintf(stderr, "Error loading image '%s'\n", filename);
return nullptr;
}
int start=0;
for (i=0; i < HEIGHT*WIDTH;i++) {
imgRGB[start] = imgBGR[start];
imgRGB[start+2]= imgBGR[start+2];
imgRGB[start+1]= imgBGR[start+1];
start+=3;
}
fclose(pF);
free(imgBGR);
return imgRGB;
}
else {
return nullptr;
}
}
void Test_FFMPEG::FillFrame (uint8_t* pic, int index)
{
avpicture_fill((AVPicture*)RGBFrame, pic, AV_PIX_FMT_RGB24, encodeContext->width, encodeContext->height);
struct SwsContext* fooContext = sws_getContext(encodeContext->width, encodeContext->height,
PIX_FMT_RGB24,
encodeContext->width, encodeContext->height,
PIX_FMT_YUV420P,
SWS_BILINEAR , nullptr, nullptr, nullptr);
sws_scale(fooContext, RGBFrame->data, RGBFrame->linesize, 0, encodeContext->height, OrgFrame->data, OrgFrame->linesize);
OrgFrame->pts = index;
}The comparison result is not good. The are slight differences in Y and V but a lot in U. I cannot post my images but there is a part of Y is in U image. And it makes color change a little bit.
Can you tell me where is my error ? Thanks you
-
lzf : update pointer p after realloc
4 novembre 2016, par Andreas Cadhalpun