Commit graph

13 commits

Author SHA1 Message Date
Harish Mahendrakar
cd1928dca1 Encoder: Fix in returning recon buffers with smaller IDR interval
For every IDR generated after the first one, one recon buffer was not
released from the buffer manager, when recon was enabled. This resulted
in encoder returning with an error after couple of IDRs when recon was
enabled.

This is fixed by calling recon buffer release based on pic_cnt instead
of frm_num. frm_num is reset to 0 for every IDR where as pic_cnt is not.

Bug: 173150684
Test: avcenc -i qcif.yuv -w 176 -h 144 -o out.h264 \
      --bframes 2 --idr_interval 4 --recon_enable 1 \
      --recon recon.yuv

Change-Id: I8b72e5aedc6a460292388e4e46f56c07486db4a6
2020-11-12 23:49:41 +00:00
Chamarthi Kishore
95a2113e4b libavc: Handling of Error propagation
This commit has changes to Error return propagation to
the caller functions.

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 142545567

Change-Id: I015ebe03e753a0edc1bf8bfc167180ead63193e1
2019-10-24 17:54:31 +05:30
Chamarthi Kishore
ad2eaf8c7d libavc: Add MDCV, CLL, CCV and AVE SEI messages
This commit add support for encoding and decoding of MDCV, CLL, CCV and
AVE SEI messages

Test: avcenc -c enc.cfg, avcdec -c dec.cfg
Bug: 141931623

Change-Id: Idc0b0db5291482ae2bc19cdff65669c32374b02a
2019-10-24 17:20:00 +05:30
Martin Storsjo
8e78e306bb Make sure that apv_bufs[0] and u4_is_last always are set
When encoding in header mode, the s_inp_buf struct that was written
to ps_video_encode_op->s_ive_op.s_inp_buf was completely uninitialized.

In ih264e_input_queue_update, make sure to initialize u4_is_last
when skipping frames.

Change-Id: I87e677acd00baf4f732ca7d35ee192e7f1f73994
2015-07-28 18:46:30 +00:00
Harinarayanan K K
f080d51500 Fixed encode of single frame
Encoding a single frame used to make encoder to go into infinite
loop. That is fixed now

Change-Id: I51752bdc5fd6071868884c2ff6074c14d05c8564
2015-07-28 18:37:38 +00:00
Martin Storsjo
9fbffcfb6e Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

(The previous version of this commit was originally made before
the commit adding support for main profile, which added a bunch
more similar issues.)

Change-Id: I0a927deb2ef4125f79429d108439e249fa531607
2015-07-28 18:35:54 +00:00
Martin Storsjo
7c99adf718 Initialize i4_non_ref_frames_in_stream before encoding SPS/PPS
When header mode is enabled, the SPS is populated before this
field was initialized in ih264e_pic_init.

Change-Id: I7e38828e12bee15bd3a53562b4e4d0d65354326a
2015-06-24 21:08:11 +00:00
Harinarayanan K K
d2d469e520 Added check for minimum output buffer size.
Changed macro specifying the minimum size required for output buffer.

Added an error check on the size allocated for output buffer.

Change-Id: I98e4f46e62ffc974df760f2633689de079ca3e5e
2015-06-24 21:05:34 +00:00
Harinarayanan K K
6cb6772805 Reduced memory requirements.
Buffer allocation is based on minimum level required for the
input resolution rather than the input max level.

Number of maximum context sets can be set to 1 to reduce
memory usage.

Added a macro ENC_MIN_PU_SIZE for minimum size of
inter prediction unit supported by encoder.

Changed the maximum constraint on number of MBs for NMB
processing to width in Mbs.

Change-Id: I5a9255e93935d90c13262681aafc772aedf8ae81
2015-06-24 21:04:04 +00:00
Harinarayanan K K
134291ea0b Added support for Main Profile toolsets in encoder.
Added support for CABAC entropy coding.
Added support for B slices.
Fixed an issue in rate control constant QP mode.

Change-Id: Ib759d35e8e943f941aa9b8bbff0362d92c619994
2015-06-24 20:36:11 +00:00
Martin Storsjo
afe8d03624 Force regenerating the header via i4_gen_header instead of i4_header_mode
If i4_header_mode is set (without the caller explicitly requesting it),
the next frame to be encoded will be missed altogether (when only
a header is output).

Instead force a header to be generated prepended to the next frame.
If the caller explicitly requests header mode, it will be output
in a separate call.

Change-Id: If475717edf980bccb2076f880c60c9dd7dede904
2015-06-23 12:34:46 +03:00
Lajos Molnar
cd9e51fc2b fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:34:51 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30