Browse Source

Añadi el informe del TP anterior para usar de template.

Fabian 11 năm trước cách đây
mục cha
commit
5f4613871c
43 tập tin đã thay đổi với 879 bổ sung0 xóa
  1. 27 0
      informe/Makefile
  2. BIN
      informe/include/DiferenciasContrasteArbitraria.jpg
  3. BIN
      informe/include/DiferenciasPuro000.jpg
  4. BIN
      informe/include/DiferenciasPuro180.jpg
  5. BIN
      informe/include/TiempoEjecucionNormalizado.png
  6. BIN
      informe/include/TiempoEjecucionNormalizadov2.png
  7. 15 0
      informe/include/blur1_1.asm
  8. 14 0
      informe/include/blur1_2.asm
  9. 12 0
      informe/include/blur2_1.asm
  10. 4 0
      informe/include/blur2_2.asm
  11. 19 0
      informe/include/blur2_3.asm
  12. 16 0
      informe/include/blur2_4.asm
  13. BIN
      informe/include/figure_blur.png
  14. BIN
      informe/include/figure_merge.png
  15. 12 0
      informe/include/hsl1_p1.asm
  16. 12 0
      informe/include/hsl1_p1.asm~
  17. 6 0
      informe/include/hsl1_p2.asm
  18. 6 0
      informe/include/hsl1_p2.asm~
  19. 8 0
      informe/include/hsl1_p3.asm
  20. 4 0
      informe/include/hsl1_p3.asm~
  21. 8 0
      informe/include/hsl1_p4.asm
  22. 0 0
      informe/include/hsl1_p4.asm~
  23. 6 0
      informe/include/hsl1_p5.asm
  24. 5 0
      informe/include/hsl2_p1.asm
  25. 5 0
      informe/include/hsl2_p1.asm~
  26. 10 0
      informe/include/hsl2_p2.asm
  27. 0 0
      informe/include/hsl2_p2.asm~
  28. 7 0
      informe/include/hsl2_p3.asm
  29. 7 0
      informe/include/hsl2_p3.asm~
  30. 5 0
      informe/include/hsl2_p4.asm
  31. 5 0
      informe/include/merge1_1.asm
  32. 10 0
      informe/include/merge1_2.asm
  33. 7 0
      informe/include/merge1_3.asm
  34. 20 0
      informe/include/merge2_1.asm
  35. 9 0
      informe/include/merge2_2.asm
  36. 189 0
      informe/informeTP2.tex
  37. 115 0
      informe/packages/caratula.sty
  38. 109 0
      informe/subBlur.tex
  39. 8 0
      informe/subConclusion.tex
  40. 25 0
      informe/subHSL.tex
  41. 25 0
      informe/subIntroduccion.tex
  42. 62 0
      informe/subMerge.tex
  43. 87 0
      informe/subResultados.tex

+ 27 - 0
informe/Makefile

@@ -0,0 +1,27 @@
+# ************************************************************************* #
+# Organizacion del Computador II                                            #
+#                                                                           #
+#   Informe Trabajo Practico 2                                              #
+#   Necesito setear ./packages en la variable de entorno TEXINPUTS, así     #
+#   me toma el paquete de la caratula, sino hay que instalar el paquete a   #
+#   mano en el home en no se que directorio.                                #
+#                                                                           #
+#                                                                           #
+#  Si se quiere correr a mano el pdflatex desde la consola primero hay que  #
+#  que correr:                                                              #
+#            export TEXINPUTS=".:./packages:"                               #
+#                                                                           #
+#                                                                           #
+#  Para que genere la tabla de contenidos hay que compilar dos veces.       #
+#                                                                           #
+# ************************************************************************* #
+
+all: informe
+
+informe: 
+	TEXINPUTS=".:./packages:" pdflatex informeTP2.tex
+	TEXINPUTS=".:./packages:" pdflatex informeTP2.tex
+
+clean:
+	rm -f *.aux *.log *.out *.toc
+	rm -f *.pdf

BIN
informe/include/DiferenciasContrasteArbitraria.jpg


BIN
informe/include/DiferenciasPuro000.jpg


BIN
informe/include/DiferenciasPuro180.jpg


BIN
informe/include/TiempoEjecucionNormalizado.png


BIN
informe/include/TiempoEjecucionNormalizadov2.png


+ 15 - 0
informe/include/blur1_1.asm

