Cypress DCT-1D Betriebsanweisung Seite 67

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 82
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 66
6.5. SOFTWARE IMPLEMENTATION
67
6.5.2 Integration into jpegfiles
When you find that the hardware is working and you have written some test programs
to verify that the the processor can execute your instruction. You are ready for the
next step, to get the instruction to work for you in jpegfiles. You need to add code
for three phases of operation, as described below. The only file you need to modify is
jchuff.c, look for the
#ifdef HW_INST
blocks.
Phase 1: VLX Initialization
This, the first, phase is executed before processing of the bit stream starts . In this phase
you must ensure that your hardware is properly initialized. It is important to set the
address where your hardware shall star t writing the bit stream to memor y.
Phase 2: VLX Operation
This, the second, phase is executed as long as there is new data to encode. This phase
is rather simple, just use your hardware to write the incoming bit stream to memory.
Phase 3: VLX Finalization
This, the thir d and final, phase is executed when there are no more data to encode. In
this phase you must ensure that data not yet written to memory, still residing in your
hardware, is correctly put in the memory. Also you must ensure that you make a clean
hand off to jpegfiles so it can take care of some finalization operations, like writing
the JPEG end marker. Take note of the
next_buffer
variable and think about what you
have to do with it.
6.5.3 JPEG Markers
There are a number of bit strings called markers in the JFIF binary file. A marker is
always byte aligned and s tarts with the byte 0xF F , the next byte specifies what marker
it is. For this reason if 0xF F is encountered in the scan data, 0xF F must be written
as 0xF F 00. Some markers are stand alone markers, meaning that the marker has no
additional information associated with it. Otherwise the marker has a two byte code
immediately following the marker specifying the length in byte of extra data associated
with the marker. A marker followed by data is referred to as a marker segment. Table
6.3 list a few important markers, see [17] for more information about markers and [18]
for some specific restriction of markers in J FIF.
Laboration task 13
Implement the new instruction in hardware and show that you can use the new instruc-
tion using inline assembler in C-code.
Laboration task 14
Modify the jpegfiles code to use your new instruction.
Seitenansicht 66
1 2 ... 62 63 64 65 66 67 68 69 70 71 72 ... 81 82

Kommentare zu diesen Handbüchern

Keine Kommentare