- 18 Aug, 2022 2 commits
-
-
Nicolas Hug authored
Summary: This diff adds **`skipOperationNotPermittedPackets`** to `DecoderParameters`. Once that is set to `True`, it allows decoder to skip through those packets, that are causing `EPERM` errors and result into stoppage of consuming a stream. Reviewed By: jdsgomes Differential Revision: D38732706 fbshipit-source-id: a5cb64e14edda376e6ba240089ebee2e3a9865d0 Co-authored-by:Oleksandr Voietsa <ovoietsa@fb.com>
-
Nicolas Hug authored
Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/6432 According to the documentation the packet has to be freed after `av_read_frame()` call. ``` If pkt->buf is NULL, then the packet is valid until the next av_read_frame() or until avformat_close_input(). Otherwise the packet is valid indefinitely. In both cases the packet must be freed with av_packet_unref when it is no longer needed. ``` Differential Revision: D38747612 fbshipit-source-id: 2e4ccc8365d0d97e5da756ff9c1dcdf27ed323f0 Co-authored-by:
Oleksandr Voietsa <ovoietsa@fb.com>
-
- 30 May, 2022 1 commit
-
-
YosuaMichael authored
Differential Revision: D36671123 fbshipit-source-id: eb99f293978ed150bca60073115971586f0fa02a Co-authored-by:
Oleksandr Voietsa <ovoietsa@fb.com> Co-authored-by:
Nicolas Hug <contact@nicolas-hug.com>
-
- 25 Mar, 2022 1 commit
-
-
Bruno Korbar authored
* fix for FFMPEG 5.0 * Attempt to fix memory leak * early stop when mem alloc fails * fix c lint error * fix bug * revert changes * remove incorrect av_packet_free * add `av_packet_free` to subtitle stream * Addressing subtitle stream comments * addressing decoder changes * nit * addressing datumbox concernsz * averror push * addressing comments * Apply suggestions from code review * add new error code to documentation * re-introducing timeout * fix c++ syntax Co-authored-by:
Bruno Korbar <bkorbar@quansight.com> Co-authored-by:
Vasilis Vryniotis <datumbox@users.noreply.github.com> Co-authored-by:
Joao Gomes <jdsgomes@fb.com> Co-authored-by:
Joao Gomes <joaopsgomes@gmail.com>
-
- 03 Nov, 2021 1 commit
-
-
Bruno Korbar authored
* modify processPacket to support fast seek * add fastSeek to ProcessPacket decoder definition * add fastseek flag to DecoderParametersStruct * add fastseek flag to the process packet call * no default params in C++ implementation * enable flag in C++ implementation * make order of parameters more normal * register new seek with python api * [somewhat broken] test suite for keyframes using pyav * revert " changes * add type annotations to init * Adding tests * linter * Flake doesn't show up :| * Change from unitest to pytest syntax * add return type Co-authored-by:Prabhat Roy <prabhatroy@fb.com>
-
- 18 Oct, 2021 1 commit
-
-
Bruno Korbar authored
* initial commit * initial commit * flake8 * last nits Co-authored-by:Prabhat Roy <prabhatroy@fb.com>
-
- 16 Aug, 2021 1 commit
-
-
Bruno Korbar authored
* document video_sampler. * minor docs for decoder.cpp * descriptive comments for the stream.c * descriptive comments for decoder.cpp * per-stream descriptive comments * Fixing CLANG hopefully * addressing prabhat's comments * typo I think Co-authored-by:
Francisco Massa <fvsmassa@gmail.com> Co-authored-by:
Vasilis Vryniotis <datumbox@users.noreply.github.com>
-
- 09 Jun, 2021 1 commit
-
-
Prabhat Roy authored
* Fixed some ffmpeg deprecation warnings in decoder * Fixed clang error Co-authored-by:Vasilis Vryniotis <datumbox@users.noreply.github.com>
-
- 07 Jun, 2021 1 commit
-
-
Prabhat Roy authored
This reverts commit f6b6b510.
-
- 01 Jun, 2021 1 commit
-
-
Bruno Korbar authored
* remove unused functions * shut up annoying warnings via cast * prabhat's comments * Fixed clang format error Co-authored-by:Prabhat Roy <prabhatroy@fb.com>
-
- 31 Mar, 2021 1 commit
-
-
Francisco Massa authored
This reverts commit 3bfdb427.
-
- 24 Mar, 2021 1 commit
-
-
Bruno Korbar authored
* multithreading allowed in stream codec context * numThreads is passed as a decoder parameter. At this stage code should be unchanged * enabling multithreading in videoReader API * moving defaults to header files * replace long with int64_t because torchscript * docstring for Num threads * Enable codec-related heuristics as defaults * Update torchvision/csrc/io/decoder/stream.cpp Co-authored-by:
Vasilis Vryniotis <datumbox@users.noreply.github.com> * Fixing build errors * minor docs * Linting * updating defaults for the C++ function calls to be single threaded * adding special case for single threaded stuff Co-authored-by:
Vasilis Vryniotis <datumbox@users.noreply.github.com> Co-authored-by:
Francisco Massa <fvsmassa@gmail.com>
-
- 11 Feb, 2021 1 commit
-
-
Vasilis Vryniotis authored
Summary: Noticed this copy-paste error while reading D26026259 (https://github.com/pytorch/vision/commit/f16322b596c7dc9e9d67d3b40907694f29e16357) for inspiration to solve a similar problem Created from Diffusion's 'Open in Editor' feature. Reviewed By: datumbox Differential Revision: D26373056 fbshipit-source-id: d67f46243a280e8a59d12bad9dd730c1a3d512c9
-
- 25 Jan, 2021 1 commit
-
-
Vasilis Vryniotis authored
Summary: Upgrading service to platform009 enforces tls1.3 authentication. Specify tls cert file to decoder through config. Context: https://fb.workplace.com/groups/2020511478062223 Differential Revision: D26026259 fbshipit-source-id: e89f88ff7e41ec6b6a62e85d9015d78f6377aa65
-
- 10 Dec, 2020 1 commit
-
-
Vasilis Vryniotis authored
Summary: * Reduce unnecessary header inclusions in models and io. * Move autocast to separate folder and hide autograd implementation in an anonymous namespace. * Moving files in subfolders. Reviewed By: fmassa Differential Revision: D25461523 fbshipit-source-id: 756eeb6848aacaa474de4825ed4c1045d17e2cea
-
- 01 Dec, 2020 2 commits
-
-
Francisco Massa authored
* add UUID in LOG() in decoder * Fix lint * More lint
-
Francisco Massa authored
Summary: * Link libav change into fbcode * Set rw_timeout value Differential Revision: D23412524 fbshipit-source-id: 5755950be1b1b4c37cb0c3a69a8c875f8862a92c Co-authored-by:Keyun Tong <ktong@fb.com>
-
- 17 Mar, 2020 1 commit
-
-
Francisco Massa authored
* Base decoder for video. (#1747) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1747 Pull Request resolved: https://github.com/pytorch/vision/pull/1746 Added the implementation of ffmpeg based decoder with functionality that can be used in VUE and TorchVision. Reviewed By: fmassa Differential Revision: D19358914 fbshipit-source-id: abb672f89bfaca6351dda2354f0d35cf8e47fa0f * Integrated base decoder into VideoReader class and video_utils.py (#1766) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1766 Replaced FfmpegDecoder (incompativle with VUE) by base decoder (compatible with VUE). Modified python utilities video_utils.py for internal simplification. Public interface got preserved. Reviewed By: fmassa Differential Revision: D19415903 fbshipit-source-id: 4d7a0158bd77bac0a18732fe4183fdd9a57f6402 * Optimizating base decoder performance. (#1852) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1852 Changed base decoder internals for a faster clip processing. Reviewed By: stephenyan1231 Differential Revision: D19748379 fbshipit-source-id: 58a435f0a0b25545e7bd1a3edb0b1d558176a806 * Minor fix and decoder class members access. Summary: Found and fix a bug in cropping algorithm (simple mistyping). Also derived classes need access to some decoder class members, like initialization parameters - make it protected. Reviewed By: stephenyan1231, fmassa Differential Revision: D19895076 fbshipit-source-id: 691336c8e18526b085ae5792ac3546bc387a6db9 * Added missing header for less dependencies. (#1898) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1898 Include streams/samplers shouldn't depend on decoder headers. Add dependencies directly to the place where they are required. Reviewed By: stephenyan1231 Differential Revision: D19911404 fbshipit-source-id: ef322a053708405c02cee4562b456b1602fb12fc * Implemented VUE Asynchronous Decoder Summary: For Mothership we have found that asynchronous decoder provides a better performance. Differential Revision: D20026194 fbshipit-source-id: 627b91844b4e3f917002031dd32cb19c239f4ba8 * fix a bug in API read_video_from_memory (#1942) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1942 In D18720474, it introduces a bug in `read_video_from_memory` API. Thank weiyaowang for reporting it. Reviewed By: weiyaowang Differential Revision: D20270179 fbshipit-source-id: 66348c99a5ad1f9129b90e934524ddfaad59de03 * extend decoder to support new video_max_dimension argument (#1924) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1924 Extend `video reader` decoder python API in Torchvision to support a new argument `video_max_dimension`. This enables the new video decoding use cases. When setting `video_width=0`, `video_height=0`, `video_min_dimension != 0`, and `video_max_dimension != 0`, we can rescale the video clips so that its spatial resolution (height, width) becomes - (video_min_dimension, video_max_dimension) if original height < original width - (video_max_dimension, video_min_dimension) if original height >= original width This is useful at video model testing stage, where we perform fully convolution evaluation and take entire video frames without cropping as input. Previously, for instance we can only set `video_width=0`, `video_height=0`, `video_min_dimension = 128`, which will preserve aspect ratio. In production dataset, there are a small number of videos where aspect ratio is either extremely large or small, and when the shorter edge is rescaled to 128, the longer edge is still large. This will easily cause GPU memory OOM when we sample multiple video clips, and put them in a single minibatch. Now, we can set (for instance) `video_width=0`, `video_height=0`, `video_min_dimension = 128` and `video_max_dimension = 171` so that the rescale resolution is either (128, 171) or (171, 128) depending on whether original height is larger than original width. Thus, we are less likely to have gpu OOM because the spatial size of video clips is determined. Reviewed By: putivsky Differential Revision: D20182529 fbshipit-source-id: f9c40afb7590e7c45e6908946597141efa35f57c * Fixing samplers initialization (#1967) Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1967 No-ops for torchvision diff, which fixes samplers. Differential Revision: D20397218 fbshipit-source-id: 6dc4d04364f305fbda7ca4f67a25ceecd73d0f20 * Exclude C++ test files Co-authored-by:
Yuri Putivsky <yuri@fb.com> Co-authored-by:
Zhicheng Yan <zyan3@fb.com>
-
- 29 Jan, 2020 1 commit
-
-
Francisco Massa authored
This reverts commit 28b7f8ae.
-
- 27 Jan, 2020 1 commit
-
-
Francisco Massa authored
Summary: Pull Request resolved: https://github.com/pytorch/vision/pull/1747 Pull Request resolved: https://github.com/pytorch/vision/pull/1746 Added the implementation of ffmpeg based decoder with functionality that can be used in VUE and TorchVision. Reviewed By: fmassa Differential Revision: D19358914 fbshipit-source-id: abb672f89bfaca6351dda2354f0d35cf8e47fa0f Co-authored-by:
Yuri Putivsky <yuri@fb.com>
-