@@ -0,0 +1,15 @@
+.pixel:
+	movdqu xmm0, [rbx] ;guardo 4 pixeles, uno no me sirve
+	pslldq xmm0, 4 ;destruyo al pixel que no me sirve
+	movdqa xmm1, xmm0 ;copio
+	pxor xmm4, xmm4
+	punpcklbw xmm0, xmm4 ; xmm0 =  00000000 | 0r0g0b0a
+	punpckhbw xmm1, xmm4 ; xmm1 =  0r0g0b0a | 0r0g0b0a
+	paddw xmm2, xmm0
+	paddw xmm2, xmm1
+	;tengo que sumar horizontalmente, o dividir en high y low y sumar eso
+	add rbx, r9 ;me voy una fila para adelante
+	dec r8
+	cmp r8, 0
+	jne .pixel
+

+ 14 - 0
informe/include/blur1_2.asm

@@ -0,0 +1,14 @@
+.finFila:
+	dec rsi ;reduzco cuantas filas me faltan
+	cmp rsi, 0
+	je .finArchivo
+	;copio [fila][ancho-1] y [fila+1][0]
+	movdqu xmm0, [rdx] ;guardo 4 pixeles, solo voy a usar la parte baja
+	movd dword [rax], xmm0
+	psrldq xmm0, 4 ;shift derecha 1 pix
+	movd dword [rax+4], xmm0
+	add rdx, 8 ;me voy de [fila][ancho-1] a [fila+1][1]
+	add rax, 8 ;me voy de [fila][ancho-1] a [fila+1][1]
+	mov rcx, rdi ;reinicio cuantas columnas me faltan
+	jmp .fila
+

+ 12 - 0
informe/include/blur2_1.asm

@@ -0,0 +1,12 @@
+.columna:
+	lea r9, [rbx + r11]				; r9 = Puntero a la imagen + fila Actual
+	add r9, r10						; r9 = Punt. Imagen + Fila Actual + Columna Actual
+	sub r9, r13						; Resto una fila
+	movdqu xmm0, [r9 - PIXEL_SIZE]	; Leo tambien el dato anterior: xmm0 = |Up0|Up1|Up2|Up3|
+	movdqu xmm2, [r9 + PIXEL_SIZE]	; xmm2 = |Up2|Up3|Up4|Up5|
+	add r9, r13						; Sumo una fila (voy a la actual)
+	movdqu xmm3, [r9 - PIXEL_SIZE]	; xmm3 = |p0|p1|p2|p3|
+	movdqu xmm5, [r9 + PIXEL_SIZE]	; xmm5 = |p2|p3|p4|p5|
+	add r9, r13						; Sumo una fila (sig)
+	movdqu xmm6, [r9 - PIXEL_SIZE]	; xmm6 = |Dp0|Dp1|Dp2|Dp3|
+	movdqu xmm8, [r9 + PIXEL_SIZE]	; xmm8 = |Dp2|Dp3|Dp4|Dp5|

+ 4 - 0
informe/include/blur2_2.asm

@@ -0,0 +1,4 @@
+	movdqa xmm1, xmm0			; Copia
+	punpcklbw xmm0, xmm15		; xmm0 = |Up0|Up1|
+	punpckhbw xmm1, xmm15		; xmm1 = |Up2|Up3|
+	punpckhbw xmm2, xmm15		; xmm2 = |Up4|Up5|

+ 19 - 0
informe/include/blur2_3.asm

@@ -0,0 +1,19 @@
+	; Genero los nuevos registros para la suma
+	movdqa xmm9, xmm3
+	psrldq xmm9, 8				; xmm9 = |SUM(p1)|0x0|
+	movdqa xmm10, xmm4
+	pslldq xmm10, 8				; xmm10 = |0x0|SUM(p2)|
+	paddusw xmm9, xmm10			; xmm9 = |SUM(p1)|SUM(p2)|
+	
+	movdqa xmm10, xmm4
+	psrldq xmm10, 8				; xmm10 = |SUM(p3)|0x0|
+	movdqa xmm11, xmm5
+	pslldq xmm11, 8				; xmm11 = |0x0|SUM(p4)|
+	paddusw xmm10, xmm11		; xmm10 = |SUM(p3)|SUM(p4)|
+	
+	; Sumo los pixeles de una misma fila
+	paddusw xmm3, xmm4			; xmm3 = |SUM(p0)+SUM(p2)|SUM(p1)+SUM(p3)|
+	paddusw xmm3, xmm9			; xmm3 = |SUM(p0)+SUM(p2)+SUM(p1)|SUM(p1)+SUM(p3)+SUM(p2)|
+	paddusw xmm5, xmm4			; xmm4 = |SUM(p4)+SUM(p2)|SUM(p5)+SUM(p3)|
+	paddusw xmm5, xmm10			; xmm4 = |SUM(p4)+SUM(p2)+SUM(p3)|SUM(p5)+SUM(p3)+SUM(p4)|
+	

+ 16 - 0
informe/include/blur2_4.asm

@@ -0,0 +1,16 @@
+	lea rsi, [r12 + r15 * PIXEL_SIZE]	; Origen: Primera fila no se procesa
+	lea rdi, [rbx + r15 * PIXEL_SIZE]	; Destino: Primera fila no se procesa
+.ciclo:
+	mov rcx, rdx				; Cargo el ancho -2 pixeles
+	add rdi, PIXEL_SIZE			; Origen: Tengo que saltear el primer pixel
+	add rsi, PIXEL_SIZE			; Destino: Tengo que saltear el primer pixel
+	cld							; Flag de direccion (forward)
+	rep movsd					; Repetime movsd
+	inc rax 					; Ya procese una fila, aumento 
+	add rdi, PIXEL_SIZE			; Salto ultimo pixel
+	add rsi, PIXEL_SIZE
+	cmp rax, r14
+	jle .ciclo					; Mientras sea menor vuelvo al ciclo 
+
+mov rdi, r12					; Cargo parametro r12
+call free						; Libero la memoria

BIN
informe/include/figure_blur.png


BIN
informe/include/figure_merge.png


+ 12 - 0
informe/include/hsl1_p1.asm

@@ -0,0 +1,12 @@
+	pxor xmm7, xmm7					; xmm7 = | 00 | 00 | 00 | 00 |;
+	insertps xmm7, xmm0, 0b00010000	; xmm7 = | 00 | 00 | HH | 00 |;
+	insertps xmm7, xmm1, 0b00100000	; xmm7 = | 00 | SS | HH | 00 |;
+	insertps xmm7, xmm2, 0b00110000	; xmm7 = | LL | SS | HH | 00 |;
+	mov rdi, 16						; pido el espacio de memoria que 
+									; voy a necesitar para la funcion rgbTOhsl
+	call malloc				
+						
+	mov rbx, rax				
+	movdqu [rsp], xmm7				; "push" xmm7
+	sub rsp, 16
+

+ 12 - 0
informe/include/hsl1_p1.asm~

@@ -0,0 +1,12 @@
+	pxor xmm7, xmm7					; xmm7 = | 00 | 00 | 00 | 00 |;
+	insertps xmm7, xmm0, 0b00010000	; xmm7 = | 00 | 00 | HH | 00 |;
+	insertps xmm7, xmm1, 0b00100000	; xmm7 = | 00 | SS | HH | 00 |;
+	insertps xmm7, xmm2, 0b00110000	; xmm7 = | LL | SS | HH | 00 |;
+	mov rdi, 16						; pido el espacio de memoria que 
+									; voy a necesitar para la funcion rgbTOhsl
+	call malloc						; no puedo usar el stack porque
+									; la variable no puede ser local (de esa forma tira 
+	mov rbx, rax					; segfault al llamar a rgbTOhsl)
+	movdqu [rsp], xmm7				; "push" xmm7
+	sub rsp, 16
+

+ 6 - 0
informe/include/hsl1_p2.asm

@@ -0,0 +1,6 @@
+	mov rdi, r14
+	mov rsi, rbx				
+	call rgbTOhsl		; [rbx] = A ; [rbx + 4] = h ; [rbx + 8] = s ;  [rbx + 12] = l  
+	add rsp, 16
+	movdqu xmm7, [rsp]	; "pop" xmm7 
+	movdqu xmm8, [rbx]	; xmm8 = | l | s | h | A |;		

+ 6 - 0
informe/include/hsl1_p2.asm~

@@ -0,0 +1,6 @@
+	mov rdi, r14
+	mov rsi, rbx				
+	call rgbTOhsl		; [rbx] = A ; [rbx + 4] = h ; [rbx + 8] = s ;  [rbx + 12] = l  
+	add rsp, 16
+	movdqu xmm7, [rsp]	; "pop" xmm7 
+	movdqu xmm8, [rbx]	; xmm8 = | l | s | h | A |;		

+ 8 - 0
informe/include/hsl1_p3.asm

