MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / decode_sb_mem

Function decode_sb_mem

libavcodec/vp9.c:1198–1245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1196}
1197
1198static void decode_sb_mem(VP9TileData *td, int row, int col, VP9Filter *lflvl,
1199 ptrdiff_t yoff, ptrdiff_t uvoff, enum BlockLevel bl)
1200{
1201 const VP9Context *s = td->s;
1202 VP9Block *b = td->b;
1203 ptrdiff_t hbs = 4 >> bl;
1204 AVFrame *f = s->s.frames[CUR_FRAME].tf.f;
1205 ptrdiff_t y_stride = f->linesize[0], uv_stride = f->linesize[1];
1206 int bytesperpixel = s->bytesperpixel;
1207
1208 if (bl == BL_8X8) {
1209 av_assert2(b->bl == BL_8X8);
1210 ff_vp9_decode_block(td, row, col, lflvl, yoff, uvoff, b->bl, b->bp);
1211 } else if (td->b->bl == bl) {
1212 ff_vp9_decode_block(td, row, col, lflvl, yoff, uvoff, b->bl, b->bp);
1213 if (b->bp == PARTITION_H && row + hbs < s->rows) {
1214 yoff += hbs * 8 * y_stride;
1215 uvoff += hbs * 8 * uv_stride >> s->ss_v;
1216 ff_vp9_decode_block(td, row + hbs, col, lflvl, yoff, uvoff, b->bl, b->bp);
1217 } else if (b->bp == PARTITION_V && col + hbs < s->cols) {
1218 yoff += hbs * 8 * bytesperpixel;
1219 uvoff += hbs * 8 * bytesperpixel >> s->ss_h;
1220 ff_vp9_decode_block(td, row, col + hbs, lflvl, yoff, uvoff, b->bl, b->bp);
1221 }
1222 } else {
1223 decode_sb_mem(td, row, col, lflvl, yoff, uvoff, bl + 1);
1224 if (col + hbs < s->cols) { // FIXME why not <=?
1225 if (row + hbs < s->rows) {
1226 decode_sb_mem(td, row, col + hbs, lflvl, yoff + 8 * hbs * bytesperpixel,
1227 uvoff + (8 * hbs * bytesperpixel >> s->ss_h), bl + 1);
1228 yoff += hbs * 8 * y_stride;
1229 uvoff += hbs * 8 * uv_stride >> s->ss_v;
1230 decode_sb_mem(td, row + hbs, col, lflvl, yoff, uvoff, bl + 1);
1231 decode_sb_mem(td, row + hbs, col + hbs, lflvl,
1232 yoff + 8 * hbs * bytesperpixel,
1233 uvoff + (8 * hbs * bytesperpixel >> s->ss_h), bl + 1);
1234 } else {
1235 yoff += hbs * 8 * bytesperpixel;
1236 uvoff += hbs * 8 * bytesperpixel >> s->ss_h;
1237 decode_sb_mem(td, row, col + hbs, lflvl, yoff, uvoff, bl + 1);
1238 }
1239 } else if (row + hbs < s->rows) {
1240 yoff += hbs * 8 * y_stride;
1241 uvoff += hbs * 8 * uv_stride >> s->ss_v;
1242 decode_sb_mem(td, row + hbs, col, lflvl, yoff, uvoff, bl + 1);
1243 }
1244 }
1245}
1246
1247static void set_tile_offset(int *start, int *end, int idx, int log2_n, int n)
1248{

Callers 1

decode_tilesFunction · 0.85

Calls 1

ff_vp9_decode_blockFunction · 0.85

Tested by

no test coverage detected