mm-video: Recognise "OMX.qcom.video.decoder.divx4" when setting role

Setting the component role for the "OMX.qcom.video.decoder.divx4"
component triggered an incorrect claiming that the component wasn't
recognised. This is a valid component.

Change-Id: Ib58ef8d74dcaaf6bde4bc4a07adca400822e0a11
CRs-Fixed: 759443
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
Merge "mm_video: vidc: Update buffer geometry with stride and scanline"
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
Merge "audio E_AC3_JOC definition"
Merge "mm-video-v4l2: vdec: streamoff while freeing first output buffer"
Merge "mm-video: Recognise "OMX.qcom.video.decoder.divx4" when setting role"
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
Merge "mm-video: vidc: Avoid setting invalid timestamp of eos NAL"
Merge "mm-video: vidc: add the log when returning error in ftb"
Merge "mm-video: vidc: defer flush until headers are consumed"
Merge "mm-video: vidc: Make buffer state bitmap 64 bits"
Merge "mm-video-v4l2: vidc: move flush waiting logic to appropriate place"
Merge "mm-video-v4l2: vdec: skip fillbuffer in port reconfiguration"