
Recherche avancée
Médias (1)
-
The Great Big Beautiful Tomorrow
28 octobre 2011, par
Mis à jour : Octobre 2011
Langue : English
Type : Texte
Autres articles (59)
-
Amélioration de la version de base
13 septembre 2013Jolie sélection multiple
Le plugin Chosen permet d’améliorer l’ergonomie des champs de sélection multiple. Voir les deux images suivantes pour comparer.
Il suffit pour cela d’activer le plugin Chosen (Configuration générale du site > Gestion des plugins), puis de configurer le plugin (Les squelettes > Chosen) en activant l’utilisation de Chosen dans le site public et en spécifiant les éléments de formulaires à améliorer, par exemple select[multiple] pour les listes à sélection multiple (...) -
Emballe médias : à quoi cela sert ?
4 février 2011, parCe plugin vise à gérer des sites de mise en ligne de documents de tous types.
Il crée des "médias", à savoir : un "média" est un article au sens SPIP créé automatiquement lors du téléversement d’un document qu’il soit audio, vidéo, image ou textuel ; un seul document ne peut être lié à un article dit "média" ; -
Le plugin : Gestion de la mutualisation
2 mars 2010, parLe plugin de Gestion de mutualisation permet de gérer les différents canaux de mediaspip depuis un site maître. Il a pour but de fournir une solution pure SPIP afin de remplacer cette ancienne solution.
Installation basique
On installe les fichiers de SPIP sur le serveur.
On ajoute ensuite le plugin "mutualisation" à la racine du site comme décrit ici.
On customise le fichier mes_options.php central comme on le souhaite. Voilà pour l’exemple celui de la plateforme mediaspip.net :
< ?php (...)
Sur d’autres sites (6098)
-
Revision 4397 : On ajoute une class="noresize" qui empèche dans tous les cas l’adaptation ...
8 novembre 2010, par kent1 — LogOn ajoute une class="noresize" qui empèche dans tous les cas l’adaptation de la vidéo au parent même si appelée comme telle Lors du passage en fullscreen on doit mettre en mémoire la taille de la vidéo avant d’y toucher pour être sûr de récupérer les bonnes tailles au moment voulu Un outline:none en css (...)
-
Revision 666fd1300c : Added high precision transforms The high precision are only used if configured
3 juin 2014, par Peter de RivazChanged Paths :
Modify /configure
Modify /test/dct16x16_test.cc
Modify /test/dct32x32_test.cc
Modify /test/fdct4x4_test.cc
Modify /test/fdct8x8_test.cc
Modify /test/idct8x8_test.cc
Modify /test/partial_idct_test.cc
Modify /vp9/common/vp9_blockd.h
Modify /vp9/common/vp9_idct.c
Modify /vp9/common/vp9_idct.h
Modify /vp9/common/vp9_quant_common.c
Modify /vp9/common/vp9_quant_common.h
Modify /vp9/common/vp9_rtcd_defs.pl
Modify /vp9/decoder/vp9_decodeframe.c
Modify /vp9/decoder/vp9_detokenize.c
Modify /vp9/encoder/vp9_block.h
Modify /vp9/encoder/vp9_context_tree.c
Modify /vp9/encoder/vp9_context_tree.h
Modify /vp9/encoder/vp9_dct.c
Modify /vp9/encoder/vp9_encodemb.c
Modify /vp9/encoder/vp9_firstpass.c
Modify /vp9/encoder/vp9_picklpf.c
Modify /vp9/encoder/vp9_pickmode.c
Modify /vp9/encoder/vp9_quantize.c
Modify /vp9/encoder/vp9_ratectrl.c
Modify /vp9/encoder/vp9_rdopt.c
Modify /vp9/encoder/vp9_tokenize.c
Added high precision transformsThe high precision are only used if
configured with —enable-high-transformsIt gives greater precision in the transform.
This gives PSNR improvements when encoding
true 10 and 12 bit streams.At the moment, the quantizer used is shifted
up by 2/4 for 10/12 bits so that the quantized
coefficients fit in the current token range.Change-Id : Ia9c19a417cf030b8a7a889fcb3f5788bfca8215f
-
Bit-field badness
30 janvier 2010, par Mans — Compilers, OptimisationConsider the following C code which is based on an real-world situation.
struct bf1_31 unsigned a:1 ; unsigned b:31 ; ;
void func(struct bf1_31 *p, int n, int a)
int i = 0 ;
do
if (p[i].a)
p[i].b += a ;
while (++i < n) ;
How would we best write this in ARM assembler ? This is how I would do it :
func : ldr r3, [r0], #4 tst r3, #1 add r3, r3, r2, lsl #1 strne r3, [r0, #-4] subs r1, r1, #1 bgt func bx lr
The
add
instruction is unconditional to avoid a dependency on the comparison. Unrolling the loop would mask the latency of theldr
instruction as well, but that is outside the scope of this experiment.Now compile this code with
gcc -march=armv5te -O3
and watch in horror :func : push r4 mov ip, #0 mov r4, r2 loop : ldrb r3, [r0] add ip, ip, #1 tst r3, #1 ldrne r3, [r0] andne r2, r3, #1 addne r3, r4, r3, lsr #1 orrne r2, r2, r3, lsl #1 strne r2, [r0] cmp ip, r1 add r0, r0, #4 blt loop pop r4 bx lr
This is nothing short of awful :
- The same value is loaded from memory twice.
- A complicated mask/shift/or operation is used where a simple shifted add would suffice.
- Write-back addressing is not used.
- The loop control counts up and compares instead of counting down.
- Useless
mov
in the prologue ; swapping the roles orr2
andr4
would avoid this. - Using
lr
in place ofr4
would allow the return to be done withpop {pc}
, saving one instruction (ignoring for the moment that no callee-saved registers are needed at all).
Even for this trivial function the gcc-generated code is more than twice the optimal size and slower by approximately the same factor.
The main issue I wanted to illustrate is the poor handling of bit-fields by gcc. When accessing bitfields from memory, gcc issues a separate load for each field even when they are contained in the same aligned memory word. Although each load after the first will most likely hit L1 cache, this is still bad for several reasons :
- Loads have typically two or three cycles result latency compared to one cycle for data processing instructions. Any bit-field can be extracted from a register with two shifts, and on ARM the second of these can generally be achieved using a shifted second operand to a following instruction. The ARMv6T2 instruction set also adds the
SBFX
andUBFX
instructions for extracting any signed or unsigned bit-field in one cycle. - Most CPUs have more data processing units than load/store units. It is thus more likely for an ALU instruction than a load/store to issue without delay on a superscalar processor.
- Redundant memory accesses can trigger early flushing of store buffers rendering these less efficient.
No gcc bashing is complete without a comparison with another compiler, so without further ado, here is the ARM RVCT output (
armcc --cpu 5te -O3
) :func : mov r3, #0 push r4, lr loop : ldr ip, [r0, r3, lsl #2] tst ip, #1 addne ip, ip, r2, lsl #1 strne ip, [r0, r3, lsl #2] add r3, r3, #1 cmp r3, r1 blt loop pop r4, pc
This is much better, the core loop using only one instruction more than my version. The loop control is counting up, but at least this register is reused as offset for the memory accesses. More remarkable is the push/pop of two registers that are never used. I had not expected to see this from RVCT.
Even the best compilers are still no match for a human.