[FFmpeg-soc] [soc]: r3816 - in dirac/libavcodec: dirac.c dirac.h diracdec.c

conrad subversion at mplayerhq.hu
Tue Nov 11 09:38:16 CET 2008


Author: conrad
Date: Tue Nov 11 09:38:16 2008
New Revision: 3816

Log:
Rename luma_width/height to just width/height


Modified:
   dirac/libavcodec/dirac.c
   dirac/libavcodec/dirac.h
   dirac/libavcodec/diracdec.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Tue Nov 11 09:38:16 2008
@@ -142,7 +142,7 @@ void dirac_dump_source_parameters(AVCode
     dprintf(avctx, "-----------------------------------------------------\n");
 
     dprintf(avctx, "Luma size=%dx%d\n",
-            source->luma_width, source->luma_height);
+            source->width, source->height);
     dprintf(avctx, "Chroma size=%dx%d, format: %s\n",
             source->chroma_width, source->chroma_height,
             chroma_format_str[source->chroma_format]);
@@ -185,8 +185,8 @@ static int parse_source_parameters(AVCod
 
     /* Override the luma dimensions. */
     if (get_bits1(gb)) {
-        s->source.luma_width  = svq3_get_ue_golomb(gb);
-        s->source.luma_height = svq3_get_ue_golomb(gb);
+        s->source.width  = svq3_get_ue_golomb(gb);
+        s->source.height = svq3_get_ue_golomb(gb);
     }
 
     /* Override the chroma format. */
@@ -1091,11 +1091,11 @@ int dirac_motion_compensation(DiracConte
     int hbits, vbits;
 
     if (comp == 0) {
-        s->width  = s->source.luma_width;
-        s->height = s->source.luma_height;
+        s->width  = s->source.width;
+        s->height = s->source.height;
     } else {
-        s->width  = s->source.luma_width  >> s->chroma_hshift;
-        s->height = s->source.luma_height >> s->chroma_vshift;
+        s->width  = s->source.width  >> s->chroma_hshift;
+        s->height = s->source.height >> s->chroma_vshift;
     }
     s->xblen  = s->decoding.xblen[!!comp];
     s->yblen  = s->decoding.yblen[!!comp];

Modified: dirac/libavcodec/dirac.h
==============================================================================
--- dirac/libavcodec/dirac.h	(original)
+++ dirac/libavcodec/dirac.h	Tue Nov 11 09:38:16 2008
@@ -68,8 +68,8 @@ typedef struct {
 
 typedef struct {
     /* information about the frames */
-    unsigned int luma_width;           ///< the luma component width
-    unsigned int luma_height;          ///< the luma component height
+    unsigned int width;                ///< the luma component width
+    unsigned int height;               ///< the luma component height
     /** choma format: 0: 4:4:4, 1: 4:2:2, 2: 4:2:0 */
     unsigned int chroma_format;
 

Modified: dirac/libavcodec/diracdec.c
==============================================================================
--- dirac/libavcodec/diracdec.c	(original)
+++ dirac/libavcodec/diracdec.c	Tue Nov 11 09:38:16 2008
@@ -488,9 +488,9 @@ static int dirac_unpack_block_motion_dat
 
 #define DIVRNDUP(a, b) ((a + b - 1) / b)
 
-    s->sbwidth  = DIVRNDUP(s->source.luma_width,
+    s->sbwidth  = DIVRNDUP(s->source.width,
                            (s->decoding.xbsep[0] << 2));
-    s->sbheight = DIVRNDUP(s->source.luma_height,
+    s->sbheight = DIVRNDUP(s->source.height,
                            (s->decoding.ybsep[0] << 2));
     s->blwidth  = s->sbwidth  << 2;
     s->blheight = s->sbheight << 2;
@@ -668,13 +668,13 @@ static int dirac_decode_frame_internal(D
         int width, height;
 
         if (comp == 0) {
-            width            = s->source.luma_width;
-            height           = s->source.luma_height;
+            width            = s->source.width;
+            height           = s->source.height;
             s->padded_width  = s->padded_luma_width;
             s->padded_height = s->padded_luma_height;
         } else {
-            width            = s->source.luma_width  >> s->chroma_hshift;
-            height           = s->source.luma_height >> s->chroma_vshift;
+            width            = s->source.width  >> s->chroma_hshift;
+            height           = s->source.height >> s->chroma_vshift;
             s->padded_width  = s->padded_chroma_width;
             s->padded_height = s->padded_chroma_height;
         }
@@ -808,13 +808,13 @@ static int parse_frame(DiracContext *s)
          (((size + (1 << depth) - 1) >> depth) << depth)
 
     /* Round up to a multiple of 2^depth. */
-    s->padded_luma_width    = CALC_PADDING(s->source.luma_width,
+    s->padded_luma_width    = CALC_PADDING(s->source.width,
                                            s->decoding.wavelet_depth);
-    s->padded_luma_height   = CALC_PADDING(s->source.luma_height,
+    s->padded_luma_height   = CALC_PADDING(s->source.height,
                                            s->decoding.wavelet_depth);
-    s->padded_chroma_width  = CALC_PADDING((s->source.luma_width >> s->chroma_hshift),
+    s->padded_chroma_width  = CALC_PADDING((s->source.width >> s->chroma_hshift),
                                            s->decoding.wavelet_depth);
-    s->padded_chroma_height = CALC_PADDING((s->source.luma_height >> s->chroma_vshift),
+    s->padded_chroma_height = CALC_PADDING((s->source.height >> s->chroma_vshift),
                                            s->decoding.wavelet_depth);
 
     return 0;
@@ -884,12 +884,12 @@ int dirac_decode_frame(AVCodecContext *a
     if (parse_frame(s) < 0)
         return -1;
 
-    if (avcodec_check_dimensions(avctx, s->source.luma_width,
-                                 s->source.luma_height))
+    if (avcodec_check_dimensions(avctx, s->source.width,
+                                 s->source.height))
         return -1;
 
-    avcodec_set_dimensions(avctx, s->source.luma_width,
-                           s->source.luma_height);
+    avcodec_set_dimensions(avctx, s->source.width,
+                           s->source.height);
 
     if (s->picture.data[0] != NULL)
         avctx->release_buffer(avctx, &s->picture);



More information about the FFmpeg-soc mailing list