Re: [Libav-user] Where and how to add a custom hardware decoder in libavcodec ?

2016-06-09 Thread ssshukla26
Can anyone please guide me on this ! -- View this message in context: http://libav-users.943685.n4.nabble.com/Where-and-how-to-add-a-custom-hardware-decoder-in-libavcodec-tp4662203p4662233.html Sent from the libav-users mailing list archive at Nabble.com.

[Libav-user] Where and how to add a custom hardware decoder in libavcodec ?

2016-06-02 Thread ssshukla26
Hi, I am new to ffmpeg, am working on a *custom board* which has its own hardware decoder. I have a linux application for hardware decoder which take a h264 file as input and provides a yuv file as output. It working fine, now we are extending this support to *gstreamer* and *ffmpeg*

[Libav-user] Where to define output format for a decoder ?

2016-07-14 Thread ssshukla26
I am implementing a custom decoder for qualcomm chipset. This custom decoder output is nv12 tiled format. We have already patched ffmpeg with nv12 tile format along with software conversion from nv12 tile to yuv420p under libswscale. My question is how can I specify output format for a decoder ?

Re: [Libav-user] Unable to link libavutil with libswscale !

2016-08-04 Thread ssshukla26
tps://github.com/ssshukla26/NV12Tile-To-NV12-Conversion> which we have used to implement *size[]* array inside *av_image_fill_pointers* function. Can you please help us to put correct *AVPixFmtDescriptor.comp* values for nv12_tiled format under *libavutil/pixdesc.c *, so that we can get actual li

[Libav-user] Suggest how to propery fill incomming AVFrame pointer in a decoder !

