mm_video: vidc: Update buffer geometry with stride and scanline

Update buffer geometry dimensions using stride and snanline.
Earlier it was updated conditionally to handle downscalar case.
Now component is fetching all updated dimensions in case of
crop event, so stride and scanline can be used for the same.

Change-Id: If44a6df8498bff2ce39c9428b3708adbee7b8542
mm-video: vidc: defer flush until headers are consumed

In case flush arrives while codec-config buffers are sent
to codec, defer sending flush till codec config buffers
are consumed. This fixes CTS tests which issue flush
right after configure(i.e after queueing headers).

Change-Id: I8cfcaecacc79da8d2c75a521b2a616a20aa69099
mm-video-v4l2: vidc: move flush waiting logic to appropriate place

If a flush arrives while codec-config buffers are in the ETB queue,
both flush and ETB are sent to the video driver which can cause
corruption in output frames. Move flush waiting logic so that flush
is deferred until the headers are consumed

Change-Id: Id0647bfc749ac7e4af975530ac82210cc93023f2
CRs-Fixed: 703100
mm-video-v4l2: vdec: skip fillbuffer in port reconfiguration

Sometimes when port reconfiguration is under progress
hybrid decoder calls fillbuffer when emptybuffer arrives
which results in failures.
Resolve the problem by skipping fillbufer in port reconfiguration.

Change-Id: If900acbde8887d41134103b42f764d8018bd82e6
audio E_AC3_JOC definition

Add extern defintion for JOC format

CRs-Fixed: 761339
Change-Id: I7e007f8bbce18479986def3526986b5f1b6e9c05
mm-video-v4l2: vdec: streamoff while freeing first output buffer

Streaoff is being skipped if client sends commands loaded ->
idle -> allocate output buffers -> loaded -> free output buffers ->
get buffer requirements and results in failure.
Do streamoff while client frees the first output buffer to
resolve the issue.

Change-Id: I6e0391a22069219e54002d238bc6e347d1147aeb
mm-video: vidc: Make buffer state bitmap 64 bits

Previously the buffer state bitmap (which indicates if the given buffer
at an index is free or allocated) was unsigned int, which was typically
32 bits.  However if the client wants more than 32 buffers, the state
can't be held within the 32-bit bitmap.  Hence change it to uint64_t.

Change-Id: I8403c1331352bb96570577362a46444600d88448
mm-video: vidc: Avoid setting invalid timestamp of eos NAL

In arbitrary mode when eos NAL is appened at the end, while
coalscing with destination buffer, the actual timestamp is
overwritten with LLONG_MAX. This will lead to error log and
setting the flag V4L2_QCOM_BUF_TIMESTAMP_INVALID in driver,
which is not needed.

Change-Id: I87a63c4cb9d8259280b781cdd553050580809e8e
mm-video: vidc: add the log when returning error in ftb

No detail error log printed in some places when returning
error in fill_this_buffer.

CRs-fixed: 691490
Change-Id: I3ec2570c25b1e49e6906909e7cadc33201290a24
mm-video-v4l2: vidc: Amend debug log macros

Currently debug logs are not coming under conditional
statements if flower brackets are not used. Amend debug
log macros to print the logs without the need of any
flower brackets.

Change-Id: I0db3316774695fed481a137672b8d22a03fe85f4
mm-video-v4l2: vdec: streamoff while freeing first output buffer

Streaoff is being skipped if client sends commands loaded ->
idle -> allocate output buffers -> loaded -> free output buffers ->
get buffer requirements and results in failure. Do streamoff
while client frees the first output buffer to resolve the issue.
Do not streamoff when dynamic buffer mode is enabled.

Change-Id: I45edd58d827b5706990d8bdf359661bd8eb691de
Revert "mm-video-v4l2: vdec: streamoff while freeing first output buffer"

This reverts commit ae7a781db6d9b01bca4c38aa32e36d8a1e232ff7.

Video component is not expected to call stream_off when
freeing output buffers in dynamic buffer mode.
The proper fix is 4fe451dc21600bb345b422f53d0f785dab1a92be.

Change-Id: I60ba6e6332279f326cbccc4dd7a3aef89379dc07