History

avcodec/vvcdec: misc, rename BDOF_BLOCK_SIZE to BDOF_MIN_BLOCK_SIZE

Nuo Mi committed 2 years ago

Commit 8347def1 parent b730def2 files · +7 −7Browse files

Showing the changes to libavcodec (2 of 2 files). Show all

Unified · Split

2 files
  1. libavcodec/vvc/dsp.c +2 −2
  2. libavcodec/vvc/inter_template.c +5 −5
libavcodec/vvc/dsp.c+2−2
@@ -80,8 +80,8 @@ typedef struct IntraEdgeParams { · 79 unmodified lines
80#define BDOF_BORDER_EXT 180#define BDOF_BORDER_EXT 1
81 81
82#define BDOF_PADDED_SIZE (16 + BDOF_BORDER_EXT * 2)82#define BDOF_PADDED_SIZE (16 + BDOF_BORDER_EXT * 2)
83#define BDOF_BLOCK_SIZE 483#define BDOF_MIN_BLOCK_SIZE 4
84#define BDOF_GRADIENT_SIZE (BDOF_BLOCK_SIZE + BDOF_BORDER_EXT * 2)84#define BDOF_GRADIENT_SIZE (BDOF_MIN_BLOCK_SIZE + BDOF_BORDER_EXT * 2)
85 85
86#define BIT_DEPTH 886#define BIT_DEPTH 8
87#include "dsp_template.c"87#include "dsp_template.c"
libavcodec/vvc/inter_template.c+5−5
@@ -433,8 +433,8 @@ static void FUNC(apply_bdof_min_block)(pixel* dst, const ptrdiff_t dst_stride, c · 432 unmodified lines
433 const int16_t* gh[] = { gradient_h[0] + 1 + BDOF_PADDED_SIZE, gradient_h[1] + 1 + BDOF_PADDED_SIZE };433 const int16_t* gh[] = { gradient_h[0] + 1 + BDOF_PADDED_SIZE, gradient_h[1] + 1 + BDOF_PADDED_SIZE };
434 const int16_t* gv[] = { gradient_v[0] + 1 + BDOF_PADDED_SIZE, gradient_v[1] + 1 + BDOF_PADDED_SIZE };434 const int16_t* gv[] = { gradient_v[0] + 1 + BDOF_PADDED_SIZE, gradient_v[1] + 1 + BDOF_PADDED_SIZE };
435 435
436 for (int y = 0; y < BDOF_BLOCK_SIZE; y++) {436 for (int y = 0; y < BDOF_MIN_BLOCK_SIZE; y++) {
437 for (int x = 0; x < BDOF_BLOCK_SIZE; x++) {437 for (int x = 0; x < BDOF_MIN_BLOCK_SIZE; x++) {
438 const int idx = y * BDOF_PADDED_SIZE + x;438 const int idx = y * BDOF_PADDED_SIZE + x;
439 const int bdof_offset = vx * (gh[0][idx] - gh[1][idx]) + vy * (gv[0][idx] - gv[1][idx]);439 const int bdof_offset = vx * (gh[0][idx] - gh[1][idx]) + vy * (gv[0][idx] - gv[1][idx]);
440 dst[x] = av_clip_pixel((src0[x] + offset4 + src1[x] + bdof_offset) >> shift4);440 dst[x] = av_clip_pixel((src0[x] + offset4 + src1[x] + bdof_offset) >> shift4);
@@ -461,8 +461,8 @@ static void FUNC(apply_bdof)(uint8_t *_dst, const ptrdiff_t _dst_stride, int16_t · 20 unmodified lines
461 _src1, MAX_PB_SIZE, block_w, block_h, 1);461 _src1, MAX_PB_SIZE, block_w, block_h, 1);
462 pad_int16(_src1, MAX_PB_SIZE, block_w, block_h);462 pad_int16(_src1, MAX_PB_SIZE, block_w, block_h);
463 463
464 for (int y = 0; y < block_h; y += BDOF_BLOCK_SIZE) {464 for (int y = 0; y < block_h; y += BDOF_MIN_BLOCK_SIZE) {
465 for (int x = 0; x < block_w; x += BDOF_BLOCK_SIZE) {465 for (int x = 0; x < block_w; x += BDOF_MIN_BLOCK_SIZE) {
466 const int16_t* src0 = _src0 + y * MAX_PB_SIZE + x;466 const int16_t* src0 = _src0 + y * MAX_PB_SIZE + x;
467 const int16_t* src1 = _src1 + y * MAX_PB_SIZE + x;467 const int16_t* src1 = _src1 + y * MAX_PB_SIZE + x;
468 pixel *d = dst + x;468 pixel *d = dst + x;
@@ -472,7 +472,7 @@ static void FUNC(apply_bdof)(uint8_t *_dst, const ptrdiff_t _dst_stride, int16_t · 3 unmodified lines
472 FUNC(derive_bdof_vx_vy)(src0, src1, gh, gv, BDOF_PADDED_SIZE, &vx, &vy);472 FUNC(derive_bdof_vx_vy)(src0, src1, gh, gv, BDOF_PADDED_SIZE, &vx, &vy);
473 FUNC(apply_bdof_min_block)(d, dst_stride, src0, src1, gh, gv, vx, vy);473 FUNC(apply_bdof_min_block)(d, dst_stride, src0, src1, gh, gv, vx, vy);
474 }474 }
475 dst += BDOF_BLOCK_SIZE * dst_stride;475 dst += BDOF_MIN_BLOCK_SIZE * dst_stride;
476 }476 }
477}477}
478 478

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t