Set minimum frame size to be 1 byte
authorJingning Han <jingning@google.com>
Thu, 23 Aug 2018 23:51:26 +0000 (16:51 -0700)
committerJingning Han <jingning@google.com>
Fri, 31 Aug 2018 16:27:04 +0000 (16:27 +0000)
The show_existing_frame mode still needs to be sent to the decoder.
Account for this as 1 byte. This would make the encoder properly
update its state.

Change-Id: I32a59ccb5d0e02cc6367c1a264b2de72dc1432a7

vp9/encoder/vp9_encoder.c

index e1a3fbf..c4efd99 100644 (file)
@@ -4950,6 +4950,8 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi, size_t *size,
 
   vp9_rc_postencode_update(cpi, *size);
 
+  *size = VPXMAX(1, *size);
+
 #if 0
   output_frame_level_debug_stats(cpi);
 #endif