viddec3test:fd is initialized in display-wayland
Signed-off-by: Ramprasad N <x0038811@ti.com>
Signed-off-by: Ramprasad N <x0038811@ti.com>
display-kmscube: refined to use dma-buf import feature
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Signed-off-by: Subhajit Paul <subhajit_paul@ti.com>
Revert "configure: disable kmscube"
Enabled YUV video import as EGLImage feature. Re-enabling kmscube
video
This reverts commit 9c2c714ab7f75a829faa3bec0e5b25a158946819.
Enabled YUV video import as EGLImage feature. Re-enabling kmscube
video
This reverts commit 9c2c714ab7f75a829faa3bec0e5b25a158946819.
videnc2test: add JPEG encoder
Signed-off-by: Hongmei Gou <h-gou@ti.com>
Signed-off-by: Hongmei Gou <h-gou@ti.com>
Makefile: Fix libraries link order.
On Poky based builds, without this change, it results in the following error:
undefined reference to symbol 'av_bitstream_filter_init@@LIBAVCODEC_54'
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
On Poky based builds, without this change, it results in the following error:
undefined reference to symbol 'av_bitstream_filter_init@@LIBAVCODEC_54'
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
viddec3test: Fix dual decode Segfault in prerolling
avFormatContext cannot be static according to new API usage.
Make it local variable to avoid segfaults in multiple
decode usecase.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
avFormatContext cannot be static according to new API usage.
Make it local variable to avoid segfaults in multiple
decode usecase.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
Add signal handler for viddec3test and videnc2test
This patch adds a signal handler for SIGINT signal.
This is a sample handler which can be extended further.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
This patch adds a signal handler for SIGINT signal.
This is a sample handler which can be extended further.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
dmabuftest: Fix latency profiling using monotonic time
V4L2 driver uses monotonic timestamp to report the frame capture
time. While the application is using system time to calculate the
latency.
Due to this, the latencies reported with '--debug' option are too high.
Fix this by using monotonic timestamp for comparison.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
V4L2 driver uses monotonic timestamp to report the frame capture
time. While the application is using system time to calculate the
latency.
Due to this, the latencies reported with '--debug' option are too high.
Fix this by using monotonic timestamp for comparison.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Android: add initial support for Android build
Add support for building dmabuftest and v4l2capturedisplay with
Android build system.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
Add support for building dmabuftest and v4l2capturedisplay with
Android build system.
Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
demux: fix segmentation fault with avformat_close_input
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
display-wayland: Add scaler interface
Add the missing scaler protocol and interface files.
These are useful for scaling video buffers while
displaying in the wayland client.
Fixes: b9447df8eb "display-wayland: Wayland backend implementation"
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add the missing scaler protocol and interface files.
These are useful for scaling video buffers while
displaying in the wayland client.
Fixes: b9447df8eb "display-wayland: Wayland backend implementation"
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
util/viddec3test: Update use of deprecated APIs and enums
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
util/demux: update use of deprecated API
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Denys Dmytriyenko <denys@ti.com>
configure: disable kmscube
kmscube support requires proprietary EGL extensions EGL_RAW_VIDEO_TI_DMABUF
which is not supported in DDK 1.14.
Future versions of DDK will support the standard EGL extension
EXT_image_dma_buf_import which is ratified by Khronos. This will require
corresponding changes to the application.
Till then, disable kmscube in omapdrmtest.
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
kmscube support requires proprietary EGL extensions EGL_RAW_VIDEO_TI_DMABUF
which is not supported in DDK 1.14.
Future versions of DDK will support the standard EGL extension
EXT_image_dma_buf_import which is ratified by Khronos. This will require
corresponding changes to the application.
Till then, disable kmscube in omapdrmtest.
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
display-wayland: Wayland backend implementation
Add new backend for the display interface.
Add the drm client protocol and client protocol files
* Use omap_bo to allocate video buffers
* Use wl_drm_create(_planar)_buffer APIs for wayland buffers
Update the Makefile and configure.ac dependencies
Add the viewport to scale based on -w SIZE
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add new backend for the display interface.
Add the drm client protocol and client protocol files
* Use omap_bo to allocate video buffers
* Use wl_drm_create(_planar)_buffer APIs for wayland buffers
Update the Makefile and configure.ac dependencies
Add the viewport to scale based on -w SIZE
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
display-kms: Add no master support
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Add more checks to detect certain process call errors and exit
DCE_EXDM_UNSUPPORTED, DCE_EIPC_CALL_FAIL and DCE_EINVALID_INPUT signifies that the
application needs to free the resources and exit.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
DCE_EXDM_UNSUPPORTED, DCE_EIPC_CALL_FAIL and DCE_EINVALID_INPUT signifies that the
application needs to free the resources and exit.
Signed-off-by: Pooja Prajod <a0132412@ti.com>
viddec3test: move a global variable to demux structure
Fixes a failure in dual-decode case.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
Fixes a failure in dual-decode case.
Signed-off-by: Harinarayan Bhatta <harinarayan@ti.com>
vpe: Correct the colorspace field
Correct the colorspace field
Fix the build error
Fixes: (562a2c8d "vpe: Pass correct colorspace to s_fmt ioctl")
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Correct the colorspace field
Fix the build error
Fixes: (562a2c8d "vpe: Pass correct colorspace to s_fmt ioctl")
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
display-kmscube: fix race condition for buffer to face mapping
When disp_get_vid_buffers is called, all the buffers allocated in
one such call are grouped and are assigned a face number.
Any of these buffers will always be rendered on this face.
This function is not reentrant as it uses the num_face field of disp.
Because of this, if two of these functions are being executed in parallel,
sometimes, buffers in pool get assigned a different face number.
Because of this, randomly a buffer for some other face gets rendered
causing flicker.
Protect the function with the mutex lock so that the buffer to face number
allocation is done correctly, hence avoiding the flicker.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
When disp_get_vid_buffers is called, all the buffers allocated in
one such call are grouped and are assigned a face number.
Any of these buffers will always be rendered on this face.
This function is not reentrant as it uses the num_face field of disp.
Because of this, if two of these functions are being executed in parallel,
sometimes, buffers in pool get assigned a different face number.
Because of this, randomly a buffer for some other face gets rendered
causing flicker.
Protect the function with the mutex lock so that the buffer to face number
allocation is done correctly, hence avoiding the flicker.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
vpe: Pass correct colorspace to s_fmt ioctl
Without passing correct colorspace, the RGB formats will not work.
This would lead to image corruption when displaying in the RGB format.
The colorspace is derived from the fourcc, but not passed to the s_fmt ioctl.
Correct this.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Without passing correct colorspace, the RGB formats will not work.
This would lead to image corruption when displaying in the RGB format.
The colorspace is derived from the fourcc, but not passed to the s_fmt ioctl.
Correct this.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Use single planar buffers
VIP driver does not support multiplanar buffers.
For NV12 format, UV plane is assumed to be contiguous
with the Y plane.
Therefore, use all the single planar buffers
So that DRM also allocates single planar and VIP can consume them
for NV12 capture.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
VIP driver does not support multiplanar buffers.
For NV12 format, UV plane is assumed to be contiguous
with the Y plane.
Therefore, use all the single planar buffers
So that DRM also allocates single planar and VIP can consume them
for NV12 capture.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
capturevpedisplay: Request interlaced capture and pass field ids
Currently the VIP S_FMT ioctl does not specify the field type of
the capture. Request for alternate field type.
Also, the field type of captured buffer is returned by the driver.
Pass this field type when queuing buffers for the VPE source.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Currently the VIP S_FMT ioctl does not specify the field type of
the capture. Request for alternate field type.
Also, the field type of captured buffer is returned by the driver.
Pass this field type when queuing buffers for the VPE source.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
v4l2: Add latency measurement
To profile the driver capture latency and display latency,
Calculate the latencies at QBUF and DQBUF ioctls
Print the latencies only when --debug is passed.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
To profile the driver capture latency and display latency,
Calculate the latencies at QBUF and DQBUF ioctls
Print the latencies only when --debug is passed.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Return from thread if streamon fails
Currently failed streamon is ignored and the app tries to perform
QBUF and DQBUF ioctls flooding the output with errors.
This can be avoided if the thread exits gracefully with an error.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Currently failed streamon is ignored and the app tries to perform
QBUF and DQBUF ioctls flooding the output with errors.
This can be avoided if the thread exits gracefully with an error.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Remove switch thread logic
With the kmscube display, multiple captures need not be switched
All of the videos(upto six) can be rendered on the cube.
Remove the display thread logic so that all the threads
post the captured buffer to display library.
Also remove the fullscreen / overlay mode of displaying
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
With the kmscube display, multiple captures need not be switched
All of the videos(upto six) can be rendered on the cube.
Remove the display thread logic so that all the threads
post the captured buffer to display library.
Also remove the fullscreen / overlay mode of displaying
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
display-kmscube: Render full video buffer
The co-ordinates of texture values only use the 80% of the buffer as texture
Due to this, cropped video gets displayed
Fix this by changing the co-ordinates to 100%
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
The co-ordinates of texture values only use the 80% of the buffer as texture
Due to this, cropped video gets displayed
Fix this by changing the co-ordinates to 100%
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
display-kmscube: Render multiple videos on cube faces
Earlier implementation renders only one video on all the 6 faces of cube.
This patch enhances the library by adding support for:
* Using multiple textures
- Create an egl image and a texture once for every buffer object
- Extend buffer_kmscube to store the texture name and the associated face.
- All buffers allocated by one call to disp_get_vid_buffers are grouped
for one face
* Multithreaded post_vid_buffer
- As the buffers would be posted by multiple threads asynchronously,
post_vid_buffer would just update the buffer to be used for next
rendereing and wait
- Extend display_kmscube to store the current buffer for each face
- If the video threads are less than 6, then the textures are repeated
on the multiple faces.
- Also, the post_vid_buffer waits till the buffer is being used by the
GPU for texturing the face.
* Render thread
- disp_open starts a render thread which initializes gbm and gl
- The same thread will continue in a loop, where it reads from the
current buffers array and updates the textures accordingly.
- The textures are created from this thread if the buffer is being
rendered first time (it won't have valid texture name)
- This ensures that all the gl calls are called from a single thread
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Earlier implementation renders only one video on all the 6 faces of cube.
This patch enhances the library by adding support for:
* Using multiple textures
- Create an egl image and a texture once for every buffer object
- Extend buffer_kmscube to store the texture name and the associated face.
- All buffers allocated by one call to disp_get_vid_buffers are grouped
for one face
* Multithreaded post_vid_buffer
- As the buffers would be posted by multiple threads asynchronously,
post_vid_buffer would just update the buffer to be used for next
rendereing and wait
- Extend display_kmscube to store the current buffer for each face
- If the video threads are less than 6, then the textures are repeated
on the multiple faces.
- Also, the post_vid_buffer waits till the buffer is being used by the
GPU for texturing the face.
* Render thread
- disp_open starts a render thread which initializes gbm and gl
- The same thread will continue in a loop, where it reads from the
current buffers array and updates the textures accordingly.
- The textures are created from this thread if the buffer is being
rendered first time (it won't have valid texture name)
- This ensures that all the gl calls are called from a single thread
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
videnc2: Adding encoding completion msgs
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Use the EGLImage configuration provided by eglext.h
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
Signed-off-by: Anand Balagopalakrishnan <anandb@ti.com>
display-kms: Removed unnecessary include of libdce
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
[VIDENC] Adding Video encoder
This patch enables Accelerated(IVAHD) video encoding.
Currently tested for H264 and MPEG4 content.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
This patch enables Accelerated(IVAHD) video encoding.
Currently tested for H264 and MPEG4 content.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
VPE: util: Add NV12 support to VPE library
Current VPE library doesn't support NV12 as output format
App fails with Seg fault when trying to convert to NV12 format
Add this support
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Current VPE library doesn't support NV12 as output format
App fails with Seg fault when trying to convert to NV12 format
Add this support
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
utils: Wait after the buffer is posted
In utils library, post_*_buffer functions call the display specific
implementation and calls the maintain_playback_rate to force the FPS
The wait call should happen *after* the buffers are posted, not before
Correct this
This ensures that the buffer is not reused again immediately after
posting for display.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
In utils library, post_*_buffer functions call the display specific
implementation and calls the maintain_playback_rate to force the FPS
The wait call should happen *after* the buffers are posted, not before
Correct this
This ensures that the buffer is not reused again immediately after
posting for display.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Addition of new demo "kmscube with video"
This patch adds support for a new demo, which is to render video
on the face of the kmscube.
Usage:
viddec3test <video_file> --kmscube --connector <connector id>
There are other options that are are supported, please refer to
viddec3test --help for further details
The main additions in this patch are:
* Added support for allocation of the buffers via DRM
* Added support for the allocated buffers
* Added support for specifying the connector ID on the command line
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
This patch adds support for a new demo, which is to render video
on the face of the kmscube.
Usage:
viddec3test <video_file> --kmscube --connector <connector id>
There are other options that are are supported, please refer to
viddec3test --help for further details
The main additions in this patch are:
* Added support for allocation of the buffers via DRM
* Added support for the allocated buffers
* Added support for specifying the connector ID on the command line
Signed-off-by: Karthik Ramanan <a0393906@ti.com>
viddec3test: Fix for double free corruption error for dual decode-display usecase
Changed the elementary stream descriptor from global to include the
information in the demux structure as for dual decode usecase, the global
variable is overwritten by the second file and results in the memory free
corruption.
The esds data (elementary stream descriptor) is required by the mpeg4 streams
only, so removing the call that introduces delay in reading the file for other
types of streams like h264, etc.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Changed the elementary stream descriptor from global to include the
information in the demux structure as for dual decode usecase, the global
variable is overwritten by the second file and results in the memory free
corruption.
The esds data (elementary stream descriptor) is required by the mpeg4 streams
only, so removing the call that introduces delay in reading the file for other
types of streams like h264, etc.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
capturevpedisplay: added usage details
added command line arguments usage details
Signed-off-by: alaganraj <alaganraj.s@ti.com>
added command line arguments usage details
Signed-off-by: alaganraj <alaganraj.s@ti.com>
filevpedisplay: added usage details
added command line arguments usage details
Signed-off-by: alaganraj <alaganraj.s@ti.com>
added command line arguments usage details
Signed-off-by: alaganraj <alaganraj.s@ti.com>
dmabuftest: Remove misplaced error message
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
capturevpedisplay: Integrating vpe with vip and display module
vip captures the frames, which queued to vpe for processing
(scaling, deinterlace, csc), result will be displayed on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
vip captures the frames, which queued to vpe for processing
(scaling, deinterlace, csc), result will be displayed on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
filevpedisplay: vpe process the input from file and display
vpe gets input frames from file, process it (scaling, deinterlace, csc)
and displays output contents on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
vpe gets input frames from file, process it (scaling, deinterlace, csc)
and displays output contents on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
util: vpe: vpe specific common functions
used to integrate vpe with other modules.
Input buffer must be allocated in application, queue it to vpe
by passing buffer index
Output buffer allocated in vpe_output_init() as vpe output intended
to display on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
used to integrate vpe with other modules.
Input buffer must be allocated in application, queue it to vpe
by passing buffer index
Output buffer allocated in vpe_output_init() as vpe output intended
to display on LCD.
Signed-off-by: alaganraj <alaganraj.s@ti.com>
Added buf_lock and buf_unlock APIs in copycodec and yuvcopy test cases.
Fixed the issue of copycodec failure. omap_dmabuf_map was
not not done on input and output buffers
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Fixed the issue of copycodec failure. omap_dmabuf_map was
not not done on input and output buffers
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
viddec3test: Removed print statement for all cases except in inloop case
Removed the print statement for the default decode display that is originally
required for inloop scenario for the viddectest. Added a conditional check for
inloop test before printing this statement
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Removed the print statement for the default decode display that is originally
required for inloop scenario for the viddectest. Added a conditional check for
inloop test before printing this statement
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
dmabuftest: Capture simultaneously display one
This patch adds a feature to capture from multiple devices
in parallel thread.
At a time, only one thread is allowed to post buffers for the display.
By default, only one capture is assumed, number of captures specified
by command line argument 'multi'
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
This patch adds a feature to capture from multiple devices
in parallel thread.
At a time, only one thread is allowed to post buffers for the display.
By default, only one capture is assumed, number of captures specified
by command line argument 'multi'
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
v4l2: Fix conflict between libdrm and v4l2 fourcc
For ARGB8888 format, libdrm(AR24) and v4l2 framework(RGB4)
both use different fourcc.
This patch sets fourcc to RGB4 when calling v4l2 ioctl for
AR24 color format.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
For ARGB8888 format, libdrm(AR24) and v4l2 framework(RGB4)
both use different fourcc.
This patch sets fourcc to RGB4 when calling v4l2 ioctl for
AR24 color format.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Use 6 buffers instead of 3
Use 6 buffers instead of 3
Queue all the buffers before calling stream ON
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Use 6 buffers instead of 3
Queue all the buffers before calling stream ON
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
viddec3test:Add support looped test
This patch adds support for testing in a loop as below.
1. Open drm, display, dce devices once during init
2. Allocate dce buffers, input buffers
3. Viddec3_create
4. Viddec3_control/process till eof
5. Viddec3_delete
6. Got to 2 till loop iterations.
7. Close drm, display, dce devices once during deinit
example usage:
viddec3test -s <id>:wxh <file> --inloop --fps 30
The test runs infinitely until the user interrupts it.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
This patch adds support for testing in a loop as below.
1. Open drm, display, dce devices once during init
2. Allocate dce buffers, input buffers
3. Viddec3_create
4. Viddec3_control/process till eof
5. Viddec3_delete
6. Got to 2 till loop iterations.
7. Close drm, display, dce devices once during deinit
example usage:
viddec3test -s <id>:wxh <file> --inloop --fps 30
The test runs infinitely until the user interrupts it.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Viddec3test: Fix flush issue in co-planar buffers.
For single planar, the flush mechanism was returning the same buffer
again when the process call was called during flush.
Resetting the number of output buffers to 0 in addition to number of inBufs
resolves the issue. Libdce counts the number of address translations based
these counts.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
For single planar, the flush mechanism was returning the same buffer
again when the process call was called during flush.
Resetting the number of output buffers to 0 in addition to number of inBufs
resolves the issue. Libdce counts the number of address translations based
these counts.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Adapt copycodectest and yuvcopytest to libdce
closed dmabuf handles that were opened by the application.
Used new dsp_dce_alloc and dsp_dce_free functions as per new libdce.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
closed dmabuf handles that were opened by the application.
Used new dsp_dce_alloc and dsp_dce_free functions as per new libdce.
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
viddec3test: close file descriptor created for input buffer
omap_bo_dmabuf creates a dup file descriptor for the caller to use
the buffers. The caller needs to explicitly close the dup fd to avoid
any fd leak. Adding the close of fd for the input buffer stream.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
omap_bo_dmabuf creates a dup file descriptor for the caller to use
the buffers. The caller needs to explicitly close the dup fd to avoid
any fd leak. Adding the close of fd for the input buffer stream.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
viddec3test: Close the duplicate fd's created from omap_bo_dmabuf
omap_bo_dmabuf creates a dup fd for the application and the user
must close the fd after it is done with the usage otherwise there
would be file descriptors leak.
Also, cleaned up the code for the decoder_close function to delete
the decoder related in the correct order.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
omap_bo_dmabuf creates a dup fd for the application and the user
must close the fd after it is done with the usage otherwise there
would be file descriptors leak.
Also, cleaned up the code for the decoder_close function to delete
the decoder related in the correct order.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
viddec3test: Add support for multi-thread for multiple decode
For dual decode, use the pthreads to use the viddec3test application
as a multithread application rather than doing the the process calls
in a sequential way.
Signed-off-by: Ram Prasad <x0038811@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
For dual decode, use the pthreads to use the viddec3test application
as a multithread application rather than doing the the process calls
in a sequential way.
Signed-off-by: Ram Prasad <x0038811@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
display-kms: removed debug printf from post_vid_buffer
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
Signed-off-by: Chandramohan <chandramohan.c@ti.com>
Added updated makefile.am
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Added copycodectest and yuvcopy test source files
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
Signed-off-by: Pradeep Venkatasubbarao <pradeepv@ti.com>
disp-kms: Add support for dual capture
Using '--dual' option, two different video nodes can be openeed
Running the loopback in a thred with common display.
One thread runs in full screen while other is overlayed on top of it.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Using '--dual' option, two different video nodes can be openeed
Running the loopback in a thred with common display.
One thread runs in full screen while other is overlayed on top of it.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
disp-kms: Add noScale flag for overlays
This flag is used by post_vid_buffer to decide between
wheather a buffer is displayed as full screen or as overlay.
In case, of overlay, x and y are used as position co ordinates
of the overlay.
Also, added a function to set overlay to use plane[1] and set Z order
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
This flag is used by post_vid_buffer to decide between
wheather a buffer is displayed as full screen or as overlay.
In case, of overlay, x and y are used as position co ordinates
of the overlay.
Also, added a function to set overlay to use plane[1] and set Z order
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Don't call omap_bo_dmabuf multiple times
Each call to omap_bo_dmabuf returns a duplicated dmabuf fd
Therefore, fd from reqbuf (exported first time) will not match with
fd of the same buffer while queueing due to dup(fd)
Using buffer->fd array for saving dmabuf fds
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Each call to omap_bo_dmabuf returns a duplicated dmabuf fd
Therefore, fd from reqbuf (exported first time) will not match with
fd of the same buffer while queueing due to dup(fd)
Using buffer->fd array for saving dmabuf fds
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
dmabuftest: Enable dmabuftest app
Fixed configure.ac picking host machine kernel headers problem
Using AC_CHECK_HEADERS for this
Removing check for struct member to check support for dmabuf
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Fixed configure.ac picking host machine kernel headers problem
Using AC_CHECK_HEADERS for this
Removing check for struct member to check support for dmabuf
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
util/demuxer: Fix the memory leak
Free the memory for esds_data aloocated during demux_init once the
demux_deinit is called.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Free the memory for esds_data aloocated during demux_init once the
demux_deinit is called.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
v4l2capturedisplay: New capture and display app
This is a new app which captures buffers from v4l2 device and
displays via drm in fullscreeen.
Currently only memory mapped buffers are handled
Also, only YUYV format is supported for capture
v2->v3
======
Corrected coding style
Removed unused functions, debug code
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
This is a new app which captures buffers from v4l2 device and
displays via drm in fullscreeen.
Currently only memory mapped buffers are handled
Also, only YUYV format is supported for capture
v2->v3
======
Corrected coding style
Removed unused functions, debug code
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
viddec3test: Add the flush mechanism after end of file
When the end of file is encountered, the buffers need to be unlocked
and freed by adding the flush mechanism via the codec.
This adds the mechanism and removes the code where the fd were unlocked
during the decoder close.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
When the end of file is encountered, the buffers need to be unlocked
and freed by adding the flush mechanism via the codec.
This adds the mechanism and removes the code where the fd were unlocked
during the decoder close.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
disp-kms: Add support for deletion of the devices
Added the support for deleting the devices and the file descriptor
used by the kms display. Also added the reference counting for the
displays to check before deleting the global file descriptor which
is used by all the displays.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Added the support for deleting the devices and the file descriptor
used by the kms display. Also added the reference counting for the
displays to check before deleting the global file descriptor which
is used by all the displays.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
disp-kms: Add support for dual display
For dual display, a single file descriptor or fd could be used for by the two
displays so that it has master permissions for display planes, hence using a
single global file descriptor for kms display.
Adding the mechanism where the second display or connector uses a different
plane.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
For dual display, a single file descriptor or fd could be used for by the two
displays so that it has master permissions for display planes, hence using a
single global file descriptor for kms display.
Adding the mechanism where the second display or connector uses a different
plane.
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
dual display fix
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Makefile Fix for build issue
Added -lm -lavcodec in Makefile.am to avoid the linking issue
Signed-off-by: Chandramohan <a0131763@ti.com>
Added -lm -lavcodec in Makefile.am to avoid the linking issue
Signed-off-by: Chandramohan <a0131763@ti.com>
HACK ! added a hack to support MPEG4 format
Function implemented to read the mp4 file into a buffer and parses
for esds data required for ivahd_mpeg4dec decoder and it is copied on
top of the first input buffer.
Only 720p/1080p video is tested
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
Function implemented to read the mp4 file into a buffer and parses
for esds data required for ivahd_mpeg4dec decoder and it is copied on
top of the first input buffer.
Only 720p/1080p video is tested
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
HACK! added a hack to support mpeg2 video format
Padded width and height are same as width and height for mpeg2 format
this is a hack to support it and only 720p video is tested.
demux.c cleaned up and moved generic include headers to demux.h
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
Padded width and height are same as width and height for mpeg2 format
this is a hack to support it and only 720p video is tested.
demux.c cleaned up and moved generic include headers to demux.h
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
Fixed Memory leak in display pipeline
Earlier, all output buffers were not being freed
in the display path. Due this, the system will run out
of buffers and app would eventually not get memory resulting
in crash.
This patch fixes this issue of memory leak.
It is also ensured that Buffers are unlocked before freeing.
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
Earlier, all output buffers were not being freed
in the display path. Due this, the system will run out
of buffers and app would eventually not get memory resulting
in crash.
This patch fixes this issue of memory leak.
It is also ensured that Buffers are unlocked before freeing.
Signed-off-by: Chandramohan C <chandramohan.c@ti.com>
[DMABUF] dmabuf changes according to the IPC3.X
1. Changed vidde3test app to pass dmabuf fd for inbuf/outbuf.
2. buffer lock and unlock is added for outbuf.
3. X11 dependencies removed.
4. added dce_init/dce_deinit API exposed by libdce
Signed-off-by: Chandramohan <a0131763@ti.com>
1. Changed vidde3test app to pass dmabuf fd for inbuf/outbuf.
2. buffer lock and unlock is added for outbuf.
3. X11 dependencies removed.
4. added dce_init/dce_deinit API exposed by libdce
Signed-off-by: Chandramohan <a0131763@ti.com>
Changed Makefile.am to not include kernel headers
Fixed clashing of kernel headers with sys headers
Due to the v4l2.c (needed for dmabuftest)
Fixed clashing of kernel headers with sys headers
Due to the v4l2.c (needed for dmabuftest)
DEBIAN: debianization
Hack! disp-kmscube: reduce u/v by 10%
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
New display kmscube
Add a new display 'kmscube', based on the kmscube application by Arvin Schnell
and Rob Clark.
This display 'kmscube' draws a rotating 3d cube with EGL on kms display, with
video mapped as a texture on the cube faces.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Add a new display 'kmscube', based on the kmscube application by Arvin Schnell
and Rob Clark.
This display 'kmscube' draws a rotating 3d cube with EGL on kms display, with
video mapped as a texture on the cube faces.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
display kms: align width on 128 bytes to please Ducati
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
omx cam: do not select sensor for stereo mode
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
omx cam: add test app
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
util: do not redefine bool in C++
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
display-kms: add option to disable multiplanar
Signed-off-by: Hervé Fache <h-fache@ti.com>
Conflicts:
util/display-kms.c
Signed-off-by: Hervé Fache <h-fache@ti.com>
Conflicts:
util/display-kms.c
disp_open: do not crash on error
Signed-off-by: Hervé Fache <h-fache@ti.com>
Signed-off-by: Hervé Fache <h-fache@ti.com>
display: add close "virtual" function
Change the per-display close function into a proper "virtual" function
mechanism with function pointer in the display structure. This fixes the
segfault, when closing a kms display.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Change the per-display close function into a proper "virtual" function
mechanism with function pointer in the display structure. This fixes the
segfault, when closing a kms display.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test: handle non-multiplanar
Latest non-multiplanar dri2video in xf86-video-omap now uses a single buffer
under x11 instead of separate Y and U/V. Adapt viddec3test, like gst-ducati
does, and keep KMS multiplanar functional.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Latest non-multiplanar dri2video in xf86-video-omap now uses a single buffer
under x11 instead of separate Y and U/V. Adapt viddec3test, like gst-ducati
does, and keep KMS multiplanar functional.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
display: new multiplanar qualifier
Introduce a new "qualifier" on displays and display buffers, to keep track of
whether we have a single buffer for Y/U/V or if we have Y and U/V separated.
KMS display buffers are multiplanar, and X11 display buffers are
non-multiplanar since latest non-multiplanar dri2video in xf86-video-omap.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Introduce a new "qualifier" on displays and display buffers, to keep track of
whether we have a single buffer for Y/U/V or if we have Y and U/V separated.
KMS display buffers are multiplanar, and X11 display buffers are
non-multiplanar since latest non-multiplanar dri2video in xf86-video-omap.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test: new option --loop
Allow to playback in loop; in which case we rewind when reaching the end of the
stream.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Allow to playback in loop; in which case we rewind when reaching the end of the
stream.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
demux: add rewind
New demux_rewind() function, to seek to frame 0 of a stream and allow playback
in a loop.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
New demux_rewind() function, to seek to frame 0 of a stream and allow playback
in a loop.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test: new option --no-process
Allows to specify from command line that we do not actually want to call
VIDDEC3_process method. This is for benchmarking. Note that rate control will
still work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Allows to specify from command line that we do not actually want to call
VIDDEC3_process method. This is for benchmarking. Note that rate control will
still work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
disp: new option --debug and dynamic debug
We introduce a new DBG() macro for debug printing, which can be enabled or
disabled at runtime. This, to allow benchmarking.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
We introduce a new DBG() macro for debug printing, which can be enabled or
disabled at runtime. This, to allow benchmarking.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
disp: new option --no-post to disable buffers posting
This allows to disable display updates from command line for benchmarking
purposes. This is done by overriding the display post_buffer() and
post_vid_buffer() functions with empty ones. Note that rate control does still
work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
This allows to disable display updates from command line for benchmarking
purposes. This is done by overriding the display post_buffer() and
post_vid_buffer() functions with empty ones. Note that rate control does still
work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
disp: new option --fps to maintain playback rate
Add a new rate control mechanism to the generic display, to allow forcing the
playback rate from command line.
We add rate control calls in the generic display functions disp_post_buffer()
and disp_post_vid_buffer(). As this is in the generic display part, x11 and kms
(and future) displays benefit from that mechanism.
We use the mark() and usleep() functions for the rate control implementation,
and we do also filter a bit the sleep duration, to avoid being too "choppy".
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Add a new rate control mechanism to the generic display, to allow forcing the
playback rate from command line.
We add rate control calls in the generic display functions disp_post_buffer()
and disp_post_vid_buffer(). As this is in the generic display part, x11 and kms
(and future) displays benefit from that mechanism.
We use the mark() and usleep() functions for the rate control implementation,
and we do also filter a bit the sleep duration, to avoid being too "choppy".
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
mark(): handle one second change properly
We handle one second change properly. Two seconds and more will still lead to
erroneous deltas.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
We handle one second change properly. Two seconds and more will still lead to
erroneous deltas.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test: -h, --help command line options
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Ignore tags
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Add disp_close, disp_x11_close
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test: better initialization of buffer fields
We zero the allocated structures and initialize more fields to their correct
values. This, to avoid complaints from the codec.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
We zero the allocated structures and initialize more fields to their correct
values. This, to avoid complaints from the codec.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
add NOCONFIGURE support to autogen.sh
add --disable-x11 option
For example, if you have x11/libdri2 but don't want to build x11
support, or if you have a pre-dri2video version of libdri2.
For example, if you have x11/libdri2 but don't want to build x11
support, or if you have a pre-dri2video version of libdri2.
Preserve user $CFLAGS
Do not override the $CFLAGS variable internally to allow specifying it at
configure time. Keep the Linux kernel include path flags in a separate
LIN_CFLAGS variable.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
Do not override the $CFLAGS variable internally to allow specifying it at
configure time. Keep the Linux kernel include path flags in a separate
LIN_CFLAGS variable.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
util: silence the compiler
The compiler complains about this:
util.c: In function 'disp_get_vid_buffers':
util.c:76:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
This patch makes the counter variable unsigned too.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
The compiler complains about this:
util.c: In function 'disp_get_vid_buffers':
util.c:76:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
This patch makes the counter variable unsigned too.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>