[libbluray-devel] commit: Simplified _fetch_operand() (hpi1 )
git at videolan.org
git at videolan.org
Fri Sep 10 13:50:26 CEST 2010
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Sep 9 14:33:23 2010 +0300| [5021b42fbc8128f4eff7d7fcc6f89827aff637e5] | committer: hpi1
Simplified _fetch_operand()
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=5021b42fbc8128f4eff7d7fcc6f89827aff637e5
---
src/libbluray/hdmv/hdmv_vm.c | 25 +++++++------------------
1 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/src/libbluray/hdmv/hdmv_vm.c b/src/libbluray/hdmv/hdmv_vm.c
index 12decf3..856ade3 100644
--- a/src/libbluray/hdmv/hdmv_vm.c
+++ b/src/libbluray/hdmv/hdmv_vm.c
@@ -153,29 +153,18 @@ static int _store_result(HDMV_VM *p, MOBJ_CMD *cmd, uint32_t src, uint32_t dst,
static uint32_t _fetch_operand(HDMV_VM *p, int setstream, int setbuttonpage, int imm, uint32_t value)
{
- if (setstream) {
+ if (imm) {
+ return value;
+ }
- if (!imm) {
- return _read_setstream_regs(p, value);
- } else {
- return value;
- }
+ if (setstream) {
+ return _read_setstream_regs(p, value);
} else if (setbuttonpage) {
-
- if (!imm) {
- return _read_setbuttonpage_reg(p, value);
- } else {
- return value;
- }
+ return _read_setbuttonpage_reg(p, value);
} else {
-
- if (!imm) {
- return _read_reg(p, value);
- } else {
- return value;
- }
+ return _read_reg(p, value);
}
}
More information about the libbluray-devel
mailing list