@@ -0,0 +1,8 @@
+	pxor xmm4, xmm4				; xmm4 = |  00  |  00  |  00  |  00  |
+	subps xmm4, xmm8			; xmm4 = | -(LL+l) | -(SS+s) | -(HH+h) | -(00+A)|
+	pand xmm4, [setMask]		; xmm4 = | -(LL+l) | -(SS+s) | 00 | 00 |
+    addps xmm4, [addGE]			; xmm4 = | 1 - (LL+l) | 1 - (SS+s)  | -360 | 00 |
+    CMPPS xmm9, [cmpGE], 5		; comparo NLT (aka GE) la suma con la mascara cmpGE
+    pand xmm4, xmm9				; me quedo con los valores de xmm4 que tengo que usar
+                                ; segun el resultado del cmp
+    addps xmm8, xmm4			; sumo lo necesario a la suma inicial

+ 4 - 0
informe/include/hsl1_p3.asm~

@@ -0,0 +1,4 @@
+	pxor xmm4, xmm4				; xmm4 = |  00  |  00  |  00  |  00  |
+	subps xmm4, xmm8			; xmm4 = | -(LL+l) | -(SS+s) | -(HH+h) | -(00+A)|
+	pand xmm4, [setMask]			; xmm4 = | -(LL+l) | -(SS+s) | 00 | 00 |
+	addps xmm4, [addGE]			; xmm4 = | 1 - (LL+l) | 1 - (SS+s)  | -360 | 00 |

+ 8 - 0
informe/include/hsl1_p4.asm

@@ -0,0 +1,8 @@
+	pxor xmm4, xmm4  			; xmm4 = |  00  |  00  |  00  |  00  |
+	subps xmm4, xmm8 			; xmm4 = | -(LL+l) | -(SS+s) | -(HH+h) | -(00+A)|
+	pand xmm4, [setMask] 		; xmm4 = | -(LL+l) | -(SS+s) | 00 | 00 |
+	addps xmm4, [addLT]			; xmm4 = | - (LL+l) | - (SS+s)  | 360 | 00 |
+	CMPPS xmm9, xmm11, 1		; comparo LT la suma con la mascara cmpLT                             
+	pand xmm4, xmm9  			; me quedo con los valores de xmm4 que tengo que usar 
+                                ; segun el resultado del cmp
+	addps xmm8, xmm4 			; sumo lo necesario a la suma inicial

+ 0 - 0
informe/include/hsl1_p4.asm~


+ 6 - 0
informe/include/hsl1_p5.asm

@@ -0,0 +1,6 @@
+	movdqu [rbx], xmm8
+	mov rdi, rbx
+	mov rsi, r14
+	call hslTOrgb
+	add r14, 4
+	dec r15

+ 5 - 0
informe/include/hsl2_p1.asm

@@ -0,0 +1,5 @@
+	mov bl, byte [rdx]			; rbx = A
+	mov r9b, byte [rdx+3]		; r9 = R
+	mov r10b, byte [rdx+2]		; r10 = G
+	mov r11b, byte [rdx+1]		; r11 = B
+

+ 5 - 0
informe/include/hsl2_p1.asm~

@@ -0,0 +1,5 @@
+	mov bl, byte [rdx]		; rbx = A
+	mov r9b, byte [rdx+3]		; r9 = R
+	mov r10b, byte [rdx+2]		; r10 = G
+	mov r11b, byte [rdx+1]		; r11 = B
+

+ 10 - 0
informe/include/hsl2_p2.asm

@@ -0,0 +1,10 @@
+		mulss xmm0, xmm11		; xmm0 = | 00 | 00 | 00 | 2*LL |
+		subss xmm0, xmm10		; xmm0 = | 00 | 00 | 00 | 2*LL-1 |
+		movd xmm1, [cero]
+		movdqu xmm2, xmm0
+		CMPSS xmm2, xmm1, 1
+		movdqu xmm3, xmm0
+		pand xmm3, xmm2
+		subss xmm0, xmm3
+		subss xmm0, xmm3		; xmm0 = | 00 | 00 | 00 | fabs(2*LL-1) |
+

+ 0 - 0
informe/include/hsl2_p2.asm~


+ 7 - 0
informe/include/hsl2_p3.asm

@@ -0,0 +1,7 @@
+		.modulo:
+			cvttss2si r8d, xmm3		
+			cmp r8d, 2
+			jl .finModulo
+			subss xmm3, xmm11
+			jmp .modulo		; al terminar el ciclo tengo en xmm3 como escalar HH/60 % 2
+

+ 7 - 0
informe/include/hsl2_p3.asm~

@@ -0,0 +1,7 @@
+		.modulo:
+			cvttss2si r8d, xmm3		
+			cmp r8d, 2
+			jl .finModulo
+			subss xmm3, xmm11
+			jmp .modulo			; al terminar el ciclo tengo en xmm3 como escalar HH/60 % 2
+

+ 5 - 0
informe/include/hsl2_p4.asm

@@ -0,0 +1,5 @@
+		mov [rdx+OFFSET_A], bl
+		mov [rdx+OFFSET_B], r11b	
+		mov [rdx+OFFSET_G], r10b	
+		mov [rdx+OFFSET_R], r9b
+

+ 5 - 0
informe/include/merge1_1.asm

@@ -0,0 +1,5 @@
+.calc_value:						; xmm0 = |0x0|0x0|0x0|VALUE|
+	pshufd xmm15, xmm0, MASK_REPEAT	; xmm15 = |VALUE|VALUE|VALUE|VALUE|
+	movups xmm14, [UNO]				; xmm14 = |1.0|1.0|1.0|1.0|
+	subps xmm14, xmm15				; xmm14 = |1-VALUE|1-VALUE|1-VALUE|1-VALUE|	
+

+ 10 - 0
informe/include/merge1_2.asm

@@ -0,0 +1,10 @@
+.read_pixels_img1:
+	movdqu xmm0, [rdx]				; IMAGEN1 xmm1 = |p0|p1|p2|p3| = |ARGB|ARGB|ARGB|ARGB|
+	movdqa xmm12, xmm0				; Copia para procesar la otra mitad 
+	punpcklbw xmm0, xmm13			; xmm0 = |p0|p1| - Desempaqueto la parte baja
+	movdqa xmm1, xmm0				; xmm1 = xmm0
+	punpcklwd xmm0, xmm13			; xmm0 = |p1|
+	movdqa xmm3, xmm0				; xmm3 = xmm0
+	punpckhwd xmm1, xmm13			; xmm1 = |p0|
+	movdqa xmm4, xmm1				; xmm4 = xmm1
+

+ 7 - 0
informe/include/merge1_3.asm

@@ -0,0 +1,7 @@
+	cvttps2dq xmm6, xmm6			;  No convierto los de la imagen2 por que ya no me sirven
+.pack_data:							; Empaqueto los 4 pixeles de nuevo
+	packusdw xmm5, xmm6				; xmm5 = |p2|p3|
+	packusdw xmm3, xmm4				; xmm3 = |p0|p1|
+	packuswb xmm3, xmm5				; xmm3 = |p0|p1|p2|p3|
+.write_pixels:
+	movdqu [rdx], xmm3

+ 20 - 0
informe/include/merge2_1.asm

@@ -0,0 +1,20 @@
+.calc_value:
+	; Proceso 2 pixeles al mismo tiempo, por que ya no estoy limitado a solo 4 floats por registro.
+	; MUL_S (Float) y MUL(Word) son las mismas elegidas para realizar la multiplicacion y luego el shifteo.
+	; MUL_S sirve para multiplicar el valor de merge antes de convertirlo a entero, asi no se pierde presicion.
+	; MUL sirve para multiplicar cada componente de los dos pixeles que se procesan
+
+	pxor xmm15, xmm15
+	movups xmm14, [shiftf]			; xmm14 = |MUL_S|MUL_S|MUL_S|MUL_S|
+	mulps xmm0, xmm14				; |0|0|0|VALUE*MUL_S|
+	cvttps2dq xmm0, xmm0			; Lo paso a entero
+	
+	pshuflw xmm15, xmm0, MASK_REPEAT ; xmm15 = |00|00|00|00|VALUE*MUL_S|VALUE*MUL_S|VALUE*MUL_S|VALUE*MUL_S|
+	movdqa xmm13, xmm15				; xmm13 = xmm15
+	pslldq xmm15, MASK_MV_W_L2H		; xmm15 = |VALUE*MUL_S|VALUE*MUL_S|VALUE*MUL_S|VALUE*MUL_S|00|00|00|00|
+	paddw xmm15, xmm13				; xmm15 = |VAL*S|VAL*S|VAL*S|VAL*S|VAL*S|VAL*S|VAL*S|VAL*S|
+	
+	movdqu xmm14, [shift]			; xmm14 = |MUL|MUL|MUL|MUL|MUL|MUL|MUL|MUL|
+	psubw xmm14, xmm15				; xmm14 = |MUL-(VALUE*MUL_S)|......
+	
+	; Ahora cuando calcule el value tengo que "dividir" por MUL, realizando un shift

+ 9 - 0
informe/include/merge2_2.asm

@@ -0,0 +1,9 @@
+.calc_merge:
+	pmullw xmm0, xmm15				; Multiplico los pixeles por xmm15 y me quedo con la parte baja
+	pmullw xmm1, xmm15
+	pmullw xmm2, xmm14				; pixel * Value-1 (y cosas raras)
+	pmullw xmm3, xmm14
+	paddw xmm0, xmm2				; Sumo los totales
+	paddw xmm1, xmm3
+	psrlw xmm0, MUL_DIV				; Shifteo (divido) el numero
+	psrlw xmm1, MUL_DIV

