]> granicus.if.org Git - libvpx/commitdiff
yv12config: remove YUV_TYPE
authorJames Zern <jzern@google.com>
Fri, 12 Jul 2013 21:11:53 +0000 (14:11 -0700)
committerJames Zern <jzern@google.com>
Fri, 12 Jul 2013 22:25:48 +0000 (15:25 -0700)
this was never fleshed out in the context of VP8, for which it was
added. for VP9 it has no meaning.

Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff

14 files changed:
vp8/common/alloccommon.c
vp8/common/onyxc_int.h
vp8/decoder/decodframe.c
vp8/decoder/onyxd_if.c
vp8/encoder/bitstream.c
vp8/encoder/onyx_if.c
vp8/vp8_cx_iface.c
vp8/vp8_dx_iface.c
vp9/common/vp9_alloccommon.c
vp9/common/vp9_onyxc_int.h
vp9/decoder/vp9_onyxd_if.c
vp9/encoder/vp9_onyx_if.c
vp9/vp9_iface_common.h
vpx_scale/yv12config.h

index 8af9e904912c3105dba67090426ab99c617a5700..54afc13355a616bdaef8803526773c332dae0366 100644 (file)
@@ -173,7 +173,6 @@ void vp8_create_common(VP8_COMMON *oci)
     oci->use_bilinear_mc_filter = 0;
     oci->full_pixel = 0;
     oci->multi_token_partition = ONE_PARTITION;
-    oci->clr_type = REG_YUV;
     oci->clamp_type = RECON_CLAMP_REQUIRED;
 
     /* Initialize reference frame sign bias structure to defaults */
index 276dd72ead07721a2dc8652a6d7078f7986258e3..45e77cb01cc00db3a828e8b1e44a627c426988bb 100644 (file)
@@ -72,7 +72,6 @@ typedef struct VP8Common
     int horiz_scale;
     int vert_scale;
 
-    YUV_TYPE clr_type;
     CLAMP_TYPE  clamp_type;
 
     YV12_BUFFER_CONFIG *frame_to_show;
index 44c35effe669f1b1c1f8463fc653b0e776ded29f..51eeb02bf8063d8decbe620427e21c39dd75d090 100644 (file)
@@ -1095,7 +1095,7 @@ int vp8_decode_frame(VP8D_COMP *pbi)
         vpx_internal_error(&pc->error, VPX_CODEC_MEM_ERROR,
                            "Failed to allocate bool decoder 0");
     if (pc->frame_type == KEY_FRAME) {
-        pc->clr_type    = (YUV_TYPE)vp8_read_bit(bc);
+        (void)vp8_read_bit(bc);  // colorspace
         pc->clamp_type  = (CLAMP_TYPE)vp8_read_bit(bc);
     }
 
index 2db309658c5b94f3badd6f02fb887032c5769066..2d9e343bc9f034cba08b3bf88464bf3b31356796 100644 (file)
@@ -430,7 +430,6 @@ int vp8dx_get_raw_frame(VP8D_COMP *pbi, YV12_BUFFER_CONFIG *sd, int64_t *time_st
     *time_stamp = pbi->last_time_stamp;
     *time_end_stamp = 0;
 
-    sd->clrtype = pbi->common.clr_type;
 #if CONFIG_POSTPROC
     ret = vp8_post_proc_frame(&pbi->common, sd, flags);
 #else
index 4707ae59f352a9046560507f36282a01fdf86b17..5f0c1f7a6d00138782829bc1854bedf7d0629c0d 100644 (file)
@@ -1322,7 +1322,7 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest
         vp8_start_encode(bc, cx_data, cx_data_end);
 
         /* signal clr type */
-        vp8_write_bit(bc, pc->clr_type);
+        vp8_write_bit(bc, 0);
         vp8_write_bit(bc, pc->clamp_type);
 
     }
index 73f658375879fdacc084747d12d4856e31545925..11f16955c0edd6945b58f08fde922bbe11915d28 100644 (file)
@@ -4821,8 +4821,10 @@ int vp8_receive_raw_frame(VP8_COMP *cpi, unsigned int frame_flags, YV12_BUFFER_C
 {
 #if HAVE_NEON
     int64_t store_reg[8];
-#endif
+#if CONFIG_RUNTIME_CPU_DETECT
     VP8_COMMON            *cm = &cpi->common;
+#endif
+#endif
     struct vpx_usec_timer  timer;
     int                    res = 0;
 
@@ -4848,7 +4850,6 @@ int vp8_receive_raw_frame(VP8_COMP *cpi, unsigned int frame_flags, YV12_BUFFER_C
     if(vp8_lookahead_push(cpi->lookahead, sd, time_stamp, end_time,
                           frame_flags, cpi->active_map_enabled ? cpi->active_map : NULL))
         res = -1;
-    cm->clr_type = sd->clrtype;
     vpx_usec_timer_mark(&timer);
     cpi->time_receive_data += vpx_usec_timer_elapsed(&timer);
 
index 4531d5ad089ec5dc1d966628c63b9d140e5bb9a1..9a7b9c560dcb2be66e404a2734d3a255ab7ca6ee 100644 (file)
@@ -695,7 +695,6 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t   *img,
     yv12->uv_stride = img->stride[VPX_PLANE_U];
 
     yv12->border  = (img->stride[VPX_PLANE_Y] - img->w) / 2;
-    yv12->clrtype = (img->fmt == VPX_IMG_FMT_VPXI420 || img->fmt == VPX_IMG_FMT_VPXYV12);
     return res;
 }
 
@@ -1079,11 +1078,7 @@ static vpx_image_t *vp8e_get_preview(vpx_codec_alg_priv_t *ctx)
         ctx->preview_img.planes[VPX_PLANE_U] = sd.u_buffer;
         ctx->preview_img.planes[VPX_PLANE_V] = sd.v_buffer;
 
-        if (sd.clrtype == REG_YUV)
-            ctx->preview_img.fmt = VPX_IMG_FMT_I420;
-        else
-            ctx->preview_img.fmt = VPX_IMG_FMT_VPXI420;
-
+        ctx->preview_img.fmt = VPX_IMG_FMT_I420;
         ctx->preview_img.x_chroma_shift = 1;
         ctx->preview_img.y_chroma_shift = 1;
 
index b552b846a5b24ce9336b21503ac25a9ec19dce1f..871b8d3857913182469616ef16711e59ea86c973 100644 (file)
@@ -288,8 +288,7 @@ static void yuvconfig2image(vpx_image_t               *img,
       * the Y, U, and V planes, nor other alignment adjustments that
       * might be representable by a YV12_BUFFER_CONFIG, so we just
       * initialize all the fields.*/
-    img->fmt = yv12->clrtype == REG_YUV ?
-        VPX_IMG_FMT_I420 : VPX_IMG_FMT_VPXI420;
+    img->fmt = VPX_IMG_FMT_I420;
     img->w = yv12->y_stride;
     img->h = (yv12->y_height + 2 * VP8BORDERINPIXELS + 15) & ~15;
     img->d_w = yv12->y_width;
@@ -721,8 +720,6 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t   *img,
     yv12->uv_stride = img->stride[VPX_PLANE_U];
 
     yv12->border  = (img->stride[VPX_PLANE_Y] - img->d_w) / 2;
-    yv12->clrtype = (img->fmt == VPX_IMG_FMT_VPXI420 || img->fmt == VPX_IMG_FMT_VPXYV12);
-
     return res;
 }
 
index 96b27bf7c889ef0f37815a52a44485a42d71a483..c41b0674737852e7b6e3ee7348654dc9471967d8 100644 (file)
@@ -180,7 +180,6 @@ void vp9_create_common(VP9_COMMON *oci) {
 
   oci->txfm_mode = ONLY_4X4;
   oci->comp_pred_mode = HYBRID_PREDICTION;
-  oci->clr_type = REG_YUV;
 
   // Initialize reference frame sign bias structure to defaults
   vpx_memset(oci->ref_frame_sign_bias, 0, sizeof(oci->ref_frame_sign_bias));
index b7025cac7cd326f653134e90c1a290145b30fdba..e4efa27c911548db9fb2fd70d18e162b124f83c7 100644 (file)
@@ -148,8 +148,6 @@ typedef struct VP9Common {
   int subsampling_x;
   int subsampling_y;
 
-  YUV_TYPE clr_type;
-
   YV12_BUFFER_CONFIG *frame_to_show;
 
   YV12_BUFFER_CONFIG yv12_fb[NUM_YV12_BUFFERS];
index 3cef88bcda5ac05bada8cd665f372a49de42eb9d..efb04c0a9fd7e4af0982b7fa9da46269352124c0 100644 (file)
@@ -412,7 +412,6 @@ int vp9_get_raw_frame(VP9D_PTR ptr, YV12_BUFFER_CONFIG *sd,
   *time_stamp = pbi->last_time_stamp;
   *time_end_stamp = 0;
 
-  sd->clrtype = pbi->common.clr_type;
 #if CONFIG_POSTPROC
   ret = vp9_post_proc_frame(&pbi->common, sd, flags);
 #else
index 1edd1ebec5d72df7b032bd9b3ee008607679ab96..5febcde8400fdbefedec75d7c31c83bfcf684897 100644 (file)
@@ -3501,7 +3501,6 @@ int vp9_receive_raw_frame(VP9_PTR ptr, unsigned int frame_flags,
   if (vp9_lookahead_push(cpi->lookahead, sd, time_stamp, end_time, frame_flags,
                          cpi->active_map_enabled ? cpi->active_map : NULL))
     res = -1;
-  cm->clr_type = sd->clrtype;
   vpx_usec_timer_mark(&timer);
   cpi->time_receive_data += vpx_usec_timer_elapsed(&timer);
 
index 0c1f373688c393b7fd0d97dc400a6c3d0059e571..ed0122c1b8fa38be6e35d0ccfab0fc022eba0404 100644 (file)
@@ -74,8 +74,6 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
   yv12->alpha_stride = yv12->alpha_buffer ? img->stride[VPX_PLANE_ALPHA] : 0;
 
   yv12->border  = (img->stride[VPX_PLANE_Y] - img->w) / 2;
-  yv12->clrtype = REG_YUV;
-
 #if CONFIG_ALPHA
   // For development purposes, force alpha to hold the same data a Y for now.
   yv12->alpha_buffer = yv12->y_buffer;
index c351370412eb9673c184423c7aa53db58192d657..127843c414907626fbe800ebe0b37060d2c5bd1f 100644 (file)
@@ -21,24 +21,6 @@ extern "C" {
 #define VP9BORDERINPIXELS       96
 #define VP9_INTERP_EXTEND        4
 
-  /*************************************
-   For INT_YUV:
-
-   Y = (R+G*2+B)/4;
-   U = (R-B)/2;
-   V =  (G*2 - R - B)/4;
-  And
-   R = Y+U-V;
-   G = Y+V;
-   B = Y-U-V;
-  ************************************/
-  typedef enum
-  {
-    REG_YUV = 0,    /* Regular yuv */
-    INT_YUV = 1     /* The type of yuv that can be tranfer to and from RGB through integer transform */
-  }
-            YUV_TYPE;
-
   typedef struct yv12_buffer_config {
     int   y_width;
     int   y_height;
@@ -67,7 +49,6 @@ extern "C" {
     int buffer_alloc_sz;
     int border;
     int frame_size;
-    YUV_TYPE clrtype;
 
     int corrupted;
     int flags;