shithub: libvpx

Download patch

ref: 7edd5170b5e94c7f58e7e150cbe5446fc993a5de
parent: a4ccfadcc293694ababf92bb9d5c1b654c771bb0
parent: e33855cc47cba96ef75a479812342aee6268b5ce
author: Deb Mukherjee <debargha@google.com>
date: Wed Dec 11 10:50:40 EST 2013

Merge "Changes interfaces to vp9_get_compressed_data fn"

--- a/vp9/common/vp9_onyx.h
+++ b/vp9/common/vp9_onyx.h
@@ -193,7 +193,7 @@
                             int64_t end_time_stamp);
 
   int vp9_get_compressed_data(VP9_PTR comp, unsigned int *frame_flags,
-                              unsigned long *size, unsigned char *dest,
+                              size_t *size, uint8_t *dest,
                               int64_t *time_stamp, int64_t *time_end,
                               int flush);
 
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -1304,7 +1304,7 @@
   return header_bc.pos;
 }
 
-void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
+void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size) {
   uint8_t *data = dest;
   size_t first_part_size;
   struct vp9_write_bit_buffer wb = {data, 0};
--- a/vp9/encoder/vp9_onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -2662,7 +2662,7 @@
 #endif
 
 static void encode_with_recode_loop(VP9_COMP *cpi,
-                                    unsigned long *size,
+                                    size_t *size,
                                     uint8_t *dest,
                                     int *q,
                                     int bottom_index,
@@ -2859,7 +2859,7 @@
 }
 
 static void encode_frame_to_data_rate(VP9_COMP *cpi,
-                                      unsigned long *size,
+                                      size_t *size,
                                       uint8_t *dest,
                                       unsigned int *frame_flags) {
   VP9_COMMON *const cm = &cpi->common;
@@ -3239,12 +3239,12 @@
   cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mode_info_stride + 1;
 }
 
-static void Pass0Encode(VP9_COMP *cpi, unsigned long *size, unsigned char *dest,
+static void Pass0Encode(VP9_COMP *cpi, size_t *size, uint8_t *dest,
                         unsigned int *frame_flags) {
   encode_frame_to_data_rate(cpi, size, dest, frame_flags);
 }
 
-static void Pass1Encode(VP9_COMP *cpi, unsigned long *size, unsigned char *dest,
+static void Pass1Encode(VP9_COMP *cpi, size_t *size, uint8_t *dest,
                         unsigned int *frame_flags) {
   (void) size;
   (void) dest;
@@ -3254,8 +3254,8 @@
   vp9_first_pass(cpi);
 }
 
-static void Pass2Encode(VP9_COMP *cpi, unsigned long *size,
-                        unsigned char *dest, unsigned int *frame_flags) {
+static void Pass2Encode(VP9_COMP *cpi, size_t *size,
+                        uint8_t *dest, unsigned int *frame_flags) {
   cpi->enable_encode_breakout = 1;
 
   if (!cpi->refresh_alt_ref_frame)
@@ -3320,7 +3320,7 @@
 #endif
 
 int vp9_get_compressed_data(VP9_PTR ptr, unsigned int *frame_flags,
-                            unsigned long *size, unsigned char *dest,
+                            size_t *size, uint8_t *dest,
                             int64_t *time_stamp, int64_t *time_end, int flush) {
   VP9_COMP *cpi = (VP9_COMP *) ptr;
   VP9_COMMON *cm = &cpi->common;
--- a/vp9/encoder/vp9_onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -683,8 +683,7 @@
 
 void vp9_encode_frame(VP9_COMP *cpi);
 
-void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
-                        unsigned long *size);
+void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, size_t *size);
 
 void vp9_activity_masking(VP9_COMP *cpi, MACROBLOCK *x);
 
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -77,14 +77,14 @@
   vpx_codec_enc_cfg_t     cfg;
   struct vp9_extracfg     vp8_cfg;
   VP9_CONFIG              oxcf;
-  VP9_PTR             cpi;
+  VP9_PTR                 cpi;
   unsigned char          *cx_data;
-  unsigned int            cx_data_sz;
+  size_t                  cx_data_sz;
   unsigned char          *pending_cx_data;
-  unsigned int            pending_cx_data_sz;
+  size_t                  pending_cx_data_sz;
   int                     pending_frame_count;
-  uint32_t                pending_frame_sizes[8];
-  uint32_t                pending_frame_magnitude;
+  size_t                  pending_frame_sizes[8];
+  size_t                  pending_frame_magnitude;
   vpx_image_t             preview_img;
   vp8_postproc_cfg_t      preview_ppcfg;
   vpx_codec_pkt_list_decl(64) pkt_list;
@@ -708,7 +708,7 @@
     unsigned int lib_flags;
     YV12_BUFFER_CONFIG sd;
     int64_t dst_time_stamp, dst_end_time_stamp;
-    unsigned long size, cx_data_sz;
+    size_t size, cx_data_sz;
     unsigned char *cx_data;
 
     /* Set up internal flags */