Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@beanjoy
Copy link
Contributor

@beanjoy beanjoy commented Aug 11, 2023

After changing the output format, need to modify the outputVideoFormat, otherwise the outputVideoFormat is always CV_CAP_MODE_BGR, and an error will occur when converting the format in retrieveVideoFrame(), and will always enter "case CV_CAP_MODE_BGR:" process.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

After changing the output format, need to modify the outputVideoFormat, otherwise the outputVideoFormat is always CV_CAP_MODE_BGR, and an error will occur when converting the format in retrieveVideoFrame(), and will always enter "case CV_CAP_MODE_BGR:" process.
@asmorkalov
Copy link
Contributor

@beanjoy Thanks a lot for the patch! It looks reasonable for me. Could you add some test for it to https://github.com/opencv/opencv/blob/4.x/modules/videoio/test/test_mfx.cpp

@asmorkalov asmorkalov added the pr: needs test New functionality requires minimal tests set label Aug 11, 2023
@asmorkalov asmorkalov self-requested a review August 11, 2023 10:19
@asmorkalov asmorkalov added this to the 4.9.0 milestone Aug 11, 2023
@beanjoy
Copy link
Contributor Author

beanjoy commented Aug 14, 2023

@beanjoy Thanks a lot for the patch! It looks reasonable for me. Could you add some test for it to https://github.com/opencv/opencv/blob/4.x/modules/videoio/test/test_mfx.cpp

I added test case, please check.
I'm not very familiar with the PR process on github, please let me know if you have any questions, thanks.

@beanjoy
Copy link
Contributor Author

beanjoy commented Aug 21, 2023

I added a new test case, did you check it?

@beanjoy beanjoy requested a review from opencv-alalek August 25, 2023 02:39
@asmorkalov asmorkalov removed the pr: needs test New functionality requires minimal tests set label Sep 7, 2023
Copy link
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@asmorkalov asmorkalov added the bug label Sep 7, 2023
@asmorkalov asmorkalov changed the title fix bug:Need modify the outputVideoFormat after changing the output format Modify the outputVideoFormat after changing the output format in MSMF backend Sep 7, 2023
@asmorkalov asmorkalov merged commit d0de575 into opencv:4.x Sep 7, 2023
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
Modify the outputVideoFormat after changing the output format in MSMF backend opencv#24142

After changing the output format, need to modify the outputVideoFormat, otherwise the outputVideoFormat is always CV_CAP_MODE_BGR, and an error will occur when converting the format in retrieveVideoFrame(), and will always enter "case CV_CAP_MODE_BGR:" process.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake

Co-authored-by: 李龙 <[email protected]>
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
Modify the outputVideoFormat after changing the output format in MSMF backend opencv#24142

After changing the output format, need to modify the outputVideoFormat, otherwise the outputVideoFormat is always CV_CAP_MODE_BGR, and an error will occur when converting the format in retrieveVideoFrame(), and will always enter "case CV_CAP_MODE_BGR:" process.

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [ ] I agree to contribute to the project under Apache 2 License.
- [ ] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake

Co-authored-by: 李龙 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants