Comments (3)
ping. Is more than one border column/row needed?
from ffv1.
1/ "The top right sample of the slice is a so with this definition I'd expect to see"
impossible: you can not compute a
from a
, as a
is not yet known. so no copy of a
on the left of the real a
FFmpeg code is:
sample[1][-1] = sample[0][0];
sample[0][w] = sample[0][w - 1];
With:
- all 0 as init
- sample[0] is the previous line (full 0 if current line is the first one)
- sample[1] is the current line
w
is the width of the plane
--> It is done only once, for pixel 0, not for pixel "-1", so no a
on the last line on the extreme left.
line 1 sample "-1" is line 0 sample "0"
line 0 sample "last +1" is line 0 sample "last"
line 1 sample "-2" is always 0 (I would have put a
too but this is not what is coded)
I don't know how it should be in plain text, but the reference array is correct from my point of view.
Let's try sample to the left of a first coded sample of a line is identical to the first coded sample of a line that is above (if there is one)
In practice it would be:
| X | X | | 0 | 0 | 0 | | X |
| X | 0 | | 0 | 0 | 0 | | 0 |
| | | | | | | | |
| 0 | 0 | | a | b | c | | c |
| 0 | a | | d | | e | | e |
| 0 | d | | f | g | h | | h |
with X
impossible cases (never used)
2/ "Is more than one border column/row needed?"
for the moment I did not face a frame with the need of column "-2" and line "-2", but the FFmpeg code is:
const int LT = last[-1];
const int T = last[0];
const int RT = last[1];
const int L = src[-1];
if (p->quant_table[3][127]) {
const int TT = last2[0];
const int LL = src[-2];
return p->quant_table[0][(L - LT) & 0xFF] +
p->quant_table[1][(LT - T) & 0xFF] +
p->quant_table[2][(T - RT) & 0xFF] +
p->quant_table[3][(LL - L) & 0xFF] +
p->quant_table[4][(TT - T) & 0xFF];
} else
return p->quant_table[0][(L - LT) & 0xFF] +
p->quant_table[1][(LT - T) & 0xFF] +
p->quant_table[2][(T - RT) & 0xFF];
so if the 128th number of the 4th quant table is not 0, the sample 2 columns before the current column and the sample 2 lines before the current line are used, and for the first pixel of the first column you need 2 borders/rows.
With an array:
if (p->quant_table[3][127])
| | | | 0 | |
| | 0 | | 0 | 0 |
| | | | | |
| 0 | 0 | | a
else
| | | | | |
| | 0 | | 0 | 0 |
| | | | | |
| | 0 | | a
with 0
values used for computing the context.
So yes, we need more than one border column/row needed (actually 2)?
I think the issue is that the context computing is not yet (well) defined, we should defined it
from ffv1.
I didn’t answer, because I can see little pros/cons in both scenari, but so far I’m unable to decide.
from ffv1.
Related Issues (20)
- CONTEXT_SIZE is not defined
- Reference decoder (FFmpeg's ffv1dec.c) doesn't match spec behavior for quant_table_set_count HOT 11
- 4.6.2. plane_pixel_height has incorrect information on chroma planes
- Quant tables: reference decoder relies too much on reference encoder HOT 3
- [v4] Consider adding prediction to inter mode HOT 5
- sign_extend is used but not defined HOT 1
- Spec allows >8bit depth in Golomb-Rice mode but nothing can make this HOT 3
- IEEE CRC-32 referenced in spec is not a standard IEEE CRC-32 HOT 8
- JPEG2000-RCT transform equations are incomplete / don't match reference HOT 1
- few instances of lines too long HOT 2
- [v4] Consider other RCTs HOT 5
- section 3.8.1.2 needs to define get_rac HOT 8
- section 3.8.1.1 should have pseudocode HOT 16
- [v4] slices HOT 5
- Build produces pages of warnings and errors HOT 8
- Nothing in the Makefile removes the genarated *.svg files HOT 1
- reading through section 3.8.1.1 HOT 8
- add list of ffv4 goals and promises
- Renaming of the repo to ffv1-specification HOT 4
- FFV1 CUDA accelerated version HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ffv1.