Remove pack_bitstream flag in AV1_COMP
This flag is no longer needed.
Change-Id: If124bff08e01117432df82bfc0ab5e1d0717be8c
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index a225b49..27c3510 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3726,8 +3726,6 @@
int av1_pack_bitstream(AV1_COMP *const cpi, uint8_t *dst, size_t *size,
int *const largest_tile_id) {
- if (!cpi->pack_bitstream) return AOM_CODEC_OK;
-
uint8_t *data = dst;
uint32_t data_size;
AV1_COMMON *const cm = &cpi->common;
diff --git a/av1/encoder/encode_strategy.c b/av1/encoder/encode_strategy.c
index fdcbac6..95d395c 100644
--- a/av1/encoder/encode_strategy.c
+++ b/av1/encoder/encode_strategy.c
@@ -1031,7 +1031,6 @@
EncodeFrameResults *const frame_results,
int *temporal_filtered) {
if (frame_params->frame_type != KEY_FRAME) {
- cpi->pack_bitstream = 1;
if (av1_encode(cpi, dest, frame_input, frame_params, frame_results) !=
AOM_CODEC_OK) {
return AOM_CODEC_ERROR;
@@ -1086,7 +1085,6 @@
// Use the filtered frame for encoding.
frame_input->source = &cpi->alt_ref_buffer;
*temporal_filtered = 1;
- cpi->pack_bitstream = 1;
if (av1_encode(cpi, dest, frame_input, frame_params, frame_results) !=
AOM_CODEC_OK) {
return AOM_CODEC_ERROR;
@@ -1099,7 +1097,6 @@
}
} else {
// Encode other frames.
- cpi->pack_bitstream = 1;
if (av1_encode(cpi, dest, frame_input, frame_params, frame_results) !=
AOM_CODEC_OK) {
return AOM_CODEC_ERROR;
@@ -1433,7 +1430,6 @@
return AOM_CODEC_ERROR;
}
#else // !TEMPORAL_FILTER_KEY_FRAME
- cpi->pack_bitstream = 1;
if (av1_encode(cpi, dest, &frame_input, &frame_params, &frame_results) !=
AOM_CODEC_OK) {
return AOM_CODEC_ERROR;
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 430f651..6a9b8f9 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -1048,11 +1048,6 @@
int8_t nearest_future_ref;
double *ssim_rdmult_scaling_factors;
-
- // Whether writing to bitstream. It allows us to encode one frame multiple
- // times without writing to bitstream and thus provides flexibility for
- // experiments, for example, temporal filtering on key frames.
- int pack_bitstream;
} AV1_COMP;
typedef struct {