[FFmpeg-devel] JPEG2000 decoder

rukhsana afroz rukhsana.afroz at gmail.com
Fri May 20 00:38:30 CEST 2011


On Thu, May 19, 2011 at 3:32 PM, rukhsana afroz <rukhsana.afroz at gmail.com>wrote:

> Hi Michael,
>
>
> On Sun, May 15, 2011 at 5:00 PM, Michael Niedermayer <michaelni at gmx.at>wrote:
>
>>
>> We will have to implement multiple codeword segments.
>>
>> Also sofar, good work!
>>
>>
> Sorry for the late reply. If I implement codeblock segment, its going to
> affect from packet decoding process to the subsequent deoding process till
> the last. Therefore, I have to be properly planned in order to accomplish
> these changes. Here, I have put patch for incorporating multiple codeblock
> segment. I had to create two more structures and modify J2KCblk sturucture
> as well. This patch is just for the modification/creation on the structures.
> I am also writing some miscellaneous function and I will post those in my
> subsequent emails.
>

Sorry, previous patch did not indicate the file name. Here, I have pasted it
again:

--- j2k.h    2011-05-02 06:02:46.949613000 -0700
+++ /ubc/ece/home/vl/grads/rukhsana/gsoc11/jpeg2000/j2k.h    2011-05-19
15:20:41.746429000 -0700

@@ -137,16 +137,62 @@
     int64_t disto;
 } J2kPass;

+
+
 typedef struct {
+    /* The next segment in the list. */
+    struct J2KCblkSeg *next;
+
+    /* The previous segment in the list. */
+    struct J2KCblkSeg *prev;
+
+    /* The starting pass number for this segment. */
+    uint8_t passno;
+
+    /* The number of passes in this segment. */
+    uint8_t numpasses;
+
+    /* The maximum number of passes in this segment. */
+    uint8_t maxpasses;
+
+    /* Data for this segment. */
+    uint8_t data[8192];
+
+    /* The number of bytes destined for this segment from the packet
+      currently being decoded. */
+    uint8_t cnt;
+
+    /* A flag indicating if this segment has been terminated. */
+    uint8_t complete;
+
+    /* The layer number to which this segment belongs. */
+    /* If the segment spans multiple layers, then the largest layer number
+      spanned by the segment is used. */
+    uint8_t lyrno;
+} J2KCblkSeg;
+
+typedef struct {
+    /* The first entry in the list. */
+    J2KCblkSeg *head;
+
+    /* The last entry in the list. */
+    J2KCblkSeg *tail;
+} J2KCblkSegList;
+
+typedef struct {
+    /* A list of segments that still need to be decoded. */
+    J2KCblkSegList segs;
+
+    /* The first incomplete/partial segment. */
+    J2KCblkSeg *curseg;
+
+    /* The first pass number containing data for this code block. */
+    uint8_t firstpassno;
     uint8_t npasses;
-    uint8_t ninclpasses; ///< number coding of passes included in
codestream
     uint8_t nonzerobits;
     uint16_t length;
     uint16_t lengthinc;
     uint8_t lblock;
-    uint8_t zero;
-    uint8_t data[8192];
-    J2kPass passes[100];
 } J2kCblk; ///< code block

 typedef struct {


Thanks


-- 
Rukhsana Ruby
Phd Student
Department of Electrical & Computer Engineering
The University of British Columbia
============================


More information about the ffmpeg-devel mailing list