2016-08-13 Thread ssshukla26
My video decoder is decoding both mp4 files and h264 files. I just wanted to make sure that the way am filling incoming AVFrame pointer is proper or not, code snippet as shown below. int *qhw_decode_frame* (AVCodecContext *avctx, *void *pFrame*, int *got_frame, AVPacket *avpkt) { ... AVFrame

Re: [Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-13 Thread ssshukla26
Yup, extradata has the header data, I was able to decode mp4 data correctly by passing extradata to my decoder. -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Need-to-understand-where-demuxer-for-mp4-is-hooked-with-h264-decoder-tp4662406p4662416.html Sent

Re: [Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-10 Thread ssshukla26
Hi, It seems *demuxer for mp4* is sending data to decoder but without *headers* (i.e. sps and pps) and the packets received is having only *size* (first 4 bytes) at the beginning. My decoder need sps and pps else its giving error that "No proper header" while decoding. Can you please suggest what

Re: [Libav-user] How to process incomming AVFrame pointer in a decoder ?

2016-07-18 Thread ssshukla26
Hi guyz, What I found out is that the decoder is getting *avpkt->size* as *0 (zero)* under the below function after some 67 frames and hence it closing abruptly. *int qhw_decode_frame (AVCodecContext *avctx, void *pframe, int *got_frame, AVPacket *avpkt);* Can anyone please help. Am so much

[Libav-user] decoding for stream 0 failed ?

2016-07-20 Thread ssshukla26
Hi, I am implementing a custom decoder of qualcomm chipset into ffmpeg, have a working linux application for the same. I am able to run decoder, but its closing with aN error as show below. Note: The output format is nv12 tiled, we have already added support for nv12 tile to yuv420p conversion

[Libav-user] How to process incomming AVFrame pointer in a decoder ?

2016-07-15 Thread ssshukla26
Hi, I am implementing the custom decoder of qualcomm chipset into ffmpeg, have a working linux application for the same. Every thing is working fine except one thing, that is I am unable to fill decoded data into in coming AVFrame pointer. My implementation of decoder has the following function

[Libav-user] Failed to open codec in av_find_stream_info ?

2016-07-13 Thread ssshukla26
Hi, we are adding a custom decoder for qualcomm chipset into ffmpeg. We have made a linux application which decodes the *h264* file into *nv12 tiled* yuv raw data file successfully. Our aim is to patch ffmpeg with the custom decoder and to upstream the same, so that anyone on qualcomm chipset

Re: [Libav-user] Failed to open codec in av_find_stream_info ?

2016-07-13 Thread ssshukla26
The problem is with init function of decoder, its declaration is as follow, *int qhw_decode_init (AVCodecContext *avctx);* am getting avctx->width as zero (0) and avctx->heigth as zero(0). So I initialize my decoder with constant values, as decoder->width=1920 and decoder->height=1080. After

[Libav-user] How to use different decoders under demuxing_decoding.c example ? ?

2016-07-14 Thread ssshukla26
Hi, I have added a custom h264 decoder for qualcomm chipset under libavcodec, with code ID "*AV_CODEC_ID_H264*" and name "*h264_qhw*". I want to test it's working with ffmpeg api's, am not able to see where its failing under ffmpeg command line. So I opted for *demuxing_decoding.c* example and

[Libav-user] Unable to link libavutil with libswscale !

2016-07-08 Thread ssshukla26
We are adding *nv12 tile* to *yuv420p* format conversion support in *libswscale*. While adding the support we also found out that the size calculation under *av_image_fill_pointers function* under *libavutil/imgutils.c* file also needed to be changed. Hence we added support under *libavutil* by

Re: [Libav-user] Unable to link libavutil with libswscale !

2016-07-10 Thread ssshukla26
Attaching the patch. PFA. 0001-NV12-Tile-pixel-format-support-added.patch I have just changed the file name *nv12tiledconversion.c* to *nv12tiled2nv12.c*. Note :- We are planning to

[Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-08 Thread ssshukla26
Hi, I am decoding a *mp4 file* using *h264 decoder* (as follows), so where does this demuxer for mp4 is hooked with h264 decoder in the source ? Please help I want to hook the demuxer for mp4 with my own decoder. # *ffmpeg -f mp4 -i no_mans_sky.mp4 out.yuv* ffmpeg version N-80954-g58dc8bb

Re: [Libav-user] Need to understand where demuxer for mp4 is hooked with h264 decoder ?

2016-08-09 Thread ssshukla26
Ok, will provide you the patch soon. Till then can you tell me that where *demuxer for mp4* is hooked with the *default h264 decoder* in the source Or its hooked via *isom.c* ? Can you please clear that doubt of mine ! P.S. :- My decoder is able to decode H264 files and it is using

Re: [Libav-user] imgutils.h decode dst buffer going from avpicture_fill to av_image_fill_arrays

2016-08-22 Thread ssshukla26
For software scaling the example is as follows, might help you. int main(int argc, char **argv) { const char *src_filename = NULL; const char *src_resolution = NULL; const char *src_pix_fmt_name = NULL; enum AVPixelFormat src_pix_fmt = AV_PIX_FMT_NONE; uint8_t *src_data[4];

Re: [Libav-user] Suggest how to propery fill incomming AVFrame pointer in a decoder !

2016-08-19 Thread ssshukla26
What is the difference between *av_frame_get_buffer* and *av_image_alloc* function ? Cause using anyone of 'em, I am getting the same output ! -- View this message in context:

Re: [Libav-user] imgutils.h decode dst buffer going from avpicture_fill to av_image_fill_arrays

2016-08-19 Thread ssshukla26
For example let suppose "decoder->dst_data[0]" has YUV buffer and its alignment is 1. --- //Allocate AVFrame data and linesize av_image_alloc(avframe->data, avframe->linesize,

[Libav-user] Demuxer not giving proper data to decoder ?

2016-09-13 Thread ssshukla26
I have added support for one of our custom decoder (with id *AV_CODEC_ID_H264*) in ffmpeg source, and its working fine with *h264* and *mp4* files. When playing mp4 file am seeing macroblocks artefact. So debugging further, I dump the in-coming packets from demuxer before decoding and found that

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
under *./libavcodec/hevc_mp4toannexb_bsf.c* there is note as below. When private_spspps is zero then spspps_buf points to global extradata and bsf does replace a global extradata to own-allocated version (default behaviour). When private_spspps is non-zero the bsf uses a private version of

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
Solved it by following code under *decode* function of decoder. if(*av_bitstream_filter_filter*(decoder->bsf, avctx, "*private_spspps_buf*", >pkt.data, >pkt.size, avpkt->data, avpkt->size, !!(avpkt->flags &

Re: [Libav-user] Memory leak while using ff_get_buffer ?

2016-09-21 Thread ssshukla26
After some searching, I found out that in some decoders the incoming /avframe pointer/ is unreferenced using *av_frame_unref* api, and then *ff_get_buffer* is called. Can someone please explain why such things are done ! I am so much confused . -- View this message in context:

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
After debugging, I realized that my decoder is getting data in *AVCC* format, so on application side I added bit stream filter "*h264_mp4toannexb*" and everything worked. No artefacts at all. So to make sure that my decoder use data in *AnnexB* format, I added *h264_mp4toannexb* filter *inside*

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
Yup. that's true. But I don't understand one thing, my decoder is working properly with a *h264* file in proper AnnexB data format, and when using *mp4* file which is in AVCC format, the demuxing which should take place is not taking place at all ! Does that mean I need to configure the demuxer

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
It runs properly, with "*h264*" (default) software decoder without using bit stream filter. Which makes me believe that I must be missing something in configuring decoder to receive proper demuxed data, but I dont know what I am missing ! -- View this message in context:

Re: [Libav-user] Demuxer not giving proper data to decoder ?

2016-09-15 Thread ssshukla26
Ok. I might be wrong, but the demuxers are only for extracting data out of the container ! Right ? So If that the case, any decoder will receive data in *AVCC* format when *mp4* files are used as input ? So one must convert data from avcc to annexb format under the decoder ? -- View this

[Libav-user] Memory leak while using ff_get_buffer ?

2016-09-20 Thread ssshukla26
I am using *ff_get_buffer* in my decoder, it seems to me that using this API causing some memory leak. Please help, need your suggestions on this ! -- View this message in context: http://libav-users.943685.n4.nabble.com/Libav-user-Memory-leak-while-using-ff-get-buffer-tp4662720.html Sent from

Re: [Libav-user] Suggest how to propery fill incomming AVFrame pointer in a decoder !

2016-08-24 Thread ssshukla26
Hi, I am able to fill incoming AVFrame pointers. Can anyone suggest how to wrap buf[] array of the avframe pointers ! I am too much stuck at this point . Below the code, where *decoder->dst_data[]* array consist of Y, U and V buffers of image. And *decoder->dst_linesize[]* array consist of