This is following the results from personal research¹. ¹: https://github.com/ubitux/research/tree/main/color-quantization#results
Unified · Split
| @@ -171,7 +171,8 @@ static void compute_box_stats(PaletteGenContext *s, struct range_box *box) · 170 unmodified lines | |||
| 171 | if (er2[0] >= er2[1] && er2[0] >= er2[2]) box->major_axis = 0; | 171 | if (er2[0] >= er2[1] && er2[0] >= er2[2]) box->major_axis = 0; |
| 172 | if (er2[1] >= er2[0] && er2[1] >= er2[2]) box->major_axis = 1; // prefer green again | 172 | if (er2[1] >= er2[0] && er2[1] >= er2[2]) box->major_axis = 1; // prefer green again |
| 173 | 173 | ||
| 174 | box->cut_score = er2[0] + er2[1] + er2[2]; | 174 | /* The box that has the axis with the biggest error amongst all boxes will but cut down */ |
| 175 | box->cut_score = FFMAX3(er2[0], er2[1], er2[2]); | ||
| 175 | } | 176 | } |
| 176 | 177 | ||
| 177 | /** | 178 | /** |
| @@ -3,4 +3,4 @@ · 2 unmodified lines | |||
| 3 | #codec_id 0: rawvideo | 3 | #codec_id 0: rawvideo |
| 4 | #dimensions 0: 16x16 | 4 | #dimensions 0: 16x16 |
| 5 | #sar 0: 1/1 | 5 | #sar 0: 1/1 |
| 6 | 0, 0, 0, 1, 1024, 0x394ee723 | 6 | 0, 0, 0, 1, 1024, 0x21c6e6c4 |
| @@ -3,4 +3,4 @@ · 2 unmodified lines | |||
| 3 | #codec_id 0: rawvideo | 3 | #codec_id 0: rawvideo |
| 4 | #dimensions 0: 16x16 | 4 | #dimensions 0: 16x16 |
| 5 | #sar 0: 1/1 | 5 | #sar 0: 1/1 |
| 6 | 0, 0, 0, 1, 1024, 0xc54d773d | 6 | 0, 0, 0, 1, 1024, 0x630d76b1 |