+ 189 - 0
informe/informeTP2.tex

@@ -0,0 +1,189 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% Template para codigo y esas cosas, lo modifique para agregar lo que necesitamos
+% Lo afané de:
+% http://www.latextemplates.com
+%
+% Original author:
+% Ted Pavlic (http://www.tedpavlic.com)
+%
+% Me afané la caratula de Algo2 que use el año pasado así nos ahorramos cosas
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%----------------------------------------------------------------------------------------
+%	CONFIG DEL DOCUMENTO Y PAQUETES
+%----------------------------------------------------------------------------------------
+
+\documentclass[a4paper,10pt]{article}
+\usepackage[paper=a4paper, hmargin=1.5cm, bottom=1.5cm, top=3.5cm]{geometry} % Especifico los margenes a manos
+%\usepackage[latin1]{inputenc}	% Codificacion ISO-8859-1
+\usepackage[spanish]{babel}
+% Colores en los links del índice
+\usepackage[colorlinks=true, linkcolor=blue]{hyperref}
+\usepackage{courier}
+\usepackage{fancyhdr} 		% Custom headers
+\usepackage{lastpage} 		% Para obtener la última pagina para el footer
+\usepackage{extramarks} 	% Headers y footers
+\usepackage[usenames,dvipsnames]{color} % Colores custom
+\usepackage{graphicx} 		% Para insertar imagenes
+\usepackage{listings} 		% Para insertar codigo
+\usepackage{lipsum} 		% 'Lorem ipsum'
+\usepackage[section]{placeins}		% Para impedir que las imagenes y eso se vayan a otras secciones que no corresponden
+\usepackage{mathtools}
+\usepackage{caratula}
+%\usepackage[T1]{fontenc}
+%\usepackage{algorithmicx, algpseudocode, algorithm}
+
+\hypersetup{%
+ % Para que el PDF se abra a pagina completa.
+ pdfstartview= {FitH \hypercalcbp{\paperheight-\topmargin-1in-\headheight}},
+ pdfauthor={Grupo 25 - Carmen Sandiego, Materia Organizaci\'on del Computador II - DC - UBA},
+ pdfkeywords={Informe, TP2, Trabajo, Pr\'actico, II},
+ pdftitle={Informe Trabajo Pr\'actico II},
+ pdfsubject={Informe Trabajo Pr\'actico II}
+}
+
+% Configuración de parrafos
+\setlength{\parskip}{1em}
+
+
+% Margenes
+%\topmargin=-0.45in
+%\evensidemargin=0in
+%\oddsidemargin=0in
+%\textwidth=6.5in
+%\textheight=9.0in
+%\headsep=0.25in
+
+% Line spacing
+\linespread{1.1} 
+
+% Set up the header and footer
+\pagestyle{fancy}
+\lhead{25 - Carmen Sandiego / PC} % Header izquierdo
+\chead{Informe Trabajo Pr\'actico II} % Header centro
+\rhead{\firstxmark Organizaci\'on del Computador II} % Header derecha
+\lfoot{\lastxmark}
+\cfoot{P\'agina \thepage\ de \protect\pageref{LastPage}} % Footer centro
+\rfoot{}
+\renewcommand\headrulewidth{0.4pt} % Linea de header
+\renewcommand\footrulewidth{0.4pt} % Linea de footer
+
+%\setlength\parindent{0pt} % Remueve identacion de los parrafos
+
+%----------------------------------------------------------------------------------------
+%	CONFIGURACION DEL CÓDIGO INCLUIDO
+%----------------------------------------------------------------------------------------
+\renewcommand{\lstlistingname}{C\'odigo}
+\definecolor{DarkGreen}{rgb}{0.0,0.4,0.0} % Comentarios
+% Lenguajes soportados: ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf
+\lstloadlanguages{[x86masm]Assembler} 
+% FIXME: Me robe lo de abajo de otro ejemplo, estaba basado en Perl, ver si hay que cambiar algo
+\lstset{language=[x86masm]Assembler,
+        frame=single,
+        breaklines=true, 					% Saltar de linea si supero el maximo
+        basicstyle=\small\ttfamily,
+        keywordstyle=[1]\color{Blue}\bf,	% Color de las funciones de assembler
+        keywordstyle=[2]\color{Purple},		% Color de parámetros especiales (registros, etc)
+        identifierstyle=,                               
+        commentstyle=\usefont{T1}{pcr}{m}{sl}\color{DarkGreen}\small,
+        stringstyle=\color{Purple}, 	% Strings purpuras
+        showstringspaces=false,
+        tabsize=4,
+        %
+        % Instrucciones no incluidas en el paquete Assembler
+        morekeywords={global, define, section, .rodata, .text, jl, movd, movdqu, mulss, subss, addss, cmpss, pand, cvtss2si, cvttss2si, cvtsi2ss},
+        %
+        % Registros y esas otras cosas especiales que no son instrucciones
+        morekeywords=[2]{rax,rdx,rcx,rbx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15,xmm0,xmm1,xmm2,xmm3,xmm4,xmm5,xmm6,xmm7
+        		xmm8,xmm9,xmm10,xmm11,xmm12,xmm13,xmm14,xmm15,r8b, r9b, r10b, r11b, r8d, r9d, r10d, r11d},
+       	%
+        morecomment=[l][\color{Blue}]{...}, % Line continuation (...) like blue comment
+        numbers=left, % Numeros de linea en la izquiera
+        firstnumber=1, % Se arranca en la linea 1
+        numberstyle=\tiny\color{Blue}, % Numeros de linea en azul y chicos
+        stepnumber=5 % Los numerros de linea se muestran cada 5
+}
+
+% Comando para incluir un archivo de assembler, no hay que poner la extensión
+\newcommand{\asmscript}[2]{
+\\
+\begin{minipage}{\linewidth}
+\lstinputlisting[caption=#2,label=#1]{include/#1.asm}
+\end{minipage}
+}
+
+\newcommand{\recuadro}[1]{
+\noindent\framebox[\columnwidth][c]{\begin{minipage}{0.98\columnwidth}#1\end{minipage}} % Recuadro simple, pongo lo que pasan por parametro
+}
+%----------------------------------------------------------------------------------------
+
+
+%----------------------------------------------------------------------------------------
+%	ARRANCA EL DOCUMENTO
+%----------------------------------------------------------------------------------------
+\begin{document}
+
+\materia{Organizaci\'on del Computador II}
+\submateria{Primer Cuatrimestre de 2015}
+\titulo{Trabajo Pr\'actico II}
+\subtitulo{Informe}
+\grupo{25 - Carmen Sandiego / PC}
+
+% Puse por orden alfabetico (de nombre), justo queda DFG
+\integrante{David Ventura}{673/13}{davidventura27@gmail.com}
+\integrante{Fabian Alvarez}{674/13}{falvarez.0104@gmail.com}
+\integrante{Gabriel Thibeault}{114/13}{gabriel.eric.thibeault@gmail.com}
+
+\maketitle
+
+%----------------------------------------------------------------------------------------
+%	TABLE OF CONTENTS
+% Hay que compilar dos veces el pdf para que pueda armarla!!!
+%----------------------------------------------------------------------------------------
+
+\tableofcontents
+\newpage
+
+
+% Para que no tire conflictos si estamos modificando mucho, separe en distintos archivos el Blur, Merge y HSL
+% Si hace falta se pueden separar más. Para compilar se tiene que hacer desde el "informeTP2.tex"
+
+% Para referencias y eso: http://en.wikibooks.org/wiki/LaTeX/Labels_and_Cross-referencing
+% ------
+% Floatbarrier sirve para que las cosas "flotantes" (imagenes) no se cambien de sección: 
+%      http://tex.stackexchange.com/questions/279/how-do-i-ensure-that-figures-appear-in-the-section-theyre-associated-with
+%
+% --------------------------------------------------------------------------------------------------------------------
+% AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
+% http://www.brendangregg.com/perf.html
+
+
+% Introducción
+\input{subIntroduccion}
+\newpage
+
+% Blur
+\section{Desarrollo}
+\input{subBlur}
+\newpage
+
+% Merge
+\input{subMerge}
+\newpage
+
+% HSL
+\input{subHSL}
+\newpage
+
+% Conclusion
+\input{subResultados}
+\newpage
+
+
+% Conclusion
+\input{subConclusion}
+\newpage
+
+
+\end{document}

+ 115 - 0
informe/packages/caratula.sty

@@ -0,0 +1,115 @@
+% **************************************************************************
+%
+%  Package 'caratula', version 0.2 (para componer caratulas de TPs del DC).
+%
+%  En caso de dudas, problemas o sugerencias sobre este package escribir a
+%  Nico Rosner (nrosner arroba dc.uba.ar).
+%
+% **************************************************************************
+
+
+
+% ----- Informacion sobre el package para el sistema -----------------------
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{caratula}[2003/4/13 v0.1 Para componer caratulas de TPs del DC]
+
+
+% ----- Imprimir un mensajito al procesar un .tex que use este package -----
+
+\typeout{Cargando package 'caratula' v0.2 (21/4/2003)}
+
+
+% ----- Algunas variables --------------------------------------------------
+
+\let\Materia\relax
+\let\Submateria\relax
+\let\Titulo\relax
+\let\Subtitulo\relax
+\let\Grupo\relax
+
+
+% ----- Comandos para que el usuario defina las variables ------------------
+
+\def\materia#1{\def\Materia{#1}}
+\def\submateria#1{\def\Submateria{#1}}
+\def\titulo#1{\def\Titulo{#1}}
+\def\subtitulo#1{\def\Subtitulo{#1}}
+\def\grupo#1{\def\Grupo{#1}}
+
+
+% ----- Token list para los integrantes ------------------------------------
+
+\newtoks\intlist\intlist={}
+
+
+% ----- Comando para que el usuario agregue integrantes
+
+\def\integrante#1#2#3{\intlist=\expandafter{\the\intlist
+    \rule{0pt}{1.2em}#1&#2&\tt #3\\[0.2em]}}
+
+
+% ----- Macro para generar la tabla de integrantes -------------------------
+
+\def\tablaints{%
+    \begin{tabular}{|l@{\hspace{4ex}}c@{\hspace{4ex}}l|}
+        \hline
+        \rule{0pt}{1.2em}Integrante & LU & Correo electr\'onico\\[0.2em]
+        \hline
+        \the\intlist
+        \hline
+    \end{tabular}}
+
+% ----- Macro para generar la parte reservada para la cátedra -------------------------
+
+\def\tablacatedra{%
+    \\
+    \textbf{Reservado para la c\'atedra}\par\bigskip
+    \begin{tabular}{|c|c|c|}
+        \hline
+        \rule{0pt}{1.2em}Instancia & Docente & Nota\\[0.2em]
+        \hline
+        \rule{0pt}{1.2em}Primera entrega & \phantom{mmmmmmmmmmmmmmmmmm} & \phantom{mmmmmm} \\
+        \hline
+        \rule{0pt}{1.2em}Segunda entrega & & \\
+        \hline
+    \end{tabular}}
+
+% ----- Codigo para manejo de errores --------------------------------------
+
+\def\se{\let\ifsetuperror\iftrue}
+\def\ifsetuperror{%
+    \let\ifsetuperror\iffalse
+    \ifx\Materia\relax\se\errhelp={Te olvidaste de proveer una \materia{}.}\fi
+    \ifx\Titulo\relax\se\errhelp={Te olvidaste de proveer un \titulo{}.}\fi
+    \edef\mlist{\the\intlist}\ifx\mlist\empty\se%
+    \errhelp={Tenes que proveer al menos un \integrante{nombre}{lu}{email}.}\fi
+    \expandafter\ifsetuperror}
+
+
+% ----- Reemplazamos el comando \maketitle de LaTeX con el nuestro ---------
+
+\def\maketitle{%
+    \ifsetuperror\errmessage{Faltan datos de la caratula! Ingresar 'h' para mas informacion.}\fi
+    \thispagestyle{empty}
+    \begin{center}
+    \vspace*{\stretch{2}}
+    {\LARGE\textbf{\Materia}}\\[1em]
+    \ifx\Submateria\relax\else{\Large \Submateria}\\[0.5em]\fi
+    \par\vspace{\stretch{1}}
+    {\large Departamento de Computaci\'on}\\[0.5em]
+    {\large Facultad de Ciencias Exactas y Naturales}\\[0.5em]
+    {\large Universidad de Buenos Aires}
+    \par\vspace{\stretch{3}}
+    {\Large \textbf{\Titulo}}\\[0.8em]
+    {\Large \Subtitulo}
+    \par\vspace{\stretch{3}}
+    \ifx\Grupo\relax\else\textbf{\Grupo}\par\bigskip\fi
+    \tablaints
+    \vspace*{\stretch{3}}
+    \medskip
+    \tablacatedra
+    \end{center}
+    \vspace*{\stretch{3}}
+    \newpage
+    }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 109 - 0
informe/subBlur.tex


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 8 - 0
informe/subConclusion.tex


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 25 - 0
informe/subHSL.tex


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 25 - 0
informe/subIntroduccion.tex


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 62 - 0
informe/subMerge.tex


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 87 - 0
informe/subResultados.tex