Commit bbc258cb authored by Yaowu Xu's avatar Yaowu Xu

misc-fix: allow per segment lossless coding

This commit merges the fix that allows lossless coding at the segment
level.

Related tracking issue:
https://bugs.chromium.org/p/webm/issues/detail?id=1035
Orignial libvpx commit:
60c58b52

Change-Id: I085318992806052de5a4035aa3e4cbda911ae69c
parent 59c4c101
......@@ -1972,7 +1972,7 @@ static size_t read_uncompressed_header(AV1Decoder *pbi,
#endif
for (i = 0; i < MAX_SEGMENTS; ++i) {
const int qindex = CONFIG_MISC_FIXES && cm->seg.enabled
const int qindex = cm->seg.enabled
? av1_get_qindex(&cm->seg, i, cm->base_qindex)
: cm->base_qindex;
xd->lossless[i] = qindex == 0 && cm->y_dc_delta_q == 0 &&
......
......@@ -2829,7 +2829,7 @@ static void encode_frame_internal(AV1_COMP *cpi) {
rdc->ex_search_count = 0; // Exhaustive mesh search hits.
for (i = 0; i < MAX_SEGMENTS; ++i) {
const int qindex = CONFIG_MISC_FIXES && cm->seg.enabled
const int qindex = cm->seg.enabled
? av1_get_qindex(&cm->seg, i, cm->base_qindex)
: cm->base_qindex;
xd->lossless[i] = qindex == 0 && cm->y_dc_delta_q == 0 &&
......
......@@ -772,7 +772,7 @@ static void super_block_yrd(const AV1_COMP *const cpi, MACROBLOCK *x, int *rate,
assert(bs == xd->mi[0]->mbmi.sb_type);
if (CONFIG_MISC_FIXES && xd->lossless[0]) {
if (xd->lossless[0]) {
choose_smallest_tx_size(cpi, x, rate, distortion, skip, ret_sse,
ref_best_rd, bs);
} else if (cpi->sf.tx_size_search_method == USE_LARGESTALL ||
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment