summaryrefslogtreecommitdiffstats
path: root/libavcodec/crystalhd.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9'Michael Niedermayer2013-11-041-3/+3
| | | | | | | | | | | | * commit 'da6506c607eda585ba4b15430cf3c9a2ce09c3a9': lavc: move AVCodecContext.pkt to AVCodecInternal Conflicts: libavcodec/internal.h libavcodec/rawdec.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* cosmetics: group remaining .name and .long_name.Clément Bœsch2013-10-041-6/+6
| | | | See b2bed9325.
* lavc/crystalhd: remove now unecessary buffer_hints.Clément Bœsch2013-03-131-2/+0
|
* lavc: factorize ff_{thread_,re,}get_buffer error messages.Clément Bœsch2013-03-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coccinelle profile used: @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_get_buffer(ctx, f, flags)) < 0) + return r; @@ expression r, ctx, f, loglevel, str; @@ -if ((r = ff_reget_buffer(ctx, f)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_reget_buffer(ctx, f)) < 0) + return r; @@ expression r, ctx, f, loglevel, str, flags; @@ -if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) { - av_log(ctx, loglevel, str); - return r; -} +if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) + return r; ...along with some manual patches for the remaining ones.
* CrystalHD: Port to ref-counted frame API.Philip Langdale2013-03-131-17/+18
| | | | | Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '759001c534287a96dc96d1e274665feb7059145d'Michael Niedermayer2013-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '759001c534287a96dc96d1e274665feb7059145d': lavc decoders: work with refcounted frames. Anton Khirnov (1): lavc decoders: work with refcounted frames. Clément Bœsch (47): lavc/ansi: reset file lavc/ansi: re-do refcounted frame changes from Anton fraps: reset file lavc/fraps: switch to refcounted frames gifdec: reset file lavc/gifdec: switch to refcounted frames dsicinav: resolve conflicts smc: resolve conflicts zmbv: resolve conflicts rpza: resolve conflicts vble: resolve conflicts xxan: resolve conflicts targa: resolve conflicts vmnc: resolve conflicts utvideodec: resolve conflicts tscc: resolve conflicts ulti: resolve conflicts ffv1dec: resolve conflicts dnxhddec: resolve conflicts v210dec: resolve conflicts vp3: resolve conflicts vcr1: resolve conflicts v210x: resolve conflicts wavpack: resolve conflicts pngdec: fix compilation roqvideodec: resolve conflicts pictordec: resolve conflicts mdec: resolve conflicts tiertexseqv: resolve conflicts smacker: resolve conflicts vb: resolve conflicts vqavideo: resolve conflicts xl: resolve conflicts tmv: resolve conflicts vmdav: resolve conflicts truemotion1: resolve conflicts truemotion2: resolve conflicts lcldec: fix compilation libcelt_dec: fix compilation qdrw: fix compilation r210dec: fix compilation rl2: fix compilation wnv1: fix compilation yop: fix compilation tiff: resolve conflicts interplayvideo: fix compilation qpeg: resolve conflicts (FIXME/TESTME). Hendrik Leppkes (33): 012v: convert to refcounted frames 8bps: fix compilation 8svx: resolve conflicts 4xm: resolve conflicts aasc: resolve conflicts bfi: fix compilation aura: fix compilation alsdec: resolve conflicts avrndec: convert to refcounted frames avuidec: convert to refcounted frames bintext: convert to refcounted frames cavsdec: resolve conflicts brender_pix: convert to refcounted frames cinepak: resolve conflicts cinepak: avoid using AVFrame struct directly in private context cljr: fix compilation cpia: convert to refcounted frames cscd: resolve conflicts iff: resolve conflicts and do proper conversion to refcounted frames 4xm: fix reference frame handling cyuv: fix compilation dxa: fix compilation eacmv: fix compilation eamad: fix compilation eatgv: fix compilation escape124: remove unused variable. escape130: convert to refcounted frames evrcdec: convert to refcounted frames exr: convert to refcounted frames mvcdec: convert to refcounted frames paf: properly free the frame data on decode close sgirle: convert to refcounted frames lavfi/moviesrc: use refcounted frames Michael Niedermayer (56): Merge commit '759001c534287a96dc96d1e274665feb7059145d' resolve conflicts in headers motion_est: resolve conflict mpeg4videodec: fix conflicts dpcm conflict fix dpx: fix conflicts indeo3: resolve confilcts kmvc: resolve conflicts kmvc: resolve conflicts h264: resolve conflicts utils: resolve conflicts rawdec: resolve conflcits mpegvideo: resolve conflicts svq1enc: resolve conflicts mpegvideo: dont clear data, fix assertion failure on fate vsynth1 with threads pthreads: resolve conflicts frame_thread_encoder: simple compilefix not yet tested snow: update to buffer refs crytsalhd: fix compile dirac: switch to new API sonic: update to new API svq1: resolve conflict, update to new API ffwavesynth: update to new buffer API g729: update to new API indeo5: fix compile j2kdec: update to new buffer API linopencore-amr: fix compile libvorbisdec: update to new API loco: fix compile paf: update to new API proresdec: update to new API vp56: update to new api / resolve conflicts xface: convert to refcounted frames xan: fix compile&fate v408: update to ref counted buffers v308: update to ref counted buffers yuv4dec: update to ref counted buffers y41p: update to ref counted frames xbm: update to refcounted frames targa_y216: update to refcounted buffers qpeg: fix fate/crash cdxl: fix fate tscc: fix reget buffer useage targa_y216dec: fix style msmpeg4: fix fate h264: ref_picture() copy fields that have been lost too update_frame_pool: use channel field h264: Put code that prevents deadlocks back mpegvideo: dont allow last == current wmalossless: fix buffer ref messup ff_alloc_picture: free tables in case of dimension mismatches h264: fix null pointer dereference and assertion failure frame_thread_encoder: update to bufrefs ec: fix used arrays snowdec: fix off by 1 error in dimensions check h264: disallow single unpaired fields as references of frames Paul B Mahol (2): lavc/vima: convert to refcounted frames sanm: convert to refcounted frames Conflicts: libavcodec/4xm.c libavcodec/8bps.c libavcodec/8svx.c libavcodec/aasc.c libavcodec/alsdec.c libavcodec/anm.c libavcodec/ansi.c libavcodec/avs.c libavcodec/bethsoftvideo.c libavcodec/bfi.c libavcodec/c93.c libavcodec/cavsdec.c libavcodec/cdgraphics.c libavcodec/cinepak.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/dsicinav.c libavcodec/dvdec.c libavcodec/dxa.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/eatgq.c libavcodec/eatgv.c libavcodec/eatqi.c libavcodec/error_resilience.c libavcodec/escape124.c libavcodec/ffv1.h libavcodec/ffv1dec.c libavcodec/flicvideo.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_direct.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/huffyuvdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo2.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/jvdec.c libavcodec/kgv1dec.c libavcodec/kmvc.c libavcodec/lagarith.c libavcodec/libopenjpegdec.c libavcodec/mdec.c libavcodec/mimic.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mmvideo.c libavcodec/motion_est.c libavcodec/motionpixels.c libavcodec/mpc7.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo.h libavcodec/msrle.c libavcodec/msvideo1.c libavcodec/nuv.c libavcodec/options_table.h libavcodec/pcx.c libavcodec/pictordec.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/pthread.c libavcodec/qpeg.c libavcodec/qtrle.c libavcodec/r210dec.c libavcodec/rawdec.c libavcodec/roqvideodec.c libavcodec/rpza.c libavcodec/smacker.c libavcodec/smc.c libavcodec/svq1dec.c libavcodec/svq1enc.c libavcodec/targa.c libavcodec/tiertexseqv.c libavcodec/tiff.c libavcodec/tmv.c libavcodec/truemotion1.c libavcodec/truemotion2.c libavcodec/tscc.c libavcodec/ulti.c libavcodec/utils.c libavcodec/utvideodec.c libavcodec/v210dec.c libavcodec/v210x.c libavcodec/vb.c libavcodec/vble.c libavcodec/vcr1.c libavcodec/vmdav.c libavcodec/vmnc.c libavcodec/vp3.c libavcodec/vp56.c libavcodec/vp56.h libavcodec/vp6.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/xl.c libavcodec/xxan.c libavcodec/zmbv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-02-161-2/+2
| | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: deMpegEncContextize Conflicts: libavcodec/dxva2_h264.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_mb_template.c libavcodec/h264_parser.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264_sei.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* lavc: fix decode_frame() third parameter semantics for rest of video decodersPaul B Mahol2012-12-051-11/+11
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* Merge commit '594d4d5df3c70404168701dd5c90b7e6e5587793'Michael Niedermayer2012-12-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '594d4d5df3c70404168701dd5c90b7e6e5587793': lavc: add a wrapper for AVCodecContext.get_buffer(). Conflicts: libavcodec/4xm.c libavcodec/8svx.c libavcodec/bmv.c libavcodec/cljr.c libavcodec/cscd.c libavcodec/dnxhddec.c libavcodec/dpcm.c libavcodec/dpx.c libavcodec/eacmv.c libavcodec/eamad.c libavcodec/frwu.c libavcodec/g723_1.c libavcodec/gifdec.c libavcodec/idcinvideo.c libavcodec/iff.c libavcodec/indeo3.c libavcodec/internal.h libavcodec/interplayvideo.c libavcodec/kmvc.c libavcodec/mpc7.c libavcodec/mpegaudiodec.c libavcodec/pcx.c libavcodec/pngdec.c libavcodec/pnmdec.c libavcodec/rl2.c libavcodec/snow.c libavcodec/targa.c libavcodec/tscc.c libavcodec/txd.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vb.c libavcodec/vmdav.c libavcodec/vp56.c libavcodec/vqavideo.c libavcodec/wavpack.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/yop.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* crystalhd: fix missing braces warningMichael Niedermayer2012-11-031-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '716d413c13981da15323c7a3821860536eefdbbb'Michael Niedermayer2012-10-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '716d413c13981da15323c7a3821860536eefdbbb': Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat Conflicts: doc/examples/muxing.c ffmpeg.h ffmpeg_filter.c ffmpeg_opt.c ffplay.c ffprobe.c libavcodec/8bps.c libavcodec/aasc.c libavcodec/aura.c libavcodec/avcodec.h libavcodec/avs.c libavcodec/bfi.c libavcodec/bmp.c libavcodec/bmpenc.c libavcodec/c93.c libavcodec/cscd.c libavcodec/cyuv.c libavcodec/dpx.c libavcodec/dpxenc.c libavcodec/eatgv.c libavcodec/escape124.c libavcodec/ffv1.c libavcodec/flashsv.c libavcodec/fraps.c libavcodec/h264.c libavcodec/huffyuv.c libavcodec/iff.c libavcodec/imgconvert.c libavcodec/indeo3.c libavcodec/kmvc.c libavcodec/libopenjpegdec.c libavcodec/libopenjpegenc.c libavcodec/libx264.c libavcodec/ljpegenc.c libavcodec/mjpegdec.c libavcodec/mjpegenc.c libavcodec/motionpixels.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo_enc.c libavcodec/pamenc.c libavcodec/pcxenc.c libavcodec/pgssubdec.c libavcodec/pngdec.c libavcodec/pngenc.c libavcodec/pnm.c libavcodec/pnmdec.c libavcodec/pnmenc.c libavcodec/ptx.c libavcodec/qdrw.c libavcodec/qpeg.c libavcodec/qtrleenc.c libavcodec/raw.c libavcodec/rawdec.c libavcodec/rl2.c libavcodec/sgidec.c libavcodec/sgienc.c libavcodec/snowdec.c libavcodec/snowenc.c libavcodec/sunrast.c libavcodec/targa.c libavcodec/targaenc.c libavcodec/tiff.c libavcodec/tiffenc.c libavcodec/tmv.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/vb.c libavcodec/vp3.c libavcodec/wnv1.c libavcodec/xl.c libavcodec/xwddec.c libavcodec/xwdenc.c libavcodec/yop.c libavdevice/v4l2.c libavdevice/x11grab.c libavfilter/avfilter.c libavfilter/avfilter.h libavfilter/buffersrc.c libavfilter/drawutils.c libavfilter/formats.c libavfilter/src_movie.c libavfilter/vf_ass.c libavfilter/vf_drawtext.c libavfilter/vf_fade.c libavfilter/vf_format.c libavfilter/vf_hflip.c libavfilter/vf_lut.c libavfilter/vf_overlay.c libavfilter/vf_pad.c libavfilter/vf_scale.c libavfilter/vf_transpose.c libavfilter/vf_yadif.c libavfilter/video.c libavfilter/vsrc_testsrc.c libavformat/movenc.c libavformat/mxf.h libavformat/utils.c libavformat/yuv4mpeg.c libavutil/imgutils.c libavutil/pixdesc.c libswscale/input.c libswscale/output.c libswscale/swscale_internal.h libswscale/swscale_unscaled.c libswscale/utils.c libswscale/x86/swscale_template.c libswscale/x86/yuv2rgb.c libswscale/x86/yuv2rgb_template.c libswscale/yuv2rgb.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* rename missed CodecID to AVCodecIDMichael Niedermayer2012-08-071-1/+1
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
* Fix misc swapped dot and carriage returns in av_log calls.Clément Bœsch2012-08-031-1/+1
|
* cosmetics: minor libavcodec spelling errorsLou Logan2012-06-291-1/+1
| | | | | | Also update some common misspelled words in patcheck Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: Improve detection of field pair -> two fields content.Philip Langdale2012-05-061-3/+12
| | | | | | | | | | Istvan Sebok provided a sample where field pair -> two fields content was being misdetected by the existing logic. I added an additional test to check the input picture type as identified by our h.264 parser. Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: Set aspect ratio.sebist2012-04-171-0/+50
| | | | | | Signed-off-by: sebist <sebok.istvan@gmail.com> Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: fix pStride value.sebist2012-04-171-2/+1
| | | | | | Signed-off-by: sebist <sebok.istvan@gmail.com> Reviewed-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: Remove EXPERIMENTAL flag for known good formats.Philip Langdale2012-03-251-5/+5
| | | | | | | | | With the flag in place, it's hard to actually use the decoder, and I'm happy with how it works, with the exception of DivX3 where I've never found a sample that worked that I was confident actually matched what the hardware claimed to support. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: Back up extradata to allow decoder reinit to work.Philip Langdale2012-01-221-0/+26
| | | | | | | | | | | | | | This was a regression that came in when I switched to using the h.264 annex b filter all the time. As the filter modifies extradata, its use violates the statelessness assumption that exists in the 'ffmpeg' command line tool, and maybe elsewhere. It assumes that a docoder can be reinitalised and pointed to an existing stream and get the same results. For now, the only way to meet this requirement is to backup the extradata. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD: Initialise variables to silence valgrind.Philip Langdale2012-01-221-2/+2
| | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* AVOptions: rename remaining FF_OPT_TYPE_* to AV_OPT_TYPE_*.Clément Bœsch2011-10-171-1/+1
|
* CrystalHD: Always identify H.264 streams as Annex B.Philip Langdale2011-06-211-6/+2
| | | | | | | Now that we're converting all streams to Annex B format, we can identify them as such to the hardware. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Always send filtered H.264 stream to hardware.Philip Langdale2011-06-211-9/+13
| | | | | | | | As we're now always running mp4 format streams through the annex b filter, it makes sense to pass the filtered stream down, as libcrystalhd would be doing the conversion internally anyway. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Simplfy extradata handling for non-Annex B content.Philip Langdale2011-06-211-18/+3
| | | | | | | | | | Originally, we needed to restore the original extradata after initialising the mp4toannexb filter because mplayer would end up taking two passes through the init sequence for the same stream and end up miscategorising the stream. This doesn't seem to happen anymore, making the backup/restore process unnecessary. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Use mp4toannexb bitstream filter.Philip Langdale2011-06-131-11/+37
| | | | | | | | | | | The H.264 parser that we use to detect interlacing can only handle an Annex B stream, so we need to actually use the filter. This is unfortunate as the crystalhd library is already doing this conversion internally. A future change will reorganise the decode path more completely so that we can feed the converted stream into libcrystalhd and avoid the second conversion. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Keep mp4toannexb filter around for entire decoder lifetime.Philip Langdale2011-06-131-5/+7
| | | | | | | In preparation for using the filter on the actual bitstream, we need to extend it's lifetime to match that of the decoder. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Add auto-detection of packed b-frame bug.Philip Langdale2011-04-301-1/+18
| | | | | | | | | | | | | | | | I still don't fully understand the cause but the difference between the samples that trigger the bug and the samples that don't is that the former uses delay frames and the later uses drop frames as placeholders for the packed frame. So, if we see the one type of frame, we can assume the bug will or won't be present. Right now, I'm detecting the frame types by size, which may not be safe in general, but given the specific codec and file type, I expect any scenario where we encounter these frames where they aren't being used for b-frame packing won't care one way or another whether the work around is in effect or not. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Add AVOption to configure hardware downscaling.Philip Langdale2011-04-241-0/+67
| | | | | | | | | | | | | | The CrystalHD hardware can do scaling, which is particularly desirable when dealing with some high resolution clips that take so long to decode and copy out that they end up playing back slower than realtime. By using scaling, we can make the output frames smaller and reduce the copy out time. This option takes the desired horizontal width in pixels, and the hardware will do an aspect-scale. Upscaling is not supported and the hardware will simply ignore any request to do so. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Fix usage of h264 parser.Philip Langdale2011-04-161-5/+11
| | | | | | | | | I was using the wrong value to track the position of the parser in the stream. For an error-free stream, the size of the frame and number of bytes consumed will be the same, but in an error situation they can diverge. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Improve detection of h.264 content.Philip Langdale2011-04-081-38/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As previously discussed, the CrystalHD hardware returns exceptionally useless information about interlaced h.264 content - to the extent that it's not possible to distinguish most MBAFF and PAFF content until it's too late. In an attempt to compensate for this, I'm introducing two mechanisms: 1) Peeking at the picture number of the next picture The hardware provides a capability to peek the next picture number. If it is the same as the current picture number, then we are clearly dealing with two fields and not a frame or fieldpair. If this always worked, it would be all we need, but it's not guaranteed to work. Sometimes, the next picture may not be decoded sufficiently for the number to be known; alternately, a corruption in the stream may cause the hardware to refuse to return the number even if the next intact frame is decoded. In either case, the query will return 0. If we are unable to peek the next picture number, we assume that the picture is a frame/fieldpair and return it accordingly. If that turns out to be incorrect, we discard the second field, and the user has to live with the glitch. In testing, false detection can occur for the first couple of seconds, and then the pipeline stabalizes and we get correct detection. 2) Use the h264_parser to detect when individual input fields have been combined into an output fieldpair. I have multiple PAFF samples where this behaviour is detected. The peeking mechanism described above will correctly detect that the output is a fieldpair, but we need to know what the input type was to ensure pipeline stability (only return one output frame per input frame). If we find ourselves with an output fieldpair, yet the input picture type was a field, as reported by the parser, then we are dealing with this case, and can make sure not to return anything on the next decode() call. Taken together, these allow us to remove the hard-coded hacks for different h.264 types, and we can clearly describe the conditions under which we can trust the hardware's claim that content is interlaced. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Carry picture type from input to output picture.Philip Langdale2011-04-081-2/+19
| | | | | | | | Now that we know the type of the input picture, we have to bring that information to the output picture to help identify its type. We do this by adding a field to the opaque_list node. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Bring in h.264 parser to establish picture type.Philip Langdale2011-04-081-0/+29
| | | | | | | | As the hardware is unreliable, we will have to use the h.264 parser to identify whether an input picture is a field or a frame. This change loads the parser and extracts the picture type. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Change opaque_list_pop to return the node.Philip Langdale2011-04-081-18/+25
| | | | | | | | In preparation for adding additional fields to the node, return the node instead of the pts value. This requires the caller to free the node. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Fix whitespace after previous change.Philip Langdale2011-04-081-29/+29
| | | | | | 'git diff -w' confirmed to return nothing. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Handle different h.264 MBAFF packing.Philip Langdale2011-04-081-10/+15
| | | | | | | | | | | | | I found another MBAFF sample where the input:output pattern is the same as mpeg2 and vc1 (fieldpair input, individual field output). While I'm not sure how you can output individual fields from MBAFF, if I apply the mpeg2/vc1 handling to this file, it plays correctly. So, this changes the detection algorithm to handle the known cases. Whitespace will be fixed in a separate change. Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Remove redundant interlaced check.Philip Langdale2011-03-261-2/+1
| | | | Signed-off-by: Philip Langdale <philipl@overt.org>
* CrystalHD: Add 2011 to CopyrightPhilip Langdale2011-03-261-1/+1
| | | | Signed-off-by: Philip Langdale <philipl@overt.org>
* Revert "CrystalHD: Improve interlaced h.264 support."Philip Langdale2011-03-261-134/+82
| | | | This reverts commit e44073ca5e7143934ffa79d317dc65150db1637c.
* Revert "CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants."Philip Langdale2011-03-261-44/+15
| | | | This reverts commit 4ab57cffba1d151898837a9a07a6a72f78716702.
* Revert "CrystalHD: Refine heuristic logic."Philip Langdale2011-03-261-28/+29
| | | | This reverts commit f968ef922d5b1e1ba29145bceaa0278ece4f88e0.
* CrystalHD: Refine heuristic logic.Philip Langdale2011-03-261-29/+28
|
* CrystalHD: Add heuristics to try and distinguish h.264 PAFF variants.Philip Langdale2011-03-261-15/+44
| | | | | | | | | | | | | | | | | | | | | | As previously discussed, the CrystalHD hardware treats some PAFF clips different from others; even when input fields are always in separate packets, the hardware might return a single fieldpair for one clip and individual fields for another. Given the bogus flags set by the hardware, it is impossible to distinguish these two cases without knowing about the current picture and the next one. The hardware can usually provide the picture number of the next picture and when that is available, we can detect the two cases. When it is not available, we have to guess - and find out later if we were right or wrong. With this change, clips will play correctly unless they are PAFF where individual fields are returned *and* no next picture number is available. Generally speaking, the incorrect cases arise in the first couple of seconds of a clip as the delay calibration takes place. Once that's set, things work fine.
* CrystalHD: Improve interlaced h.264 support.Philip Langdale2011-03-261-82/+134
| | | | | | | | | | | | | | | | | | | | | As previously discussed, the CrystalHD hardware returns exceptionally useless information about interlaced h.264 content - to the extent that it's not possible to distinguish MBAFF and PAFF content until it's too late. This change introduces use of the h264_parser to help bridge the gap; it can indicate if the input data is PAFF fields or not. With this clarity, some of heuristics can be removed from the code, making this less convoluted. Finally, I found an MBAFF clip that acts like non h.264 content so I had to make allowances for that. Note that I still cannot distinguish between two forms of PAFF, where the hardware either returns individual fields or a field-pair. It's not clear that there's even a spec relevant difference between the two forms, as opposed to hardware ideosyncracies.
* CrystalHD: Use doxygen compatible comments where relevant.Philip Langdale2011-03-171-4/+4
| | | | | Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* CrystalHD decoder support v7Philip Langdale2011-03-101-0/+960
The Broadcom CrystalHD decoder chips provide hardware video decoding for a number of video formats. It does so using a memory:memory interface where a compressed bitstream is fed in and decompressed pictures are copied out. As such, it works independent of any graphics hardware in the system. Features supported in this initial version: * Support for Linux (using current drivers/library from git.wilsonet.com) * Support for 70015 hardware * Formats: MPEG2, MPEG4 Part 2, H.264, VC1 and DivX 3.11 (untested) * Progressive content * Non-H.264 Interlaced content * H.264 MBAFF content Features missing in this initial version: * Support for OSX (might work - untested) * Support for Windows * Support for 70012 hardware * H.264 PAFF content Signed-off-by: Philip Langdale <philipl@overt.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud