diff options
author | hoony.yu <hoony.yu@samsung.com> | 2010-11-01 14:52:25 -0400 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2010-11-02 18:13:27 -0700 |
commit | ec8de83301370de5962e1255effaccc8a8974914 (patch) | |
tree | e4cebb754a32953f4c20fe5049085fef33635625 /liboverlay/overlay.cpp | |
parent | 94f1003926050a25605782d77bd417adc8e2b8d6 (diff) | |
download | device_samsung_crespo-ec8de83301370de5962e1255effaccc8a8974914.zip device_samsung_crespo-ec8de83301370de5962e1255effaccc8a8974914.tar.gz device_samsung_crespo-ec8de83301370de5962e1255effaccc8a8974914.tar.bz2 |
S5PC11X: OVERLAY: Modify to check constraints.
- remove constraints: src width % 16, dst width % 2
- change constraints: minimum size of dst width = 16 , calculation of offset
Change-Id: If53eaa3eef822f5d36f3a25ad2771c3316386bd4
Signed-off-by: hoony.yu <hoony.yu@samsung.com>
Diffstat (limited to 'liboverlay/overlay.cpp')
-rw-r--r-- | liboverlay/overlay.cpp | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/liboverlay/overlay.cpp b/liboverlay/overlay.cpp index 7e6025c..6220106 100644 --- a/liboverlay/overlay.cpp +++ b/liboverlay/overlay.cpp @@ -717,8 +717,8 @@ static int overlay_setPosition(struct overlay_control_device_t *dev, */ /* Require a minimum size */ - if (temp_w < 8) - temp_w = 8; + if (temp_w < 16) + temp_w = 16; if (temp_h < 8) temp_h = 8; @@ -986,25 +986,15 @@ static int check_fimc_dst_constraints(s5p_fimc_t *s5p_fimc, { int tmp = 0; - if((s5p_fimc->params.dst.height > 0) && (s5p_fimc->params.dst.height < 8)) - s5p_fimc->params.dst.height = 8; + if((s5p_fimc->params.dst.height > 0) && (s5p_fimc->params.dst.height < 16)) + s5p_fimc->params.dst.height = 16; - if(s5p_fimc->hw_ver == 0x50) { - if(s5p_fimc->params.dst.width%2 != 0) { - tmp = s5p_fimc->params.dst.width + (s5p_fimc->params.dst.width%2); - if(tmp <= 0) - return -1; - else - s5p_fimc->params.dst.width = tmp; - } - } else { - if(s5p_fimc->params.dst.width%8 != 0) { - tmp = s5p_fimc->params.dst.width + (s5p_fimc->params.dst.width%8); - if(tmp <= 0) - return -1; - else - s5p_fimc->params.dst.width = tmp; - } + if(s5p_fimc->params.dst.width%8 != 0) { + tmp = s5p_fimc->params.dst.width - (s5p_fimc->params.dst.width%8); + if(tmp <= 0) + return -1; + else + s5p_fimc->params.dst.width = tmp; } return 1; @@ -1018,26 +1008,23 @@ static int check_fimc_src_constraints(s5p_fimc_t *s5p_fimc) s5p_fimc->params.src.full_height < 8 ) return -1; - if(s5p_fimc->params.src.full_width%16 != 0) - return -1; - if(s5p_fimc->hw_ver == 0x50) { format_type = get_pixel_format_type(s5p_fimc->params.src.color_space); switch (format_type) { case PFT_YUV420: if (s5p_fimc->params.src.height%2 != 0) s5p_fimc->params.src.height = s5p_fimc->params.src.height - + (s5p_fimc->params.src.height)%2; + - (s5p_fimc->params.src.height)%2; if (s5p_fimc->params.src.width%2 != 0) s5p_fimc->params.src.width = s5p_fimc->params.src.width - + (s5p_fimc->params.src.width)%2; + - (s5p_fimc->params.src.width)%2; break; case PFT_YUV422: if (s5p_fimc->params.src.width%2 != 0) s5p_fimc->params.src.width = s5p_fimc->params.src.width - + (s5p_fimc->params.src.width)%2; + - (s5p_fimc->params.src.width)%2; } } else { if (s5p_fimc->params.src.height < 8) { @@ -1046,7 +1033,7 @@ static int check_fimc_src_constraints(s5p_fimc_t *s5p_fimc) if (s5p_fimc->params.src.width%16 != 0) { s5p_fimc->params.src.width = s5p_fimc->params.src.width - + (s5p_fimc->params.src.width)%16; + - (s5p_fimc->params.src.width)%16; } } |