[FFmpeg-soc] [soc]: r5035 - in jpeg2000: j2k.h j2kdec.c

jai_menon subversion at mplayerhq.hu
Wed Aug 12 16:40:00 CEST 2009


Author: jai_menon
Date: Wed Aug 12 16:40:00 2009
New Revision: 5035

Log:
Define codeblock coding styles and parse the same from the codestream.

Modified:
   jpeg2000/j2k.h
   jpeg2000/j2kdec.c

Modified: jpeg2000/j2k.h
==============================================================================
--- jpeg2000/j2k.h	Tue Aug 11 22:03:51 2009	(r5034)
+++ jpeg2000/j2k.h	Wed Aug 12 16:40:00 2009	(r5035)
@@ -87,6 +87,14 @@ enum J2kQuantsty{ ///< quantization styl
 
 #define J2K_T1_SGN    0x8000
 
+// Codeblock coding styles
+#define J2K_CBLK_BYPASS    0x01 // Selective arithmetic coding bypass
+#define JPC_CBLK_RESET     0x02 // Reset context probabilities
+#define JPC_CBLK_TERMALL   0x04 // Terminate after each coding pass
+#define JPC_CBLK_VSC       0x08 // Vertical stripe causal context formation
+#define JPC_CBLK_PREDTERM  0x10 // Predictable termination
+#define JPC_CBLK_SEGSYM    0x20 // Segmentation symbols present
+
 typedef struct {
     int data[J2K_MAX_CBLKW][J2K_MAX_CBLKH];
     int flags[J2K_MAX_CBLKW+2][J2K_MAX_CBLKH+2];
@@ -109,6 +117,7 @@ typedef struct {
             log2_prec_height; ///< precinct size
     uint8_t nlayers;          ///< number of layers
     uint8_t mct;              ///< multiple component transformation
+    uint8_t cblk_style;       ///< codeblock coding style
 } J2kCodingStyle;
 
 typedef struct {

Modified: jpeg2000/j2kdec.c
==============================================================================
--- jpeg2000/j2kdec.c	Tue Aug 11 22:03:51 2009	(r5034)
+++ jpeg2000/j2kdec.c	Wed Aug 12 16:40:00 2009	(r5035)
@@ -283,7 +283,8 @@ static int get_cox(J2kDecoderContext *s,
      c->log2_cblk_width = bytestream_get_byte(&s->buf) + 2; // cblk width
     c->log2_cblk_height = bytestream_get_byte(&s->buf) + 2; // cblk height
 
-    if (bytestream_get_byte(&s->buf) != 0){ // cblk style
+    c->cblk_style = bytestream_get_byte(&s->buf);
+    if (c->cblk_style != 0){ // cblk style
         av_log(s->avctx, AV_LOG_ERROR, "no extra cblk styles supported\n");
         return -1;
     }


More information about the FFmpeg-soc mailing list