summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@google.com>2013-02-06 15:30:21 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2013-02-12 10:33:34 -0800
commitf496f601fb2e48390c822f89df60c6b2398026ab (patch)
treeb186833c71ad1a6b741a567894ea5be2d5ddb35c /vp9/encoder/vp9_encodeframe.c
parentcb00be1fa20c1a3955d62c1939646f4fd5d31224 (diff)
downloadlibvpx-f496f601fb2e48390c822f89df60c6b2398026ab.tar
libvpx-f496f601fb2e48390c822f89df60c6b2398026ab.tar.gz
libvpx-f496f601fb2e48390c822f89df60c6b2398026ab.tar.bz2
libvpx-f496f601fb2e48390c822f89df60c6b2398026ab.zip
Add tile column size limits (256 pixels min, 4096 pixels max).
This is after discussion with the hardware team. Update the unit test to take these sizes into account. Split out some duplicate code into a separate file so it can be shared. Change-Id: I8311d11b0191d8bb37e8eb4ac962beb217e1bff5
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 927a1b901..c5f717f5f 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -28,6 +28,7 @@
#include "vp9/common/vp9_findnearmv.h"
#include "vp9/common/vp9_reconintra.h"
#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_tile_common.h"
#include "vp9/encoder/vp9_tokenize.h"
#include "vp9_rtcd.h"
#include <stdio.h>
@@ -1312,23 +1313,16 @@ static void encode_frame_internal(VP9_COMP *cpi) {
{
// Take tiles into account and give start/end MB
- int tile, mb_start = 0;
+ int tile;
for (tile = 0; tile < cm->tile_columns; tile++) {
- // calculate end of tile column
- const int sb_cols = (cm->mb_cols + 3) >> 2;
- const int sb_end = (sb_cols * (tile + 1)) >> cpi->oxcf.tile_columns;
- const int mb_end = ((sb_end << 2) > cm->mb_cols) ?
- cm->mb_cols : (sb_end << 2);
-
// For each row of SBs in the frame
cm->cur_tile_idx = tile;
- cm->cur_tile_mb_col_start = mb_start;
- cm->cur_tile_mb_col_end = mb_end;
+ vp9_get_tile_offsets(cm, &cm->cur_tile_mb_col_start,
+ &cm->cur_tile_mb_col_end);
for (mb_row = 0; mb_row < cm->mb_rows; mb_row += 4) {
encode_sb_row(cpi, mb_row, &tp, &totalrate);
}
- mb_start = mb_end;
}
cpi->tok_count = (unsigned int)(tp - cpi->tok);