Changeset 4158 for pjproject


Ignore:
Timestamp:
Jun 6, 2012 9:56:14 AM (12 years ago)
Author:
nanang
Message:

Fix #1528:

  • fixed video format YV12 (was YUV planar 16bpp, should be YVU planar 12bpp)
  • added I422 (YUV planar 16bpp, was defined as YV12)
  • updated colorbar video device to support YV12.
Location:
pjproject/trunk/pjmedia
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/include/pjmedia/format.h

    r4017 r4158  
    170170 
    171171    /** 
    172      * This is planar 4:2:2/16bpp YUV format. 
     172     * This is planar 4:2:0/12bpp YUV format, similar to I420 or IYUV but 
     173     * the U (Cb) and V (Cr) planes order is switched, i.e: the second plane 
     174     * contains the V (Cb) samples and the third plane contains the V (Cr) 
     175     * samples. 
    173176     */ 
    174177    PJMEDIA_FORMAT_YV12     = PJMEDIA_FORMAT_PACK('Y', 'V', '1', '2'), 
     178 
     179    /** 
     180     * This is planar 4:2:2/16bpp YUV format, the data can be treated as 
     181     * three planes of color components, where the first plane contains 
     182     * only the Y samples, the second plane contains only the U (Cb) samples, 
     183     * and the third plane contains only the V (Cr) sample. 
     184     */ 
     185    PJMEDIA_FORMAT_I422     = PJMEDIA_FORMAT_PACK('I', '4', '2', '2'), 
    175186 
    176187    /** 
  • pjproject/trunk/pjmedia/src/pjmedia-videodev/colorbar_dev.c

    r3901 r4158  
    7777    { PJMEDIA_FORMAT_YV12 }, 
    7878    { PJMEDIA_FORMAT_I420 }, 
     79    { PJMEDIA_FORMAT_I422 }, 
    7980    { PJMEDIA_FORMAT_I420JPEG }, 
    8081    { PJMEDIA_FORMAT_I422JPEG }, 
     
    355356                if (vfi->color_model == PJMEDIA_COLOR_MODEL_RGB) 
    356357                    c = rgb_colors[i][j]; 
    357                 else 
    358                     c = yuv_colors[i][j]; 
     358                else { 
     359                    if (vfi->id == PJMEDIA_FORMAT_YV12 && j > 0) 
     360                        c = yuv_colors[i][3-j]; 
     361                    else 
     362                        c = yuv_colors[i][j]; 
     363                } 
    359364 
    360365                bar_width = vafp->strides[j]/8; 
  • pjproject/trunk/pjmedia/src/pjmedia/ffmpeg_util.c

    r4056 r4158  
    5353    { PJMEDIA_FORMAT_UYVY, PIX_FMT_UYVY422}, 
    5454    { PJMEDIA_FORMAT_I420, PIX_FMT_YUV420P}, 
    55     { PJMEDIA_FORMAT_YV12, PIX_FMT_YUV422P}, 
     55    //{ PJMEDIA_FORMAT_YV12, PIX_FMT_YUV420P}, 
     56    { PJMEDIA_FORMAT_I422, PIX_FMT_YUV422P}, 
    5657    { PJMEDIA_FORMAT_I420JPEG, PIX_FMT_YUVJ420P}, 
    5758    { PJMEDIA_FORMAT_I422JPEG, PIX_FMT_YUVJ422P}, 
  • pjproject/trunk/pjmedia/src/pjmedia/format.c

    r4087 r4158  
    106106    {PJMEDIA_FORMAT_YVYU,  "YVYU", PJMEDIA_COLOR_MODEL_YUV, 16, 1, &apply_packed_fmt}, 
    107107    {PJMEDIA_FORMAT_I420,  "I420", PJMEDIA_COLOR_MODEL_YUV, 12, 3, &apply_planar_420}, 
    108     {PJMEDIA_FORMAT_YV12,  "YV12", PJMEDIA_COLOR_MODEL_YUV, 16, 3, &apply_planar_422}, 
     108    {PJMEDIA_FORMAT_YV12,  "YV12", PJMEDIA_COLOR_MODEL_YUV, 12, 3, &apply_planar_420}, 
     109    {PJMEDIA_FORMAT_I422,  "I422", PJMEDIA_COLOR_MODEL_YUV, 16, 3, &apply_planar_422}, 
    109110    {PJMEDIA_FORMAT_I420JPEG, "I420JPG", PJMEDIA_COLOR_MODEL_YUV, 12, 3, &apply_planar_420}, 
    110111    {PJMEDIA_FORMAT_I422JPEG, "I422JPG", PJMEDIA_COLOR_MODEL_YUV, 16, 3, &apply_planar_422}, 
Note: See TracChangeset for help on using the changeset viewer.