Skip to content

Commit d931220

Browse files
committed
Do not pass ac when it is not needed
It is used only when doing CFL. Addresses #3257.
1 parent 21bb4cb commit d931220

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/encoder.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ pub fn write_tx_blocks<T: Pixel, W: Writer>(
22852285
po,
22862286
skip,
22872287
qidx,
2288-
&ac.data,
2288+
&[],
22892289
IntraParam::AngleDelta(angle_delta.y),
22902290
rdo_type,
22912291
need_recon_pixel,
@@ -2322,9 +2322,12 @@ pub fn write_tx_blocks<T: Pixel, W: Writer>(
23222322
bw_uv /= uv_tx_size.width_mi();
23232323
bh_uv /= uv_tx_size.height_mi();
23242324

2325-
if chroma_mode.is_cfl() {
2325+
let ac_data = if chroma_mode.is_cfl() {
23262326
luma_ac(&mut ac.data, ts, tile_bo, bsize, tx_size, fi);
2327-
}
2327+
&ac.data[..]
2328+
} else {
2329+
&[]
2330+
};
23282331

23292332
let uv_tx_type = if uv_tx_size.width() >= 32 || uv_tx_size.height() >= 32 {
23302333
TxType::DCT_DCT
@@ -2371,7 +2374,7 @@ pub fn write_tx_blocks<T: Pixel, W: Writer>(
23712374
po,
23722375
skip,
23732376
qidx,
2374-
&ac.data,
2377+
ac_data,
23752378
if chroma_mode.is_cfl() {
23762379
IntraParam::Alpha(alpha)
23772380
} else {

0 commit comments

Comments
 (0)